I have running apache web (httpd) and application(tomcat) in the same host. And I would to auto point to a sitedown.html page whenever application(tomcat) server is not responding (incase of HTTP status code 502 and 503).
I saw below example on the few forum and would like to understand how does it works.
Hi Gheist, Thanks for your answer. I would like to understand using above example how can I auto point to a sitedown.html page whenever application(tomcat) server is not responding (incase of HTTP status code 502 and 503).
Your syntax is correct with ErrorDocument-s
Missing Piece is ProxyErrorOverride to capture 404 in apache
And I suggest to reorganize httpd.conf so that you can host multiple sites with different error handling.
beer9
ASKER
Hi Gheist, I would like to understand more when you say "Basically proxy-passed requests are immune to rewrite by default"
so in DOCUMENT_ROOT folder if I have maintenance_mode_myapp file then any one accessing www.mycompany.com/apps/myapp then he would be getting/redirecting www.mycompany.com/sitedown.html page? Please help me understand if it doesn't works then why? Thanks in advance.
gheist
You need to set
ProxyErrorOverride On
So that apache handles errors of mod_proxy.
Basically proxy-passed requests are immune to rewrite by default