2023-05-10 00:21:56 +04:00
|
|
|
server {
|
|
|
|
listen 443 http2;
|
|
|
|
listen 127.0.0.1:8110; # I2P
|
|
|
|
# listen 8090; # Tor
|
|
|
|
listen [300:a98d:d6d0:8a08::f]:80; # Yggdrasil
|
|
|
|
|
|
|
|
server_name arav.su www.arav.su arav.i2p moq7aejnf4xk5k2bkaltli3ftkhusy2mbrd3pj23nrca343ku2mgk4yd.onion;
|
|
|
|
|
|
|
|
access_log /var/log/nginx/dwelling/dwelling.log main if=$nolog;
|
|
|
|
|
|
|
|
ssl_certificate /etc/letsencrypt/live/arav.su/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/arav.su/privkey.pem;
|
|
|
|
|
|
|
|
|
|
|
|
add_header Content-Security-Policy "default-src 'none'; connect-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 '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";
|
2023-05-23 04:40:55 +04:00
|
|
|
# add_header Onion-Location "http://moq7aejnf4xk5k2bkaltli3ftkhusy2mbrd3pj23nrca343ku2mgk4yd.onion$request_uri";
|
2023-05-10 00:21:56 +04:00
|
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass http://unix:/var/run/dwelling-home/sock;
|
|
|
|
proxy_buffering off;
|
|
|
|
|
|
|
|
proxy_set_header X-Client-Timezone $gi2_location_tz;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header Schema $scheme;
|
|
|
|
}
|
|
|
|
|
2023-05-23 04:48:44 +04:00
|
|
|
|
2023-05-10 00:38:21 +04:00
|
|
|
location /guestbook/admin {
|
2023-05-23 23:30:06 +04:00
|
|
|
proxy_pass http://unix:/var/run/dwelling-home/sock;
|
|
|
|
proxy_buffering off;
|
|
|
|
|
|
|
|
proxy_set_header X-Client-Timezone $gi2_location_tz;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header Schema $scheme;
|
|
|
|
|
2023-05-10 00:38:21 +04:00
|
|
|
allow 192.168.144.0/25;
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
2023-05-23 04:48:44 +04:00
|
|
|
location /mindflow/admin {
|
2023-05-23 23:30:06 +04:00
|
|
|
proxy_pass http://unix:/var/run/dwelling-home/sock;
|
|
|
|
proxy_buffering off;
|
|
|
|
|
|
|
|
proxy_set_header X-Client-Timezone $gi2_location_tz;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header Schema $scheme;
|
|
|
|
|
2023-05-23 04:48:44 +04:00
|
|
|
allow 192.168.144.0/25;
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
2023-05-10 00:21:56 +04:00
|
|
|
|
|
|
|
location /api/captcha/ {
|
2023-05-23 23:30:06 +04:00
|
|
|
proxy_pass http://unix:/var/run/dwelling-home/sock;
|
|
|
|
proxy_buffering off;
|
|
|
|
|
2023-05-10 00:21:56 +04:00
|
|
|
limit_req zone=captcha_api nodelay;
|
|
|
|
}
|
|
|
|
|
2023-05-14 02:40:48 +04:00
|
|
|
location ~ /api/guestbook/.+ {
|
2023-05-23 23:30:06 +04:00
|
|
|
proxy_pass http://unix:/var/run/dwelling-home/sock;
|
|
|
|
proxy_buffering off;
|
|
|
|
|
2023-05-14 03:32:44 +04:00
|
|
|
allow 192.168.144.0/25;
|
|
|
|
deny all;
|
|
|
|
}
|
2023-05-10 00:21:56 +04:00
|
|
|
|
2023-05-14 03:32:44 +04:00
|
|
|
location ~ /api/mindflow?.+ {
|
2023-05-23 23:30:06 +04:00
|
|
|
proxy_pass http://unix:/var/run/dwelling-home/sock;
|
|
|
|
proxy_buffering off;
|
|
|
|
|
2023-05-10 00:21:56 +04:00
|
|
|
allow 192.168.144.0/25;
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
location ~ ^/~(.+?)(/.*)?$ {
|
|
|
|
alias /srv/http/pubs/$1/$2;
|
|
|
|
|
|
|
|
autoindex on;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
location ^~ /.well-known/ {
|
|
|
|
alias /srv/http/.well-known/;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ^~ /.well-known/openpgpkey {
|
|
|
|
alias /srv/http/.well-known/openpgpkey/;
|
|
|
|
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
add_header Access-Control-Allow-Origin * always;
|
|
|
|
}
|
|
|
|
}
|