server { listen 80; listen [::]:80; server_name bit.onni.me; server_tokens off; access_log off; return 301 https://$host$request_uri; } server { # HTTP/2 over TCP listen 443 ssl; listen [::]:443 ssl; # HTTP/3 over QUIC/UDP listen 443 quic ; listen [::]:443 quic ; http2 on; http3 on; add_header Alt-Svc 'h3=":443"; ma=86400' always; server_name bit.onni.me; server_tokens off; root /home/www-data/bit.onni.me; index index.html; access_log /var/log/nginx/bit.onni.me.log proxy buffer=32k flush=5m if=$loggable; error_log /var/log/nginx/_error_bit.onni.me.log warn; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_certificate /etc/letsencrypt/live/bit.onni.me/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/bit.onni.me/privkey.pem; ssl_dhparam /etc/letsencrypt/dh/chi.pem; # Security headers add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-XSS-Protection "1; mode=block" always; add_header X-Robots-Tag "none" always; add_header X-Download-Options "noopen" always; add_header X-Permitted-Cross-Domain-Policies "none" always; add_header Referrer-Policy "strict-origin" always; add_header Permissions-Policy "interest-cohort=()" always; # Transmission web UI location / { proxy_pass http://127.0.0.1:9091; include /etc/nginx/_proxy.conf; } location = /healthz { auth_basic off; proxy_pass http://127.0.0.1:9091/transmission/web/index.html; proxy_set_header Host $host; access_log off; } # Block hidden files location ~ /\. { deny all; access_log off; log_not_found off; } }