summaryrefslogtreecommitdiff
path: root/playbooks.d/webserver-nginx/share/sites.d
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-01-22 09:16:27 +0100
committerPatrick Spek <p.spek@tyil.nl>2023-01-22 09:16:27 +0100
commitbf593fd9fe8b5eb6f55799abaccea67f6319fbee (patch)
tree64d85beefc6dc1f9b16b9f427fc77e1ae942bc73 /playbooks.d/webserver-nginx/share/sites.d
parentf726070253af6796957832baff7299f3f950ca18 (diff)
Add nginx entries for mumble web proxy
Diffstat (limited to 'playbooks.d/webserver-nginx/share/sites.d')
-rw-r--r--playbooks.d/webserver-nginx/share/sites.d/http/com.voidfire.mumble13
-rw-r--r--playbooks.d/webserver-nginx/share/sites.d/https/com.voidfire.mumble33
2 files changed, 46 insertions, 0 deletions
diff --git a/playbooks.d/webserver-nginx/share/sites.d/http/com.voidfire.mumble b/playbooks.d/webserver-nginx/share/sites.d/http/com.voidfire.mumble
new file mode 100644
index 0000000..a2922fc
--- /dev/null
+++ b/playbooks.d/webserver-nginx/share/sites.d/http/com.voidfire.mumble
@@ -0,0 +1,13 @@
+server {
+ listen 80;
+ listen [::]:80;
+
+ server_name mumble.voidfire.com;
+
+ 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/com.voidfire.mumble b/playbooks.d/webserver-nginx/share/sites.d/https/com.voidfire.mumble
new file mode 100644
index 0000000..5e57f3d
--- /dev/null
+++ b/playbooks.d/webserver-nginx/share/sites.d/https/com.voidfire.mumble
@@ -0,0 +1,33 @@
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+
+ server_name mumble.voidfire.com;
+
+ ssl_certificate /etc/letsencrypt/live/mumble.voidfire.com/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/mumble.voidfire.com/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/com.voidfire.mumble;
+
+ 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://127.0.0.1:8080;
+ }
+
+ location /proxy {
+ proxy_http_version 1.1;
+ proxy_set_header Connection $http_connection;
+ proxy_set_header Upgrade $http_upgrade;
+
+ proxy_pass http://127.0.0.1:64737;
+ }
+}