From 020e7b483640eaecb5011b478ad7215a0e23f936 Mon Sep 17 00:00:00 2001 From: Raine Date: Fri, 3 Nov 2023 13:08:24 +0100 Subject: [PATCH] fix: nginx is stupid --- .../custom/nginx/conf.d/cryptpad.conf | 13 ++++++++++++- .../custom/nginx/conf.d/matrix.conf | 11 ++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/servers/kid/docker-compose.d/custom/nginx/conf.d/cryptpad.conf b/servers/kid/docker-compose.d/custom/nginx/conf.d/cryptpad.conf index 6c1f96d..c5821e4 100644 --- a/servers/kid/docker-compose.d/custom/nginx/conf.d/cryptpad.conf +++ b/servers/kid/docker-compose.d/custom/nginx/conf.d/cryptpad.conf @@ -1,6 +1,17 @@ server { listen 80; - server_name pad.ixvd.net sandbox.pad.ixvd.net; + server_name pad.ixvd.net; + + location / { + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://cryptpad; + } +} + +server { + listen 80; + server_name sandbox.pad.ixvd.net; location / { proxy_set_header Host $host; diff --git a/servers/kid/docker-compose.d/custom/nginx/conf.d/matrix.conf b/servers/kid/docker-compose.d/custom/nginx/conf.d/matrix.conf index 5a0d798..3f5797a 100644 --- a/servers/kid/docker-compose.d/custom/nginx/conf.d/matrix.conf +++ b/servers/kid/docker-compose.d/custom/nginx/conf.d/matrix.conf @@ -1,6 +1,6 @@ server { listen 80; - server_name matrix.ixvd.net matrix.neo.ixvd.net; + server_name matrix.ixvd.net; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -24,4 +24,13 @@ server { proxy_pass http://conduit:6167; client_max_body_size 0; } +} + +server { + listen 80; + server_name matrix.neo.ixvd.net; + + location / { + return 302 https://matrix.ixvd.net$request_uri; + } } \ No newline at end of file