matrix-docker-ansible-deploy
matrix-docker-ansible-deploy copied to clipboard
Traefik configuration fails to redirect well-known
The description how to setup a reverse proxy with Traefik https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-own-webserver.md
lacks a feature. Add the following labels to matrix-nginx-proxy to remediate:
- '--label "traefik.http.routers.wellknown.rule=Host(`{{ matrix_domain }}`) && PathPrefix(`/.well-known`)"'
- '--label "traefik.http.routers.wellknown.entrypoints=web-secure"'
- '--label "traefik.http.routers.wellknown.tls.certResolver=default"'
- '--label "traefik.http.routers.wellknown.middlewares=nginx"'
- '--label "traefik.http.middlewares.nginx.redirectregex.regex=^https://{{ matrix_domain }}/(.*)"'
- '--label "traefik.http.middlewares.nginx.redirectregex.replacement=https://{{ matrix_server_fqn_matrix }}/$${1}"'
Legend! I was trying to figure this out!!!! Thanks a bunch. @baloan
Follow up: Sometimes on the federation tester it displays fine results. The other times I get a Connection Errors Non-200 response 502 from remote server
I also sometimes get
Got 1 connection report.
There was an error looking up homeserver version information: contents=[66 97 100 32 71 97 116 101 119 97 121] msg=Failed to GET JSON (hostname "matrix.mydomain.com:8448" path "/_matrix/federation/v1/version"): Bad Gateway code=502 wrapped=
Thanks! ^^. I had to add this label to make it work:
- '--label "traefik.http.routers.wellknown.service=matrix-nginx-proxy"'