summaryrefslogtreecommitdiff
path: root/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.p
blob: 75c0e7a36ef96085d9a81586d77ba58e7124f2d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 ~ ^/(?<slug>.+)$ {
		# 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";
	}
}