map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream bsky { server 100.64.4.102:3000; } server { listen 80; listen [::]:80; server_name konpeki.solutions www.konpeki.solutions; location / { return 301 https://$host$request_uri; } } server { listen 443 ssl; listen [::]:443 ssl; http2 on; server_name konpeki.solutions www.konpeki.solutions; ssl_certificate /etc/letsencrypt/live/konpeki.solutions/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/konpeki.solutions/privkey.pem; ssl_session_timeout 1d; ssl_session_cache shared:MozSSL:10m; # about 40000 sessions ssl_session_tickets off; ssl_dhparam /etc/nginx/dhparam.txt; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305; ssl_prefer_server_ciphers off; add_header Strict-Transport-Security "max-age=63072000" always; include snippets/http-cat-error-pages.conf; proxy_set_header Connection $http_connection; proxy_set_header Upgrade $http_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; location / { client_max_body_size 512M; #proxy_pass http://100.64.4.102; return 404; } location /xrpc { proxy_pass http://bsky; } ssl_stapling on; ssl_stapling_verify on; # verify chain of trust of OCSP response using Root CA and Intermediate certs ssl_trusted_certificate /etc/letsencrypt/live/konpeki.solutions/fullchain.pem; # replace with the IP address of your resolver #resolver 127.0.0.1; # Defined in error pages }