Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

48 lines
1.7 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. matrix.example.com {
  5. handle {
  6. encode zstd gzip
  7. # Use the docker service name instead of localhost or 127.0.0.1 here
  8. matrix-traefik:8080 {
  9. header_up X-Forwarded-Port {http.request.port}
  10. header_up X-Forwarded-TlsProto {tls_protocol}
  11. header_up X-Forwarded-TlsCipher {tls_cipher}
  12. header_up X-Forwarded-HttpsProto {proto}
  13. }
  14. }
  15. }
  16. # Put `https://` at the beginning to enforce https protocol as 8448 is not the default https port (which is 443)
  17. https://matrix.example.com:8448 {
  18. handle {
  19. encode zstd gzip
  20. # Use the docker service name instead of localhost or 127.0.0.1 here
  21. reverse_proxy matrix-traefik:8448 {
  22. header_up X-Forwarded-Port {http.request.port}
  23. header_up X-Forwarded-TlsProto {tls_protocol}
  24. header_up X-Forwarded-TlsCipher {tls_cipher}
  25. header_up X-Forwarded-HttpsProto {proto}
  26. }
  27. }
  28. }
  29. example.com {
  30. # Uncomment this if you are following "(Option 3): Setting up reverse-proxying of the well-known files from the base domain's server to the Matrix server" of https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-well-known.md#option-3-setting-up-reverse-proxying-of-the-well-known-files-from-the-base-domains-server-to-the-matrix-server
  31. @wellknown {
  32. path /.well-known/matrix/*
  33. }
  34. handle @wellknown {
  35. reverse_proxy https://matrix.example.com {
  36. header_up Host {http.reverse_proxy.upstream.hostport}
  37. }
  38. }
  39. }