I'm new in apache balancing stuff.

I'm reading the docs in link text

  1. to start where do I put the (I mean, in wich file, vhost? httpd.conf?):

< Proxy balancer://mycluster >
BalancerMember http://192.168.1.50%3A80
BalancerMember http://192.168.1.51%3A80
ProxyPass /test balancer://mycluster/

  1. How do make it work?

Thanks,
Pedro

link|improve this question

feedback

1 Answer

up vote 3 down vote accepted

you put it in your vhost configuration. as below:

<VirtualHost *:80>
  <Proxy balancer://lb>
     BalancerMember http://10.14.10.250 timeout=10s 
     BalancerMember http://10.14.10.251 timeout=10s 
  </Proxy>
  ProxyPass /lb/ balancer://lb

  <Proxy balancer://fo>
     BalancerMember http://10.14.10.250 timeout=10s 
     BalancerMember http://10.14.10.251 timeout=10s status=+H
  </Proxy>
  ProxyPass /fo/ balancer://fo
</VirtualHost>

first one is for 50-50 load balancer, second one - one dedicated master [ preferred server ], another - hot standby to which requests are sent only when master is down.

link|improve this answer
I put that, but no redirections aways the same address, I restart apache without errors! any thing I should do more? – Pedro Aug 27 '09 at 14:00
@pcamacho - i assume you have necessary modules loaded.. mod_proxy_balancer.so, mod_proxy.so, mod_proxy_http.so. make sure it's not your browser's cache playing tricks on you - disable/clean it. – pQd Aug 27 '09 at 14:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.