mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
matrixsynapse: Update apache config to proxy Synapse client API
- Use the recommended configuration from Matrix Synapse documentation. - Preserve Host: header. - Set the X-Forwarded-Proto header. - Don't decode encoded slashes in the URLs during proxying. - Also proxy Synapse client API. Tests: - Web app at app.element.io is able to connect to a local server using browser. Two client can chat with each other. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
bf83cb5a5b
commit
778c35f2bc
@ -1,9 +1,24 @@
|
|||||||
##
|
##
|
||||||
## On all sites, provide Matrix Synapse on a default path: /_matrix. This is
|
## On all sites, provide Matrix API on a default path: /_matrix and Synapse
|
||||||
## only useful for clients to login without specifying a server port. This is
|
## Client API on path: /_synapse/client. This configuration as recommended at
|
||||||
## not useful for federation which requires SRV record or listening on port
|
## https://element-hq.github.io/synapse/latest/reverse_proxy.html . This is
|
||||||
## 8448. Further, federation requires same TLS public key to be provided to
|
## useful for clients to login without specifying a server port. This is not
|
||||||
## Apache and Matrix Synapse server.
|
## useful for federation which requires SRV record or listening on port 8448.
|
||||||
|
## Further, federation requires same TLS public key to be provided to Apache and
|
||||||
|
## Matrix Synapse server.
|
||||||
##
|
##
|
||||||
ProxyPass /_matrix http://localhost:8008/_matrix nocanon
|
AllowEncodedSlashes NoDecode
|
||||||
ProxyPassReverse /_matrix http://localhost:8008/_matrix
|
|
||||||
|
<Location /_matrix>
|
||||||
|
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
|
||||||
|
ProxyPreserveHost on
|
||||||
|
ProxyPass http://127.0.0.1:8008/_matrix nocanon
|
||||||
|
ProxyPassReverse http://127.0.0.1:8008/_matrix
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
<Location /_synapse/client>
|
||||||
|
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
|
||||||
|
ProxyPreserveHost on
|
||||||
|
ProxyPass http://127.0.0.1:8008/_synapse/client nocanon
|
||||||
|
ProxyPassReverse http://127.0.0.1:8008/_synapse/client
|
||||||
|
</Location>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user