From 35e6b9f1b78768b73cd3063fee50d58e2ba87237 Mon Sep 17 00:00:00 2001 From: horbix28 <60316568+horbix28@users.noreply.github.com> Date: Fri, 22 Apr 2022 08:56:51 +0200 Subject: [PATCH] Changed http redict for nginx to a working configuration, so bitwarden works in combination with other reverse proxied sites. --- Proxy-examples.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Proxy-examples.md b/Proxy-examples.md index 51ace5e..29ec41e 100644 --- a/Proxy-examples.md +++ b/Proxy-examples.md @@ -240,12 +240,20 @@ upstream vaultwarden-ws { # Redirect HTTP to HTTPS server { + if ($host = bitwarden.example.tld) { + return 301 https://$host$request_uri; + } + + listen 80; listen [::]:80; - server_name vaultwarden.example.tld; - return 301 https://$host$request_uri; + server_name bitwarden.example.tld; + return 404; + + } + server { listen 443 ssl http2; listen [::]:443 ssl http2;