Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While tomcat6 is starting up all my http requests are retained by the server and sends the response when the server is up.

But when I use an apache2 as a proxy the apache2 responds inmediatly a 503 error when the tomcat is starting. How can I prevent this default behaviour of apache proxy?

My apache virtualhost configuration looks like:

<VirtualHost 0.0.0.0:[PORT]>
  ProxyPreserveHost On
  ProxyVia full

  <proxy>
    Order deny,allow
    Allow from all
  </proxy>

  ProxyPass        /[PATH] http://localhost:8080/[PATH2]
  ProxyPassReverse /[PATH] http://localhost:8080/[PATH2]

</VirtualHost>
share|improve this question

migrated from stackoverflow.com Apr 29 '13 at 12:22

This question came from our site for professional and enthusiast programmers.

I have a possible solution but am not 100% satisfied with it. This seems to work with httpd version 2.2.22.

ProxyRequests Off
ProxyPreserveHost On

<Proxy balancer://mycluster>
    BalancerMember http://localhost:8080
</Proxy>

ProxyPass / balancer://mycluster/ maxattempts=1000
ProxyPassReverse / balancher://mycluster/

The balancer parameter maxattempts sets the number of attempts that the balancer will use while cycling through balancer members and sending them requests while they fail. I'd rather have a solution with a timeout but I haven't found anything that worked other than maxattempts.

share|improve this answer

Your Answer

 
discard

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