This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| # Author: Yujin Boby | |
| # Web: https://serverok.in | |
| session_start(); | |
| if (isset($_SESSION["serverok_test"])) { | |
| $_SESSION["serverok_test"] += 1; | |
| } else { | |
| $_SESSION["serverok_test"] = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # cat /usr/local/nginx/conf/rewrite/laravel.conf | |
| location / { | |
| try_files $uri $uri/ /index.php?$query_string; | |
| } | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@vmi465483:~# cat /etc/nginx/sites-enabled/dspace.conf | |
| server { | |
| server_name repositorio.unijuanpablo.edu.pe; | |
| root /var/www/html/; | |
| client_max_body_size 2000m; | |
| location / { | |
| return 301 http://repositorio.unijuanpablo.edu.pe/xmlui/; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| server_name DONAIN_NAME_HERE www.DONAIN_NAME_HERE; | |
| listen *:80; | |
| client_max_body_size 100M; | |
| proxy_read_timeout 600s; | |
| proxy_buffer_size 128k; | |
| proxy_buffers 4 256k; | |
| proxy_busy_buffers_size 256k; | |
| location / { | |
| proxy_set_header X-Real-IP $remote_addr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Edit file | |
| eks-cluster.tf | |
| Find | |
| resource "aws_security_group_rule" "demo-cluster-ingress-workstation-https" { | |
| cidr_blocks = [local.workstation-external-cidr] | |
| description = "Allow workstation to communicate with the cluster API Server" | |
| from_port = 443 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # https://serverok.in/bash-script-to-monitor-disk-usage | |
| CURRENT_USAGE=$(df / | grep -v 'Filesystem' | awk '{print $5}' | sed 's/%//g') | |
| ALERT_ON=80 | |
| if [ "$CURRENT_USAGE" -gt "$ALERT_ON" ] ; then | |
| mail -s 'Disk Usage Warning' you@yourdomain.com << EOF | |
| Disk almost full on / partition. Current Useage: $CURRENT_USAGE% | |
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First install squid proxy with commands | |
| wget https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid3-install.sh | |
| chmod 755 squid3-install.sh | |
| sudo ./squid3-install.sh | |
| To make proxy work with out password, edit file | |
| /etc/squid/squid.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To add a stream, you need to edit file | |
| /etc/stunnel/stunnel.conf | |
| Find | |
| [shoutcast1] | |
| accept=8000 | |
| connect=108.170.15.78:8001 | |
| cert = /etc/letsencrypt/live/jroradio.com/fullchain.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Alias /phpmyadmin "/usr/serverok/phpmyadmin" | |
| <Directory "/usr/serverok/phpmyadmin"> | |
| AllowOverride All | |
| Options FollowSymlinks | |
| Order allow,deny | |
| Allow from all | |
| <IfModule mod_authz_core.c> | |
| <RequireAny> | |
| Require all granted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh into server as user root | |
| To make attachment size 100 MB (104857600 bytes) | |
| run following 3 commands. | |
| postconf -e message_size_limit=104857600 | |
| postconf -e mailbox_size_limit=104857600 | |
| systemctl restart postfix |