caddy-fallback
· 491 B · Text
Raw
{
log {
include http.handlers.reverse_proxy.health_checker.active
level WARN
}
}
:80 {
reverse_proxy localhost:5000 localhost:8080 {
header_up Host {upstream_hostport}
lb_policy first
health_uri /healthy
health_interval 5s
health_timeout 1s
}
}
http://localhost:8080 {
handle /healthy {
respond 200
}
handle {
root * /var/lib/project/wwwroot-fallback
header Cache-Control "no-cache, no-store, must-revalidate"
try_files {path} /index.html
file_server
}
}
| 1 | { |
| 2 | log { |
| 3 | include http.handlers.reverse_proxy.health_checker.active |
| 4 | level WARN |
| 5 | } |
| 6 | } |
| 7 | |
| 8 | :80 { |
| 9 | reverse_proxy localhost:5000 localhost:8080 { |
| 10 | header_up Host {upstream_hostport} |
| 11 | lb_policy first |
| 12 | health_uri /healthy |
| 13 | health_interval 5s |
| 14 | health_timeout 1s |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | http://localhost:8080 { |
| 19 | handle /healthy { |
| 20 | respond 200 |
| 21 | } |
| 22 | handle { |
| 23 | root * /var/lib/project/wwwroot-fallback |
| 24 | header Cache-Control "no-cache, no-store, must-revalidate" |
| 25 | try_files {path} /index.html |
| 26 | file_server |
| 27 | } |
| 28 | } |
| 29 |