2022-06-27 23:37:40 +04:00
|
|
|
server {
|
2023-06-12 23:13:14 +04:00
|
|
|
listen 443 http2;
|
2022-06-27 23:37:40 +04:00
|
|
|
listen 127.0.0.1:8112; # I2P
|
2022-10-31 02:08:02 +04:00
|
|
|
listen [300:a98d:d6d0:8a08::d]:80; # Yggdrasil
|
2022-06-27 23:37:40 +04:00
|
|
|
|
|
|
|
|
2023-02-23 17:56:26 +04:00
|
|
|
server_name files.arav.su files.arav.i2p qf5e43nlhvnrutmikuvbdfj3cmtthokpbaxtkm6mjlslttzvtgm4fxid.onion;
|
2022-06-27 23:37:40 +04:00
|
|
|
|
|
|
|
|
|
|
|
access_log /var/log/nginx/dwelling/files.log main if=$nolog;
|
|
|
|
|
2022-06-28 05:10:22 +04:00
|
|
|
|
2023-02-23 17:56:26 +04:00
|
|
|
ssl_certificate /etc/letsencrypt/live/arav.su/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/arav.su/privkey.pem;
|
2022-06-27 23:37:40 +04:00
|
|
|
|
|
|
|
|
|
|
|
add_header Content-Security-Policy "default-src 'none'; 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 'self'";
|
|
|
|
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://qf5e43nlhvnrutmikuvbdfj3cmtthokpbaxtkm6mjlslttzvtgm4fxid.onion$request_uri";
|
|
|
|
|
|
|
|
|
|
|
|
location / {
|
2022-12-17 21:29:07 +04:00
|
|
|
proxy_pass http://unix:/var/run/dwelling-files/sock;
|
2022-06-27 23:37:40 +04:00
|
|
|
|
|
|
|
proxy_set_header X-Client-Timezone "$gi2_location_tz";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /file/ {
|
|
|
|
alias /srv/ftp/;
|
|
|
|
|
|
|
|
autoindex on;
|
|
|
|
}
|
|
|
|
}
|