2024-10-17 15:32:32 +02:00
matrix.example.com {
2024-09-14 08:06:40 +02:00
handle {
encode zstd gzip
2024-10-21 13:31:53 +02:00
# Use the docker service name instead of localhost or 127.0.0.1 here
matrix-traefik:8080 {
2024-09-14 08:06:40 +02:00
header_up X-Forwarded-Port {http.request.port}
header_up X-Forwarded-TlsProto {tls_protocol}
header_up X-Forwarded-TlsCipher {tls_cipher}
header_up X-Forwarded-HttpsProto {proto}
}
}
}
2024-10-21 13:31:53 +02:00
# Put `https://` at the beginning to enforce https protocol as 8448 is not the default https port (which is 443)
2024-10-17 15:32:32 +02:00
https://matrix.example.com:8448 {
2024-09-14 08:06:40 +02:00
handle {
encode zstd gzip
2024-10-21 13:31:53 +02:00
# Use the docker service name instead of localhost or 127.0.0.1 here
2024-09-14 08:06:40 +02:00
reverse_proxy matrix-traefik:8448 {
header_up X-Forwarded-Port {http.request.port}
header_up X-Forwarded-TlsProto {tls_protocol}
header_up X-Forwarded-TlsCipher {tls_cipher}
header_up X-Forwarded-HttpsProto {proto}
}
}
}
2024-10-17 15:32:32 +02:00
example.com {
2024-09-14 08:06:40 +02:00
# 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
@wellknown {
path /.well-known/matrix/*
}
handle @wellknown {
2024-10-17 15:32:32 +02:00
reverse_proxy https://matrix.example.com {
2024-09-14 08:06:40 +02:00
header_up Host {http.reverse_proxy.upstream.hostport}
}
}
}