| 1 |
# example from https://github.com/caddyserver/caddy/issues/7559 |
| 2 |
*.test.local { |
| 3 |
tls { |
| 4 |
get_certificate http http://cert-server:9000/certs |
| 5 |
} |
| 6 |
respond "wildcard" |
| 7 |
} |
| 8 |
|
| 9 |
# certificate for this subdomain is covered by wildcard above |
| 10 |
subdomain.test.local { |
| 11 |
respond "subdomain" |
| 12 |
} |
| 13 |
|
| 14 |
---------- |
| 15 |
{ |
| 16 |
"apps": { |
| 17 |
"http": { |
| 18 |
"servers": { |
| 19 |
"srv0": { |
| 20 |
"listen": [ |
| 21 |
":443" |
| 22 |
], |
| 23 |
"routes": [ |
| 24 |
{ |
| 25 |
"match": [ |
| 26 |
{ |
| 27 |
"host": [ |
| 28 |
"subdomain.test.local" |
| 29 |
] |
| 30 |
} |
| 31 |
], |
| 32 |
"handle": [ |
| 33 |
{ |
| 34 |
"handler": "subroute", |
| 35 |
"routes": [ |
| 36 |
{ |
| 37 |
"handle": [ |
| 38 |
{ |
| 39 |
"body": "subdomain", |
| 40 |
"handler": "static_response" |
| 41 |
} |
| 42 |
] |
| 43 |
} |
| 44 |
] |
| 45 |
} |
| 46 |
], |
| 47 |
"terminal": true |
| 48 |
}, |
| 49 |
{ |
| 50 |
"match": [ |
| 51 |
{ |
| 52 |
"host": [ |
| 53 |
"*.test.local" |
| 54 |
] |
| 55 |
} |
| 56 |
], |
| 57 |
"handle": [ |
| 58 |
{ |
| 59 |
"handler": "subroute", |
| 60 |
"routes": [ |
| 61 |
{ |
| 62 |
"handle": [ |
| 63 |
{ |
| 64 |
"body": "wildcard", |
| 65 |
"handler": "static_response" |
| 66 |
} |
| 67 |
] |
| 68 |
} |
| 69 |
] |
| 70 |
} |
| 71 |
], |
| 72 |
"terminal": true |
| 73 |
} |
| 74 |
] |
| 75 |
} |
| 76 |
} |
| 77 |
}, |
| 78 |
"tls": { |
| 79 |
"automation": { |
| 80 |
"policies": [ |
| 81 |
{ |
| 82 |
"subjects": [ |
| 83 |
"*.test.local" |
| 84 |
], |
| 85 |
"get_certificate": [ |
| 86 |
{ |
| 87 |
"url": "http://cert-server:9000/certs", |
| 88 |
"via": "http" |
| 89 |
} |
| 90 |
] |
| 91 |
} |
| 92 |
] |
| 93 |
} |
| 94 |
} |
| 95 |
} |
| 96 |
} |