/etc/nginx/nginx.conf
- https://www.digitalocean.com/community/tutorials/how-to-improve-website-performance-using-gzip-and-nginx-on-ubuntu-20-04
- https://www.giftofspeed.com/gzip-test/
# Gzip Settings
gzip_min_length 256
- 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;
...
}
- 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;
}
- ln -s /etc/nginx/sites-available/DOM.TLD.conf /etc/nginx/sites-enabled
- nginx -s reload
Module
Welche Module müssen geladen werden?
module
nginx wird überwiegend als proxy eingesetzt und braucht dafür keine extra geladene module
nginx -V 2>&1 | grep --color -o --perl-regexp "(\-\-with|\-\-add|\-\-enable)[^ ]+"
peertube
https://github.com/Chocobozzz/PeerTube/blob/develop/support/nginx/peertube