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://tomcat-srv1.com:8007 route=tomcat1 loadfactor=1 keepalive=On BalancerMember ajp://tomcat-srv2.com:8009 route=tomcat2 loadfactor=1 keepalive=On </Proxy> <Location /tomcats/app1/> ProxyPass balancer://tomcats/app1/ stickysession=jssesionid|JSESSIONID nofailover=On lbmethod=byrequests ProxyPassReverse balancer://tomcats/app1/ Order Deny,Allow Allow from all </Location> <Location /tomcats/app2/> ProxyPass balancer://tomcats/app2/ stickysession=jssesionid|JSESSIONID nofailover=On lbmethod=byrequests ProxyPassReverse balancer://tomcats/app2/ Order Deny,Allow Allow from all </Location> <Location /tomcats/app3/> ProxyPass balancer://tomcats/app3/ stickysession=jssesionid|JSESSIONID nofailover=On lbmethod=byrequests ProxyPassReverse balancer://tomcats/app3/ Order Deny,Allow Allow from all </Location> 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 </Location> do not forget to add proxy modules Inas. > Date: Fri, 17 Apr 2009 19:12:18 +0200 > From: aw@xxxxxxxxxx > To: users@xxxxxxxxxxxxxxxx > 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. > http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html > 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:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > Découvrez tout ce que Windows Live a à vous apporter ! |