httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Load balance three tomcats behind apache
Date Thu, 20 May 2010 12:08:38 GMT
On Thu, May 20, 2010 at 12:58 PM, Mark Watts <m.watts@eris.qinetiq.com> wrote:
> On Thu, 2010-05-20 at 16:37 +0500, Nasir Zia wrote:
>> hi,
>>
>> how can i configure a load balancer with one apache and three tomcats
>> running behind apache.
>>
>> Apache version 2.2.15
>> tomcat version 6.0.26
>>
>> Nasir
>
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_http_module            modules/mod_proxy_http.so
> LoadModule proxy_ajp_module             modules/mod_proxy_ajp.so
> LoadModule proxy_balancer_module        modules/mod_proxy_balancer.so
>
> <Proxy balancer://localhost>
>        BalancerMember ajp://server1:8009/ loadfactor=1 timeout=30
>        BalancerMember ajp://server2:8009/ loadfactor=1 timeout=30
>        BalancerMember ajp://server3:8009/ loadfactor=1 timeout=30
>        ProxySet lbmethod=byrequests
> </Proxy>
>
> <VirtualHost 0.0.0.0:80>
>        ServerName www.example.com
>        ProxyPass /app/ balancer://localhost/app1/
>        ProxyPassReverse /app/ balancer://localhost/app1/
>
>        # Logging and other directives go here>
> </VirtualHost>
>
>

Just FYI, the balancer name (in this case 'localhost') is just a
string, it doesn't have to correspond to a hostname.

Cheers

Tom

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message