Created
March 14, 2022 17:23
-
-
Save gilbitron/1e067d6247a8a8cb2a439a30c4087329 to your computer and use it in GitHub Desktop.
Caddy wildcard + custom domains
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
on_demand_tls { | |
ask http://12.34.56.78/caddy-check | |
} | |
email [email protected] | |
} | |
*.example.com { | |
tls ...custom certs... | |
reverse_proxy http://12.34.56.78 | |
} | |
:80 { | |
redir https://{host}{uri} | |
} | |
:443 { | |
tls { | |
on_demand | |
issuer zerossl ... | |
issuer acme | |
} | |
reverse_proxy http://12.34.56.78 { | |
header_up Host {host} | |
header_up X-Forwarded-Port {server_port} | |
header_up X-Forwarded-For {remote} | |
header_up X-Forwarded-Proto {scheme} | |
health_timeout 5s | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment