server { listen 80; listen [::]:80; listen 443 ssl; listen [::]:443 ssl; http2 on; server_name chat.quietlife.nl; access_log /var/log/nginx/chat.quietlife.nl-access.log; error_log /var/log/nginx/chat.quietlife.nl-error.log; ssl_certificate /etc/letsencrypt/live/chat.quietlife.nl/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/chat.quietlife.nl/privkey.pem; if ($scheme != "https") { return 301 https://$host$request_uri; } location / { add_header X-Content-Type-Options nosniff; add_header X-Frame-Options SAMEORIGIN; add_header X-XSS-Protection "1; mode=block"; include proxy_params; proxy_pass http://localhost:8088; } }