Skip to content
Snippets Groups Projects
Unverified Commit 935e73ef authored by Matt Holt's avatar Matt Holt Committed by GitHub
Browse files

Update Caddy reverse proxy documentation (#13344)


Improve/simplify Caddy examples. Remove Caddy v1 (has long been EOL'ed)

Signed-off-by: default avatarMatthew Holt <mholt@users.noreply.github.com>
parent e8519e0e
No related branches found
No related tags found
No related merge requests found
Improve Caddy reverse proxy documentation.
...@@ -79,63 +79,32 @@ server { ...@@ -79,63 +79,32 @@ server {
} }
``` ```
### Caddy v1
```
matrix.example.com {
proxy /_matrix http://localhost:8008 {
transparent
}
proxy /_synapse/client http://localhost:8008 {
transparent
}
}
example.com:8448 {
proxy / http://localhost:8008 {
transparent
}
}
```
### Caddy v2 ### Caddy v2
``` ```
matrix.example.com { matrix.example.com {
reverse_proxy /_matrix/* http://localhost:8008 reverse_proxy /_matrix/* localhost:8008
reverse_proxy /_synapse/client/* http://localhost:8008 reverse_proxy /_synapse/client/* localhost:8008
} }
example.com:8448 { example.com:8448 {
reverse_proxy http://localhost:8008 reverse_proxy localhost:8008
} }
``` ```
[Delegation](delegate.md) example: [Delegation](delegate.md) example:
```
(matrix-well-known-header) {
# Headers
header Access-Control-Allow-Origin "*"
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
header Content-Type "application/json"
}
```
example.com { example.com {
handle /.well-known/matrix/server { header /.well-known/matrix/* Content-Type application/json
import matrix-well-known-header header /.well-known/matrix/* Access-Control-Allow-Origin *
respond `{"m.server":"matrix.example.com:443"}` respond /.well-known/matrix/server `{"m.server": "matrix.example.com:443"}`
} respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.identity_server":{"base_url":"https://identity.example.com"}}`
handle /.well-known/matrix/client {
import matrix-well-known-header
respond `{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.identity_server":{"base_url":"https://identity.example.com"}}`
}
} }
matrix.example.com { matrix.example.com {
reverse_proxy /_matrix/* http://localhost:8008 reverse_proxy /_matrix/* localhost:8008
reverse_proxy /_synapse/client/* http://localhost:8008 reverse_proxy /_synapse/client/* localhost:8008
} }
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment