It’s something that nginx offers, in the form of:
Furthermore, it is possible to change the response code to another using the “
=
response
” syntax, for example:
`error_page 404 =200 /empty.gif;
If that syntax worked with Caddy, I would expect something like this to work:
server.example.com {
reverse_proxy * 192.168.0.13:1234
error_page 502 =503 maintenance.html
}
or perhaps
server.example.com {
reverse_proxy * 192.168.0.13:1234 {
error_page 502 =503 maintentance.html
}
}
Or some other equivalent syntax. I just want Caddy configured to never return 502 for this server, only 503.