matrix-docker-ansible-deploy/examples/reverse-proxies/caddy2/Caddyfile
Suguru Hirahara 37f69e92d5
Add license information to files in examples/reverse-proxies/
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-03-02 01:14:30 +09:00

50 lines
1.6 KiB
Caddyfile

# SPDX-FileCopyrightText: 2020 - 2023 MDAD project contributors
# SPDX-FileCopyrightText: 2020 Olaf Schoenwald
# SPDX-FileCopyrightText: 2020 Panagiotis Vasilopoulos
# SPDX-FileCopyrightText: 2021 - 2024 Slavi Pantaleev
# SPDX-FileCopyrightText: 2022 François Darveau
# SPDX-FileCopyrightText: 2024 Suguru Hirahara
#
# SPDX-License-Identifier: AGPL-3.0-or-later
matrix.example.com {
handle {
encode zstd gzip
reverse_proxy localhost:81 {
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}
}
}
}
matrix.example.com:8448 {
handle {
encode zstd gzip
reverse_proxy 127.0.0.1:8449 {
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}
}
}
}
example.com {
# 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 {
reverse_proxy https://matrix.example.com {
header_up Host {http.reverse_proxy.upstream.hostport}
}
}
}