synapse
synapse copied to clipboard
reverse-proxy docs: add missing .well-known paths
Add missing .well-known paths to Apache, nginx and HAProxy
Pull Request Checklist
- [x] Pull request is based on the develop branch
- [x] Pull request includes a changelog file. The entry should:
- Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from
EventStoretoEventWorkerStore.". - Use markdown where necessary, mostly for
code blocks. - End with either a period (.) or an exclamation mark (!).
- Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
- Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from
- [x] Pull request includes a sign off
- [ ] Code style is correct (run the linters)
see also https://github.com/matrix-org/synapse/pull/7077 which attempted to do something similar
https://matrix-org.github.io/synapse/latest/reverse_proxy.html contains configuration examples for different programs, but they are inconsistent. .well-known is missing in the Apache and nginx examples.
https://matrix-org.github.io/synapse/latest/setup/installation.html#client-well-known-uri contains a configuration example, but only for nginx and not for the other programs.
For Apache, returning strings form the configuration is not possible without using a workaround using ErrorDocument.
Isn't it better to let the .well-known directory be served by synapse instead of returning a 404 by default? If that is not correct, would it be correct using the ErrorDocument workaround?
https://matrix-org.github.io/synapse/latest/reverse_proxy.html contains configuration examples for different programs, but they are inconsistent. .well-known is missing in the Apache and nginx examples.
They will still be inconsistent after your changes. The Caddy and haproxy examples (which I assume you're referring to) show how to configure delegation with those reverse proxies. They do not blindly forward .well-known to Synapse. Examples of how to do the same thing on Apache and nginx would be good to add.
https://matrix-org.github.io/synapse/latest/setup/installation.html#client-well-known-uri contains a configuration example, but only for nginx and not for the other programs.
You don't appear to be suggesting we change this, though?
For Apache, returning strings form the configuration is not possible without using a workaround using
ErrorDocument.
Why not just use an external file? Apache is pretty good at serving them up.
Isn't it better to let the .well-known directory be served by synapse instead of returning a 404 by default?
I don't think so, no. Synapse's support for .well-known files is pretty limited and only useful in a small number of cases. Indeed Synapse itself will serve a 404 for .well-known/matrix/server by default.
You don't appear to be suggesting we change this, though?
Correct, In my message I made you aware of the difference, I did not make a suggestion.
Why not just use an external file? Apache is pretty good at serving them up.
If that's the correct way to do it, I'll adapt the PR accordingly
The nginx section now contains the exact copy of what is in https://matrix-org.github.io/synapse/latest/setup/installation.html#client-well-known-uri for nginx and for apache2 I changed it to static files and a full example for the .well-known file as in https://matrix-org.github.io/synapse/latest/setup/installation.html#client-well-known-uri
I'm going to close this pull request due to lack of response, please respond to the above feedback if you'd like to continue working on it. Thanks!