Tags

/etc/nginx/nginx.conf

  1. https://www.digitalocean.com/community/tutorials/how-to-improve-website-performance-using-gzip-and-nginx-on-ubuntu-20-04
  2. https://www.giftofspeed.com/gzip-test/
# Gzip Settings
gzip_min_length 256
  1. could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size
http {
   ...
   proxy_headers_hash_max_size 1024;
   proxy_headers_hash_bucket_size 128;
   ...
}
  1. real_ip
http {
    real_ip_header X-Forwarded-For;
    real_ip_recursive on;
    set_real_ip_from 10.0.3.1;     # trust traffic from the LXC host’s IP
}

/etc/nginx/sites-available/DOM.TLD.conf

server {
    server_name DOM.TLD;
    listen 80;
    root    /var/www/DOM.TLD/;
    index    index.html;
    include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
    add_header Strict-Transport-Security max-age=31536000;
    # include	proxy_params;
}
  1. ln -s /etc/nginx/sites-available/DOM.TLD.conf  /etc/nginx/sites-enabled
  2. nginx -s reload