mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 22:23:48 +03:00
16724842d9
* Allow specifying multiple `auto_https` options * Implement `auto_https prefer_wildcard` option * Adapt tests, add mock DNS module for config testing * Rebase fix
157 lines
No EOL
2.6 KiB
Text
157 lines
No EOL
2.6 KiB
Text
*.example.com {
|
|
tls foo@example.com {
|
|
dns mock
|
|
}
|
|
|
|
@foo host foo.example.com
|
|
handle @foo {
|
|
respond "Foo!"
|
|
}
|
|
|
|
@bar host bar.example.com
|
|
handle @bar {
|
|
respond "Bar!"
|
|
}
|
|
|
|
# Fallback for otherwise unhandled domains
|
|
handle {
|
|
abort
|
|
}
|
|
}
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":443"
|
|
],
|
|
"routes": [
|
|
{
|
|
"match": [
|
|
{
|
|
"host": [
|
|
"*.example.com"
|
|
]
|
|
}
|
|
],
|
|
"handle": [
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"group": "group3",
|
|
"handle": [
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"body": "Foo!",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"match": [
|
|
{
|
|
"host": [
|
|
"foo.example.com"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"group": "group3",
|
|
"handle": [
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"body": "Bar!",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"match": [
|
|
{
|
|
"host": [
|
|
"bar.example.com"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"group": "group3",
|
|
"handle": [
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"abort": true,
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"terminal": true
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"tls": {
|
|
"automation": {
|
|
"policies": [
|
|
{
|
|
"subjects": [
|
|
"*.example.com"
|
|
],
|
|
"issuers": [
|
|
{
|
|
"challenges": {
|
|
"dns": {
|
|
"provider": {
|
|
"name": "mock"
|
|
}
|
|
}
|
|
},
|
|
"email": "foo@example.com",
|
|
"module": "acme"
|
|
},
|
|
{
|
|
"ca": "https://acme.zerossl.com/v2/DV90",
|
|
"challenges": {
|
|
"dns": {
|
|
"provider": {
|
|
"name": "mock"
|
|
}
|
|
}
|
|
},
|
|
"email": "foo@example.com",
|
|
"module": "acme"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
} |