meson / [CiCADA] tor.onni.me

Last active 2 weeks ago

Like 0

meson revised this gist 2 weeks ago · 9e1db31

1 file changed, 50 insertions

tor.onni.me (file created)
@@ -0,0 +1,50 @@
1 + server {
2 + listen 80;
3 + listen [::]:80;
4 + server_name tor.onni.me;
5 + server_tokens off;
6 + access_log off;
7 + return 301 https://$host$request_uri;
8 + }
9 + server {
10 + # HTTP/2 over TCP
11 + listen 443 ssl;
12 + listen [::]:443 ssl;
13 + # HTTP/3 over QUIC/UDP
14 + listen 443 quic ;
15 + listen [::]:443 quic ;
16 + http2 on;
17 + http3 on;
18 + add_header Alt-Svc 'h3=":443"; ma=86400' always;
19 + server_name tor.onni.me;
20 + server_tokens off;
21 + # root /var/www/tor.onni.me;
22 + # index index.html;
23 + access_log /var/log/nginx/tor.onni.me.log proxy buffer=32k flush=5m if=$loggable;
24 + error_log /var/log/nginx/_error_tor.onni.me.log warn;
25 + include /etc/letsencrypt/options-ssl-nginx.conf;
26 + ssl_certificate /etc/letsencrypt/live/tor.onni.me/fullchain.pem;
27 + ssl_certificate_key /etc/letsencrypt/live/tor.onni.me/privkey.pem;
28 + ssl_dhparam /etc/letsencrypt/dh/chi.pem;
29 + # Security headers
30 + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
31 + add_header X-Content-Type-Options "nosniff" always;
32 + add_header X-Frame-Options "SAMEORIGIN" always;
33 + add_header X-XSS-Protection "1; mode=block" always;
34 + add_header X-Robots-Tag "none" always;
35 + add_header X-Download-Options "noopen" always;
36 + add_header X-Permitted-Cross-Domain-Policies "none" always;
37 + add_header Referrer-Policy "strict-origin" always;
38 + add_header Permissions-Policy "interest-cohort=()" always;
39 + # Transmission web UI
40 + location / {
41 + proxy_pass http://127.0.0.1:9092;
42 + include /etc/nginx/_proxy.conf;
43 + }
44 + # Block hidden files
45 + location ~ /\. {
46 + deny all;
47 + access_log off;
48 + log_not_found off;
49 + }
50 + }