Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Combine nginx federation server blocks (#7823)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lfaraone committed Jul 16, 2020
1 parent e530006 commit b0f031f
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions docs/reverse_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit b0f031f

Please sign in to comment.