mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Add HaProxy conf with/without TLS termination
This commit is contained in:
parent
c15dee80f2
commit
b9fa8493b0
2 changed files with 52 additions and 0 deletions
26
docs/haproxy/haproxy-with-tls-termination.cfg
Normal file
26
docs/haproxy/haproxy-with-tls-termination.cfg
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
backend be_matrix
|
||||||
|
mode http
|
||||||
|
# Dendrite running on same host:
|
||||||
|
server static 127.0.0.1:8008 check
|
||||||
|
# For Dendrite running on host with ip a.b.c.d, replace with:
|
||||||
|
# server static a.b.c.d:8008 check
|
||||||
|
|
||||||
|
backend matrix-well-known-client
|
||||||
|
http-after-response set-header Access-Control-Allow-Origin "*"
|
||||||
|
http-after-response set-header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||||
|
http-after-response set-header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
||||||
|
url":"https://identity.example.com"}}'
|
||||||
|
http-request return status 200 content-type application/json string '{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.identity_server":{"base_u
|
||||||
|
rl":"https://matrix.example.com"}}'
|
||||||
|
|
||||||
|
backend matrix-well-known-server
|
||||||
|
http-after-response set-header Access-Control-Allow-Origin "*"
|
||||||
|
http-after-response set-header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||||
|
http-after-response set-header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
||||||
|
http-request return status 200 content-type application/json string '{"m.server":"matrix.example.com"}'
|
||||||
|
|
||||||
|
frontend fe_matrix_dendrite
|
||||||
|
# Replace 123.123.123.123 with your PUBLIC ip address
|
||||||
|
bind 123.123.123.123:8448 ssl crt /etc/haproxy/certs/matrix.example.com.pem
|
||||||
|
use_backend be_matrix
|
||||||
|
default_backend be_matrix
|
26
docs/haproxy/haproxy.cfg
Normal file
26
docs/haproxy/haproxy.cfg
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
backend be_matrix
|
||||||
|
mode http
|
||||||
|
# Dendrite running on same host:
|
||||||
|
server static 127.0.0.1:8448 check
|
||||||
|
# For Dendrite running on host with ip a.b.c.d, replace with:
|
||||||
|
# server static a.b.c.d:8448 check
|
||||||
|
|
||||||
|
backend matrix-well-known-client
|
||||||
|
http-after-response set-header Access-Control-Allow-Origin "*"
|
||||||
|
http-after-response set-header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||||
|
http-after-response set-header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
||||||
|
url":"https://identity.example.com"}}'
|
||||||
|
http-request return status 200 content-type application/json string '{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.identity_server":{"base_u
|
||||||
|
rl":"https://matrix.example.com"}}'
|
||||||
|
|
||||||
|
backend matrix-well-known-server
|
||||||
|
http-after-response set-header Access-Control-Allow-Origin "*"
|
||||||
|
http-after-response set-header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||||
|
http-after-response set-header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
||||||
|
http-request return status 200 content-type application/json string '{"m.server":"matrix.example.com"}'
|
||||||
|
|
||||||
|
frontend fe_matrix_dendrite
|
||||||
|
# Replace 123.123.123.123 with your PUBLIC ip address
|
||||||
|
bind 123.123.123.123:8448
|
||||||
|
use_backend be_matrix
|
||||||
|
default_backend be_matrix
|
Loading…
Add table
Add a link
Reference in a new issue