1. The problem I’m having:
I’m trying to match matrix url path’s so that I can distribute matrix synapse workload across multiple different workers for better performance. I have been able to get a couple to work, but can’t get them all to work.
2. Error messages and/or full log output:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
No error messages
3. Caddy version:
v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=
4. How I installed and ran Caddy:
a. System environment:
Debian 12
System package from official install guide2
b. Command:
sudo systemctl start caddy.service
c. Service/unit/compose file:
...
d. My complete Caddy config:
matrix.cronyakatsuki.xyz {
# Federation
reverse_proxy /_matrix/federation/v1/event/* localhost:8181
reverse_proxy /_matrix/federation/v1/state/* localhost:8181
reverse_proxy /_matrix/federation/v1/state_ids/* localhost:8181
reverse_proxy /_matrix/federation/v1/backfill/* localhost:8181
reverse_proxy /_matrix/federation/v1/get_missing_events/* localhost:8181
reverse_proxy /_matrix/federation/v1/publicRooms.* localhost:8181
reverse_proxy /_matrix/federation/v1/query/* localhost:8181
reverse_proxy /_matrix/federation/v1/make_join/* localhost:8181
reverse_proxy /_matrix/federation/v1/make_leave/* localhost:8181
reverse_proxy /_matrix/federation/(v1|v2)/send_join/* localhost:8181
reverse_proxy /_matrix/federation/(v1|v2)/send_leave/* localhost:8181
reverse_proxy /_matrix/federation/(v1|v2)/invite/* localhost:8181
reverse_proxy /_matrix/federation/v1/event_auth/* localhost:8181
reverse_proxy /_matrix/federation/v1/timestamp_to_event/* localhost:8181
reverse_proxy /_matrix/federation/v1/exchange_third_party_invite/* localhost:8181
reverse_proxy /_matrix/federation/v1/user/devices/* localhost:8181
reverse_proxy /_matrix/key/v2/query* localhost:8181
reverse_proxy /_matrix/federation/v1/hierarchy/* localhost:8181
# sync
reverse_proxy /_matrix/client/(r0|v3)/sync* localhost:8282
reverse_proxy /_matrix/client/(api/v1|r0|v3)/events* localhost:8282
reverse_proxy /_matrix/client/(api/v1|r0|v3)/initialSync* localhost:8282
reverse_proxy /_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync* localhost:8282
# main
reverse_proxy /_matrix/* localhost:8008
reverse_proxy /_synapse/client/* localhost:8008
}
5. Links to relevant resources:
Simple url patterns that are just simple url/* work correctly and match, but some that are more complex that use things like (v1/v2)
and /foo
that will have parameters like /foo?jfdlkjl&jfkjldf