I have an Apache server (2.2.19) and a 4D Webstar server (kinda unknown HTTP server) on the same physical server. Apache only listens the SSL port (443) and is used as a reverse-proxy to 4DW (through a SSL VHost).

Here are the two proxy directives I use :

ProxyPass / timeout=15 connectiontimeout = 15
ProxyPassReverse /

Given the fact that the 4DW server can go offline from time to time, i'd like to have a custom 503 error page to notify the users of the downtime or maintenance of the back-end app. Except Apache redirects everything from /htdocs/ (which is the documentroot) and we need quick access to the errordocument to edit it when needed (thus, an external errordoc is not an option).

Is there any way to force Apache not to proxy a given directory (let's say htdocs/error/), or any solution at all as to using an errordocument outside of the DocumentRoot?



Sure, just exclude it from the ProxyPass rules. These are evaluated in order, so make sure the exclusion is on top:

ErrorDocument 503 /error/503.html
ProxyPass /error/ !
ProxyPass / timeout=15 connectiontimeout = 15
ProxyPassReverse /
  • Worked like a charm, cheers ! – Nicolas BRERO Feb 7 '12 at 8:46
  • 3
    For the sake of searchers, I believe you would actually need the ProxyErrorOverride directive to be in effect. – Cameron Kerr May 14 '15 at 1:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.