server { http2 on; server_name nxshock.me; location ^~ /.well-known/acme-challenge/ { allow all; root /var/lib/letsencrypt/; default_type "text/plain"; try_files $uri =404; } location / { root /srv/http; index index.html; proxy_buffering off; proxy_request_buffering off; } access_log /dev/null; error_log /dev/null; listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/nxshock.me/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/nxshock.me/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = nxshock.me) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name nxshock.me; return 404; # managed by Certbot }