$ dig rabbot.io +nostats +nocomments +nocmd
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
# Set Swap 4GB, Swappiness 10. | |
# ref : https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 | |
# Turn the swapfile off if has any. | |
sudo swapoff -a | |
# Check current disk usage. | |
df -h | |
# Create and Enable the Swap File 4GB. | |
sudo fallocate -l 4G /swapfile |
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
# Clear all docker log | |
truncate -s 0 /var/lib/docker/containers/*/*-json.log |
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 { | |
listen 1337; | |
server_name localhost; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
# https://help.ubuntu.com/community/CronHowto | |
# create script in daily cron folder | |
nano /etc/cron.hourly/free-mem.sh | |
# insert below line | |
# http://www.upubuntu.com/2013/01/how-to-free-up-unused-memory-in.html | |
# Free Up Unused Memory | |
sudo sysctl -w vm.drop_caches=3 | |
# page cache, inodes, and dentries |
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 { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
add_header Content-Security-Policy "default-src 'self';"; | |
add_header X-Frame-Options "SAMEORIGIN" always; | |
add_header X-Content-Type-Options "nosniff" always; | |
add_header X-Xss-Protection "1"; | |
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response. |
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
worker_processes auto; | |
user www-data; | |
pid /run/nginx.pid; | |
daemon off; | |
events { | |
worker_connections 1024; | |
accept_mutex off; | |
} |
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 { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
add_header Content-Security-Policy "default-src 'self';"; | |
add_header X-Frame-Options "SAMEORIGIN" always; | |
add_header X-Content-Type-Options "nosniff" always; | |
add_header X-Xss-Protection "1"; | |
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response. |
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
# Compression | |
# Enable Gzip compressed. | |
gzip on; | |
# Enable compression both for HTTP/1.0 and HTTP/1.1. | |
gzip_http_version 1.1; | |
# Compression level (1-9). | |
# 5 is a perfect compromise between size and cpu usage, offering about |
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 { | |
listen 80; | |
listen 443 ssl http2; | |
server_name rabbot.io www.rabbot.io; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; | |
ssl_prefer_server_ciphers on; | |
ssl_certificate /etc/letsencrypt/live/rabbot.io/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/rabbot.io/privkey.pem; | |
ssl_session_cache shared:SSL:128m; |