httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carter, Isaac" <>
Subject RE: [users@httpd] Apache + 2 tomcat appserver failover configuration
Date Fri, 31 Aug 2012 03:53:02 GMT

Answer to #1...
        I do not believe that mod_proxy uses the file.  I'm currently using
mod_proxy and mod_ajp successfully without using the file.  I'm using
them in place of mod_jk, which does use the file.

Answer to #2...
        Have you tried looking into mod_rewrite any?  You may need to redirect the request
to Tomcat6B once A has failed.  This should be made possible
        Through mod_rewrite and setting up the rewrite conditions and rules in the httpd.conf.


-----Original Message-----
From: Ed Young []
Sent: Thursday, August 30, 2012 9:14 PM
Subject: [users@httpd] Apache + 2 tomcat appserver failover configuration

I've set up a load balancing configuration based on an Apache server
and two tomcats Tomcat6A, and Tomcat6B. I'm trying to set it up so
that Tomcat6B is a failover server, so if Tomcat6A goes down, Tomcat6B
will handle all subsequent requests.

I have two questions:
1. Does mod_proxy use the file? It doesn't seem to
make any difference what is in
2. How can I set this system up for a failover configuration?

This is killing me. I'm using mod_proxy, mod_proxy_balancer, mod_ajp.

In the load balancer howto, it specifies the configuration I want by
using the file, but that file seems to have no
effect on the system behavior. I wonder if it was written before
mod_proxy became a replacement for mod_jk.

No matter what I do, if I shut down Tomcat6A, there is no failover
behavior. Existing Tomcat6A request fail (expected) and new requests
fail with 404. Only the existing Tomcat6B request continue.

Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/"
<Proxy balancer://cluster>
        BalancerMember ajp:// route=Tomcat6A
        BalancerMember ajp:// route=Tomcat6B
        ProxySet stickysession=ROUTEID
ProxyPass / balancer://cluster/
ProxyPassReverse / balancer://cluster/

The configuration above alternates between each tomcat as request come
in, which is not what I want.

I created a file in /etc/httpd/conf/, based on the
loadBalance Howto, but it does not seem to have any effect on the
system. Does mod_proxy use it?


# The load balancer worker balance1 will distribute
# load to the members Tomcat6A, Tomcat6B
worker.balance1.balance_workers=Tomcat6A, Tomcat6B

worker.Tomcat6A.type = ajp13 =
worker.Tomcat6A.port = 8009
#worker.Tomcat6A.lbfactor = 10

worker.Tomcat6B.type = ajp13 =
worker.Tomcat6B.port = 8009

Each tomcat server.xml has
 <Engine name="Standalone" defaultHost="localhost" jvmRoute="Tomcat6A">
 <Engine name="Standalone" defaultHost="localhost" jvmRoute="Tomcat6B">

To unsubscribe, e-mail:
For additional commands, e-mail:

This e-mail and any attachments are intended only for the use of the addressee(s) named herein
and may contain proprietary information. If you are not the intended recipient of this e-mail
or believe that you received this email in error, please take immediate action to notify the
sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments
from your computer; and do not disseminate, distribute, use, or copy this message and any

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message