mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-15 15:26:27 +03:00
102 lines
1.5 KiB
Text
102 lines
1.5 KiB
Text
|
subdomain.example.com {
|
||
|
respond "Subdomain!"
|
||
|
}
|
||
|
|
||
|
*.example.com {
|
||
|
tls cert.pem key.pem
|
||
|
respond "Wildcard!"
|
||
|
}
|
||
|
----------
|
||
|
{
|
||
|
"apps": {
|
||
|
"http": {
|
||
|
"servers": {
|
||
|
"srv0": {
|
||
|
"listen": [
|
||
|
":443"
|
||
|
],
|
||
|
"routes": [
|
||
|
{
|
||
|
"match": [
|
||
|
{
|
||
|
"host": [
|
||
|
"subdomain.example.com"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"handle": [
|
||
|
{
|
||
|
"handler": "subroute",
|
||
|
"routes": [
|
||
|
{
|
||
|
"handle": [
|
||
|
{
|
||
|
"body": "Subdomain!",
|
||
|
"handler": "static_response"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"terminal": true
|
||
|
},
|
||
|
{
|
||
|
"match": [
|
||
|
{
|
||
|
"host": [
|
||
|
"*.example.com"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"handle": [
|
||
|
{
|
||
|
"handler": "subroute",
|
||
|
"routes": [
|
||
|
{
|
||
|
"handle": [
|
||
|
{
|
||
|
"body": "Wildcard!",
|
||
|
"handler": "static_response"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"terminal": true
|
||
|
}
|
||
|
],
|
||
|
"tls_connection_policies": [
|
||
|
{
|
||
|
"match": {
|
||
|
"sni": [
|
||
|
"*.example.com"
|
||
|
]
|
||
|
},
|
||
|
"certificate_selection": {
|
||
|
"any_tag": [
|
||
|
"cert0"
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
{}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"tls": {
|
||
|
"certificates": {
|
||
|
"load_files": [
|
||
|
{
|
||
|
"certificate": "cert.pem",
|
||
|
"key": "key.pem",
|
||
|
"tags": [
|
||
|
"cert0"
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|