improve errors
This commit is contained in:
parent
e59dbe314f
commit
230fb50d3a
1 changed files with 8 additions and 24 deletions
|
@ -6,15 +6,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
(error) {
|
||||
root * /usr/share/caddy
|
||||
rewrite * /error.html
|
||||
templates
|
||||
file_server {
|
||||
status {err.status_code}
|
||||
}
|
||||
}
|
||||
|
||||
*.{$DOMAIN} {
|
||||
tls {
|
||||
dns netcup {
|
||||
|
@ -86,25 +77,18 @@
|
|||
reverse_proxy nginx-mailcow:8090
|
||||
}
|
||||
|
||||
# Fallback for otherwise unhandled domains
|
||||
# Fallback unhandled (sub)domains
|
||||
handle {
|
||||
respond "404 Not Found" 404
|
||||
error 404
|
||||
}
|
||||
|
||||
# handle wrong url pathes
|
||||
handle_errors 404 {
|
||||
#respond "{err.status_code} {err.status_text}" {err.status_code}
|
||||
import error
|
||||
}
|
||||
|
||||
# handle errors of proxy backends are down
|
||||
# handle_errors 502 {
|
||||
# respond "503 Service Unavailable" 503
|
||||
# }
|
||||
|
||||
# every other error
|
||||
handle_errors {
|
||||
import error
|
||||
root * /usr/share/caddy
|
||||
rewrite * /error.html
|
||||
templates
|
||||
file_server {
|
||||
status {err.status_code}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue