@@ -11,7 +11,7 @@ privileges.
11
11
12
12
** NOTE** : Your reverse proxy must not ` canonicalise ` or ` normalise `
13
13
the requested URI in any way (for example, by decoding ` %xx ` escapes).
14
- Beware that Apache * will* canonicalise URIs unless you specifify
14
+ Beware that Apache * will* canonicalise URIs unless you specify
15
15
` nocanon ` .
16
16
17
17
When setting up a reverse proxy, remember that Matrix clients and other
@@ -23,6 +23,10 @@ specification](https://matrix.org/docs/spec/server_server/latest#resolving-serve
23
23
for more details of the algorithm used for federation connections, and
24
24
[ delegate.md] ( < delegate.md > ) for instructions on setting up delegation.
25
25
26
+ Endpoints that are part of the standardised Matrix specification are
27
+ located under ` /_matrix ` , whereas endpoints specific to Synapse are
28
+ located under ` /_synapse/client ` .
29
+
26
30
Let's assume that we expect clients to connect to our server at
27
31
` https://matrix.example.com ` , and other servers to connect at
28
32
` https://example.com:8448 ` . The following sections detail the configuration of
@@ -45,7 +49,7 @@ server {
45
49
46
50
server_name matrix.example.com;
47
51
48
- location /_matrix {
52
+ location ~* ^(\ /_matrix|\/_synapse\/client) {
49
53
proxy_pass http://localhost:8008;
50
54
proxy_set_header X-Forwarded-For $remote_addr;
51
55
# Nginx by default only allows file uploads up to 1M in size
@@ -65,6 +69,10 @@ matrix.example.com {
65
69
proxy /_matrix http://localhost:8008 {
66
70
transparent
67
71
}
72
+
73
+ proxy /_synapse/client http://localhost:8008 {
74
+ transparent
75
+ }
68
76
}
69
77
70
78
example.com:8448 {
@@ -79,6 +87,7 @@ example.com:8448 {
79
87
```
80
88
matrix.example.com {
81
89
reverse_proxy /_matrix/* http://localhost:8008
90
+ reverse_proxy /_synapse/client/* http://localhost:8008
82
91
}
83
92
84
93
example.com:8448 {
@@ -96,6 +105,8 @@ example.com:8448 {
96
105
AllowEncodedSlashes NoDecode
97
106
ProxyPass /_matrix http://127.0.0.1:8008/_matrix nocanon
98
107
ProxyPassReverse /_matrix http://127.0.0.1:8008/_matrix
108
+ ProxyPass /_synapse/client http://127.0.0.1:8008/_synapse/client nocanon
109
+ ProxyPassReverse /_synapse/client http://127.0.0.1:8008/_synapse/client
99
110
</VirtualHost>
100
111
101
112
<VirtualHost *:8448>
@@ -119,6 +130,7 @@ frontend https
119
130
# Matrix client traffic
120
131
acl matrix-host hdr(host) -i matrix.example.com
121
132
acl matrix-path path_beg /_matrix
133
+ acl matrix-path path_beg /_synapse/client
122
134
123
135
use_backend matrix if matrix-host matrix-path
124
136
@@ -146,3 +158,10 @@ connecting to Synapse from a client.
146
158
Synapse exposes a health check endpoint for use by reverse proxies.
147
159
Each configured HTTP listener has a ` /health ` endpoint which always returns
148
160
200 OK (and doesn't get logged).
161
+
162
+ ## Synapse administration endpoints
163
+
164
+ Endpoints for administering your Synapse instance are placed under
165
+ ` /_synapse/admin ` . These require authentication through an access token of an
166
+ admin user. However as access to these endpoints grants the caller a lot of power,
167
+ we do not recommend exposing them to the public internet without good reason.
0 commit comments