httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inas inassen <>
Subject RE: [users@httpd] load balancing with Apache for Tomcat workers
Date Mon, 20 Apr 2009 18:08:34 GMT

Hi, this is another example using location directive for balancing applications arounds tomcats:


suppose that you have 3 urls or applications you want to balance using these context path:
app1, app2 and app3

suppose that you have 2 tomcats with ajp on ports 8009 and 8007


so you config is:


<Proxy balancer://tomcats/>

          BalancerMember ajp:// route=tomcat1 loadfactor=1 keepalive=On

          BalancerMember ajp:// route=tomcat2 loadfactor=1 keepalive=On



<Location /tomcats/app1/> 

     ProxyPass balancer://tomcats/app1/ stickysession=jssesionid|JSESSIONID nofailover=On

     ProxyPassReverse balancer://tomcats/app1/ 

     Order Deny,Allow 

     Allow from all 


<Location /tomcats/app2/> 

     ProxyPass balancer://tomcats/app2/ stickysession=jssesionid|JSESSIONID nofailover=On

     ProxyPassReverse balancer://tomcats/app2/ 

     Order Deny,Allow 

     Allow from all 


<Location /tomcats/app3/> 

     ProxyPass balancer://tomcats/app3/ stickysession=jssesionid|JSESSIONID nofailover=On

     ProxyPassReverse balancer://tomcats/app3/ 

     Order Deny,Allow 

     Allow from all 



and to monitor your balancer


<Location /balancer-manager> 

     SetHandler balancer-manager

     AuthType Basic

     AuthName "Cluster manager " 

     AuthUserFile conf/.htpasswd 

     Require valid-user

     Order Deny,Allow 

     Allow from all 



do not forget to add proxy modules



> Date: Fri, 17 Apr 2009 19:12:18 +0200
> From:
> To:
> Subject: Re: [users@httpd] load balancing with Apache for Tomcat workers
> h iroshan wrote:
> > Hi All,
> > 
> > I need to configure mod_proxy_balancer for the load balancing of two tomcat
> > instances running as backed servers. Can anybody give me any advice for how
> > to configure mod_proxy_balancer with above scenario.
> > 
> Yes.
> 1) read the on-line documentation.
> 2) try it out
> 3) come back if you have a problem
> When you do, provide details of what you tried, which Apache, which 
> Tomcat etc..
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:> for more info.
> To unsubscribe, e-mail:
> " from the digest:
> For additional commands, e-mail:

Découvrez tout ce que Windows Live a à vous apporter !
View raw message