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>


-- 
Mark Watts BSc RHCE MBCS
Senior Systems Engineer, Managed Services Manpower
www.QinetiQ.com
QinetiQ - Delivering customer-focused solutions
GPG Key: http://www.linux-corner.info/mwatts.gpg

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to