Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm new in apache balancing stuff.

I'm reading the docs in link text

<Proxy balancer://mycluster >
    BalancerMember http://192.168.1.50:80
    BalancerMember http://192.168.1.51:80
</Proxy>

ProxyPass /test balancer://mycluster/ 
  1. to start where do I put the above configuration (I mean, in wich file, vhost? httpd.conf?):
  2. How do make it work?

Thanks,
Pedro

share|improve this question

1 Answer 1

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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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