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.

Is it possible to configure Apache's mod_proxy to treat 503 errors as 200, and just forward them to the client directly instead of showing its own error page?

share|improve this question
    
Seems like a duplicate of stackoverflow.com/questions/2531895 –  David Balažic Feb 25 at 11:30

1 Answer 1

HTTP status code 503 (Service not available) means apache does not have any threads available to service the request, or there was an internal error causing the thread to malfunction.

This is an unrecoverable (network-level) condition.

Quoting the RFC:

10.5.4 503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.

  Note: The existence of the 503 status code does not imply that a
  server must use it when becoming overloaded. Some servers may wish
  to simply refuse the connection.

Now, this seems to imply that the web server may answer a 503 condition however it sees fit; in the specific case of apache, however, the code is such that the request cannot be satisfied, and the request is not passed on to any code that can service it.

In plain terms: once a request has been handled (or failed to be handled), that's it.

share|improve this answer
    
When Apache is acting as a proxy, 503 can be caused by the backend server it is proxying. I am asking how to make Apache relay that error exactly, instead of generating its own error page. –  ripper234 Mar 19 '12 at 12:53

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.