Passing custom 5XX error pages

Hey there. We are currently using Caddy2 as a reverse proxy to a Tomcat based application; which also travels through an AWS ALB. We have occasions when the tomcat application becomes overload and stops responding and the AWS ALB starts showing a 503 error. From what I have found the AWS ALB responses cannot be customized but it appears if I leverage Caddy I could maybe redirect the error to a static page on the caddy side?

This is more theory crafting at this point. So does anyone have experience with AWS ALB with Caddy acting as a reverse proxy and providing custom error pages?

Yes it’s possible with the handle_response subdirective of reverse_proxy, but there’s currently a bug that prevents it from working correctly so you’ll need to wait until the next release when it gets fixed.

This topic was automatically closed after 30 days. New replies are no longer allowed.