I want to show that .html page when no proxies are online, currently when this happens I just get a page showing 502 error page, but not the .html page I made.
Error logging is enabled (I can see it on the terminal) but the page is not rendered.
To clarify my post, whether the custom error page is displayed depends on whether Caddy generated the 502.
If the upstream server returned a 502 to Caddy, Caddy will faithfully pass that on to the client - it’s a valid response from upstream, so Caddy won’t “overwrite” that response with a custom error page.
@Whitestrake The server does not return 502 since the sever is offline. Trying to contact it with curl -IL http://localhost:8080 or curl -IL http://localhost:8081 gives me Failed to connect.
So the 502 comes directly from Caddy, I am guessing.
Juuuuust to double check before I send you over to the issues page to file a bug, can you just confirm for me the output of ls -a /home/website/maintenance/maintenance_502.html?