1
0

Changed formatting. Fixed a typo in proxy_pass path.

This commit is contained in:
Alexander Andreev 2022-05-24 18:01:00 +04:00
parent 8c895db131
commit 630c703c12
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -1,72 +1,74 @@
server { server {
listen 443 ssl http2; listen 443 ssl http2;
listen 8090; # Tor listen 8090; # Tor
listen 127.0.0.1:8111; # I2P listen 127.0.0.1:8111; # I2P
server_name radio.arav.top radio.arav.i2p mkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion; server_name radio.arav.top radio.arav.i2p mkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion;
access_log /var/log/nginx/dwelling/radio.log main if=$nolog;
ssl_certificate /etc/letsencrypt/live/arav.top/fullchain.pem; access_log /var/log/nginx/dwelling/radio.log main if=$nolog;
ssl_certificate_key /etc/letsencrypt/live/arav.top/privkey.pem;
ssl_certificate /etc/letsencrypt/live/arav.top/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/arav.top/privkey.pem;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; media-src 'self'; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; font-src 'self'; form-action 'none'";
add_header X-Frame-Options "DENY";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
add_header Onion-Location "http://mkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion$request_uri";
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; media-src 'self'; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; font-src 'self'; form-action 'none'"; location / {
add_header X-Frame-Options "DENY"; proxy_pass http://unix:/var/run/dwelling-radio/r.sock/;
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block"; proxy_buffering off;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
add_header Onion-Location "http://mkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion$request_uri"; proxy_set_header X-Client-Timezone $gi2_location_tz;
proxy_set_header Host $host;
proxy_set_header Scheme $scheme;
}
location / { location =/filelist {
proxy_pass http://unix:/var/log/dwelling-radio/r.sock/; alias $dwelling_root/radio_filelist.html;
proxy_buffering off;
proxy_set_header X-Client-Timezone $gi2_location_tz; default_type text/html;
proxy_set_header Host $host; }
proxy_set_header Scheme $scheme;
}
location =/filelist { location /live/ {
default_type text/html; proxy_pass http://127.0.0.1:8000/;
alias $dwelling_root/radio_filelist.html;
}
proxy_buffering off;
location /live/ { proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8000/; }
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr; location /live/admin/ {
} deny all;
}
location /live/admin/ {
deny all;
}
} }
server { server {
listen 8000; listen 8000;
server_name radio.arav.top; server_name radio.arav.top;
access_log /var/log/nginx/dwelling/radio.http.log main if=$nolog;
access_log /var/log/nginx/dwelling/radio.http.log main if=$nolog;
add_header Content-Security-Policy "default-src 'none'; script-src 'none'; style-src 'self'; img-src 'self'; media-src 'self'; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; font-src 'self'; form-action 'none'";
add_header X-Frame-Options "DENY";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";
add_header Onion-Location "http://mkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion/live$request_uri";
add_header Content-Security-Policy "default-src 'none'; script-src 'none'; style-src 'self'; img-src 'self'; media-src 'self'; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; font-src 'self'; form-action 'none'"; location / {
add_header X-Frame-Options "DENY"; proxy_pass http://127.0.0.1:8000/;
add_header X-Content-Type-Options "nosniff"; proxy_buffering off;
add_header X-XSS-Protection "1; mode=block"; }
add_header Onion-Location "http://mkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion/live$request_uri";
location /admin/ {
location / { deny all;
proxy_pass http://127.0.0.1:8000/; }
proxy_buffering off;
}
location /admin/ {
deny all;
}
} }