mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Added HAProxy example (#4660)
* Added HAProxy example Proposal of an example with HAProxy. Asked by #4541. Signed-off-by: Benoît S. (“Benpro”) <gitlab@benpro.fr> * Following suggestions of @richvdh
This commit is contained in:
parent
b9d6756b14
commit
16e0680498
1
changelog.d/4541.feature
Normal file
1
changelog.d/4541.feature
Normal file
@ -0,0 +1 @@
|
|||||||
|
Added an HAProxy example in the reverse proxy documentation. Contributed by Benoît S. (“Benpro”).
|
@ -85,6 +85,24 @@ Let's assume that we expect clients to connect to our server at
|
|||||||
</Location>
|
</Location>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
* HAProxy::
|
||||||
|
|
||||||
|
frontend https
|
||||||
|
bind 0.0.0.0:443 v4v6 ssl crt /etc/ssl/haproxy/ strict-sni alpn h2,http/1.1
|
||||||
|
bind :::443 ssl crt /etc/ssl/haproxy/ strict-sni alpn h2,http/1.1
|
||||||
|
|
||||||
|
# Matrix client traffic
|
||||||
|
acl matrix hdr(host) -i matrix.example.com
|
||||||
|
use_backend matrix if matrix
|
||||||
|
|
||||||
|
frontend matrix-federation
|
||||||
|
bind 0.0.0.0:8448 v4v6 ssl crt /etc/ssl/haproxy/synapse.pem alpn h2,http/1.1
|
||||||
|
bind :::8448 ssl crt /etc/ssl/haproxy/synapse.pem alpn h2,http/1.1
|
||||||
|
default_backend matrix
|
||||||
|
|
||||||
|
backend matrix
|
||||||
|
server matrix 127.0.0.1:8008
|
||||||
|
|
||||||
You will also want to set ``bind_addresses: ['127.0.0.1']`` and ``x_forwarded: true``
|
You will also want to set ``bind_addresses: ['127.0.0.1']`` and ``x_forwarded: true``
|
||||||
for port 8008 in ``homeserver.yaml`` to ensure that client IP addresses are
|
for port 8008 in ``homeserver.yaml`` to ensure that client IP addresses are
|
||||||
recorded correctly.
|
recorded correctly.
|
||||||
|
Loading…
Reference in New Issue
Block a user