server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name p.tyil.nl; ssl_certificate /etc/letsencrypt/live/p.tyil.nl/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/p.tyil.nl/privkey.pem; include /etc/nginx/snippets.d/certbot.conf; include /etc/nginx/snippets.d/headers.conf; include /etc/nginx/snippets.d/ssl.conf; root /var/www/nl.tyil.p; location = / { return 301 https://www.tyil.nl/services/fiche/; } location ~ ^/(?.+)$ { # Disassociate all filetypes and their Content-Type, and # default everything to text/plain. types { } default_type text/plain; alias "/var/www/nl.tyil.p/${slug}/index.txt"; } }