mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-28 12:55:57 +03:00
3cfefeb0f7
* httpcaddyfile: First pass at implementing server options * httpcaddyfile: Add listener wrapper support * httpcaddyfile: Sort sbaddrs to make adapt output more deterministic * httpcaddyfile: Add server options adapt tests * httpcaddyfile: Windows line endings lol * caddytest: More windows line endings lol (sorry Matt) * Update caddyconfig/httpcaddyfile/serveroptions.go Co-authored-by: Matt Holt <mholt@users.noreply.github.com> * httpcaddyfile: Reword listener address "matcher" * Apply suggestions from code review Co-authored-by: Matt Holt <mholt@users.noreply.github.com> * httpcaddyfile: Deprecate experimental_http3 option (moved to servers) * httpcaddyfile: Remove validation step, no longer needed Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
83 lines
930 B
Text
83 lines
930 B
Text
{
|
|
servers {
|
|
timeouts {
|
|
idle 90s
|
|
}
|
|
}
|
|
servers :80 {
|
|
timeouts {
|
|
idle 60s
|
|
}
|
|
}
|
|
servers :443 {
|
|
timeouts {
|
|
idle 30s
|
|
}
|
|
}
|
|
}
|
|
|
|
foo.com {
|
|
}
|
|
|
|
http://bar.com {
|
|
}
|
|
|
|
:8080 {
|
|
}
|
|
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":443"
|
|
],
|
|
"idle_timeout": 30000000000,
|
|
"routes": [
|
|
{
|
|
"match": [
|
|
{
|
|
"host": [
|
|
"foo.com"
|
|
]
|
|
}
|
|
],
|
|
"terminal": true
|
|
}
|
|
]
|
|
},
|
|
"srv1": {
|
|
"listen": [
|
|
":80"
|
|
],
|
|
"idle_timeout": 60000000000,
|
|
"routes": [
|
|
{
|
|
"match": [
|
|
{
|
|
"host": [
|
|
"bar.com"
|
|
]
|
|
}
|
|
],
|
|
"terminal": true
|
|
}
|
|
],
|
|
"automatic_https": {
|
|
"skip": [
|
|
"bar.com"
|
|
]
|
|
}
|
|
},
|
|
"srv2": {
|
|
"listen": [
|
|
":8080"
|
|
],
|
|
"idle_timeout": 90000000000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|