Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

'evening,

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 / http://127.0.0.1:xxxx/ timeout=15 connectiontimeout = 15
ProxyPassReverse / http://127.0.0.1:xxxx/

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?

Cheers

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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 / http://127.0.0.1:xxxx/ timeout=15 connectiontimeout = 15
ProxyPassReverse / http://127.0.0.1:xxxx/
share|improve this answer
    
Worked like a charm, cheers ! –  Proreborn Feb 7 '12 at 8:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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