32 lines
586 B
Caddyfile
32 lines
586 B
Caddyfile
future.porn {
|
|
reverse_proxy server:5000
|
|
|
|
handle_errors {
|
|
root * /srv/errors
|
|
|
|
@401 expression `{http.error.status_code} == 401`
|
|
handle @401 {
|
|
rewrite * /401.html
|
|
file_server
|
|
}
|
|
|
|
@403 expression `{http.error.status_code} == 403`
|
|
handle @403 {
|
|
rewrite * /403.html
|
|
file_server
|
|
}
|
|
|
|
@404 expression `{http.error.status_code} == 404`
|
|
handle @404 {
|
|
rewrite * /404.html
|
|
file_server
|
|
}
|
|
|
|
@5xx expression `{http.error.status_code} >= 500`
|
|
handle @5xx {
|
|
rewrite * /500.html
|
|
file_server
|
|
}
|
|
}
|
|
}
|