summary refs log tree commit diff
diff options
context:
space:
mode:
authorLuke Faraone <luke@faraone.cc>2020-07-16 15:01:45 +0000
committerGitHub <noreply@github.com>2020-07-16 16:01:45 +0100
commitb0f031f92a397bfc33bffec7ee51a5d35dd220fd (patch)
tree60254cad039787a0a26c402685cd8469d63968c8
parentOptimise queueing of inbound replication commands (#7861) (diff)
downloadsynapse-b0f031f92a397bfc33bffec7ee51a5d35dd220fd.tar.xz
Combine nginx federation server blocks (#7823)
I'm pretty sure there's no technical reason these have to be distinct server blocks, so collapse into one and go with the more terse location block.

Signed-off-by: Luke W Faraone <luke@faraone.cc>
-rw-r--r--docs/reverse_proxy.md16
1 files changed, 5 insertions, 11 deletions
diff --git a/docs/reverse_proxy.md b/docs/reverse_proxy.md
index 131990001a..7bfb96eff6 100644
--- a/docs/reverse_proxy.md
+++ b/docs/reverse_proxy.md
@@ -38,6 +38,11 @@ the reverse proxy and the homeserver.
 server {
     listen 443 ssl;
     listen [::]:443 ssl;
+
+    # For the federation port
+    listen 8448 ssl default_server;
+    listen [::]:8448 ssl default_server;
+
     server_name matrix.example.com;
 
     location /_matrix {
@@ -48,17 +53,6 @@ server {
         client_max_body_size 10M;
     }
 }
-
-server {
-    listen 8448 ssl default_server;
-    listen [::]:8448 ssl default_server;
-    server_name example.com;
-
-    location / {
-        proxy_pass http://localhost:8008;
-        proxy_set_header X-Forwarded-For $remote_addr;
-    }
-}
 ```
 
 **NOTE**: Do not add a path after the port in `proxy_pass`, otherwise nginx will