From f7919db5f5a8899862f7bb12c044bd800d01ad2d Mon Sep 17 00:00:00 2001
From: richvdh
Date: Fri, 27 Aug 2021 11:54:42 +0000
Subject: deploy: 051ddac53b733e5768488bac7548a0c31bf68982
---
develop/reverse_proxy.html | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
(limited to 'develop/reverse_proxy.html')
diff --git a/develop/reverse_proxy.html b/develop/reverse_proxy.html
index a9385e9256..8bb18d0b7d 100644
--- a/develop/reverse_proxy.html
+++ b/develop/reverse_proxy.html
@@ -233,6 +233,9 @@ to proxied traffic.)
server_name matrix.example.com;
location ~* ^(\/_matrix|\/_synapse\/client) {
+ # note: do not add a path (even a single /) after the port in `proxy_pass`,
+ # otherwise nginx will canonicalise the URI and cause signature verification
+ # errors.
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
@@ -244,9 +247,7 @@ to proxied traffic.)
}
}
-NOTE: Do not add a path after the port in proxy_pass, otherwise nginx will
-canonicalise/normalise the URI.
-
+
matrix.example.com {
proxy /_matrix http://localhost:8008 {
transparent
@@ -263,7 +264,7 @@ example.com:8448 {
}
}
-
+
matrix.example.com {
reverse_proxy /_matrix/* http://localhost:8008
reverse_proxy /_synapse/client/* http://localhost:8008
--
cgit 1.5.1