summaryrefslogtreecommitdiff
path: root/playbooks.d/webserver-nginx
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks.d/webserver-nginx')
-rw-r--r--playbooks.d/webserver-nginx/share/sites.d/http/nl.tyil.media13
-rw-r--r--playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.media22
2 files changed, 35 insertions, 0 deletions
diff --git a/playbooks.d/webserver-nginx/share/sites.d/http/nl.tyil.media b/playbooks.d/webserver-nginx/share/sites.d/http/nl.tyil.media
new file mode 100644
index 0000000..92d387c
--- /dev/null
+++ b/playbooks.d/webserver-nginx/share/sites.d/http/nl.tyil.media
@@ -0,0 +1,13 @@
+server {
+ listen 80;
+ listen [::]:80;
+
+ server_name nl.tyil.media;
+
+ include /etc/nginx/snippets.d/certbot.conf;
+ include /etc/nginx/snippets.d/headers.conf;
+
+ location / {
+ return 301 https://$host$request_uri;
+ }
+}
diff --git a/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.media b/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.media
new file mode 100644
index 0000000..9d811dc
--- /dev/null
+++ b/playbooks.d/webserver-nginx/share/sites.d/https/nl.tyil.media
@@ -0,0 +1,22 @@
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+
+ server_name media.tyil.nl;
+
+ ssl_certificate /etc/letsencrypt/live/media.tyil.nl/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/media.tyil.nl/privkey.pem;
+
+ include /etc/nginx/snippets.d/ssl.conf;
+ include /etc/nginx/snippets.d/certbot.conf;
+
+ location / {
+ proxy_http_version 1.1;
+ proxy_set_header Connection $http_connection;
+ proxy_set_header Host $host;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header X-Forwarded-For $remote_addr;
+
+ proxy_pass http://172.31.0.1:2003;
+ }
+}