flake/hosts/blacksteel/Caddyfile

66 lines
1.2 KiB
Caddyfile

{
servers {
trusted_proxies static private_ranges
trusted_proxies_strict
}
}
(default) {
encode zstd gzip
handle_path /robots.txt {
file_server * {
root @robots@
}
}
}
http://mastodon.ny4.dev:80 {
import default
handle_path /system/* {
file_server * {
root /var/lib/mastodon/public-system
}
}
handle /api/v1/streaming/* {
reverse_proxy unix//run/mastodon-streaming/streaming-1.socket {
header_up X-Forwarded-Proto "https"
}
}
route * {
file_server * {
root @mastodon@/public
pass_thru
}
reverse_proxy * unix//run/mastodon-web/web.socket {
header_up X-Forwarded-Proto "https"
}
}
handle_errors {
root * @mastodon@/public
rewrite 500.html
file_server
}
}
http://matrix.ny4.dev:80 {
import default
reverse_proxy /_matrix/* unix//run/matrix-synapse/synapse.sock {
header_up X-Forwarded-Proto "https"
}
reverse_proxy /_synapse/client/* unix//run/matrix-synapse/synapse.sock {
header_up X-Forwarded-Proto "https"
}
reverse_proxy /health unix//run/matrix-synapse/synapse.sock {
header_up X-Forwarded-Proto "https"
}
}
http://syncv3.ny4.dev:80 {
import default
reverse_proxy unix//run/matrix-sliding-sync/sync.sock {
header_up X-Forwarded-Proto "https"
}
}