Files
piik/deploy/nginx/share.bonfire.icu.conf.example
T
AAA f3dc212211 chore: add minimal staging deployment (#6)
* chore(deploy): add minimal production deployment

* fix(deploy): fail closed and reload renewed certs

* docs(status): record staging deployment

* docs(status): record public TURN verification
2026-08-18 20:24:53 +08:00

53 lines
1.5 KiB
Plaintext

map $http_upgrade $screener_connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name share.bonfire.icu;
location ^~ /.well-known/acme-challenge/ {
root /var/www/letsencrypt;
default_type text/plain;
}
location / {
return 301 https://share.bonfire.icu$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name share.bonfire.icu;
ssl_certificate /etc/letsencrypt/live/share.bonfire.icu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/share.bonfire.icu/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
access_log /var/log/nginx/screener.access.log;
error_log /var/log/nginx/screener.error.log warn;
add_header Strict-Transport-Security "max-age=31536000" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer" always;
add_header X-Frame-Options "DENY" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
location / {
proxy_pass http://127.0.0.1:8787;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $screener_connection_upgrade;
proxy_read_timeout 5h;
proxy_send_timeout 5h;
proxy_buffering off;
}
}