{
"apps": {
"http": {
"servers": {
"example": {
"listen": [
":80",
":443"
],
"routes": [
{
"match": [
{
"host": [
"mydomain.co.uk"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [
{
"dial": "localhost:8080"
}
]
}
]
}
]
}
]
}
]
}
}
},
"tls": {
"automation": {
"policies": [
{
"subjects": [
"mydomain.co.uk"
],
"issuer": {
"challenges": {
"dns": {
"provider": {
"api_token": "<api token goes here>",
"name": "cloudflare"
}
}
},
"email": "<email address used for cloudflare account>",
"module": "acme"
}
}
]
}
}
}
}
Last active
March 25, 2024 22:58
-
-
Save fizzyade/8b7978c9001c9dde987c16bdfa322a01 to your computer and use it in GitHub Desktop.
An example of a Caddy 2 JSON configuration file for a reverse proxy that uses the Cloudflare DNS module
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
json format is not easy for manual.
so here is a caddyfile: