mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-13 14:33:43 +08:00
59 lines
913 B
Plaintext
59 lines
913 B
Plaintext
|
http://a.caddy.localhost {
|
||
|
respond /version 200 {
|
||
|
body "hello from localhost"
|
||
|
}
|
||
|
}
|
||
|
----------
|
||
|
{
|
||
|
"apps": {
|
||
|
"http": {
|
||
|
"servers": {
|
||
|
"srv0": {
|
||
|
"listen": [
|
||
|
":80"
|
||
|
],
|
||
|
"routes": [
|
||
|
{
|
||
|
"match": [
|
||
|
{
|
||
|
"host": [
|
||
|
"a.caddy.localhost"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"handle": [
|
||
|
{
|
||
|
"handler": "subroute",
|
||
|
"routes": [
|
||
|
{
|
||
|
"handle": [
|
||
|
{
|
||
|
"body": "hello from localhost",
|
||
|
"handler": "static_response",
|
||
|
"status_code": 200
|
||
|
}
|
||
|
],
|
||
|
"match": [
|
||
|
{
|
||
|
"path": [
|
||
|
"/version"
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"terminal": true
|
||
|
}
|
||
|
],
|
||
|
"automatic_https": {
|
||
|
"skip": [
|
||
|
"a.caddy.localhost"
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|