Loadbalancing is not well.. loadbalancing

Ok here’s my config slightly changed for security reasons.

http {

 upstream sitemain {
     server 192.168.0.1:80;
     server 192.168.0.2:80;
 }

 server {
     listen 80;
     server_name prod2.site.com;
     location / {
         proxy_pass http://sitemain;
     }
 }

}

If I go to prod2.site.com I get my site, great so it seems to be
working. If I stop the apache server on the 192.168.0.80 machine I get

502 Bad Gateway nginx/0.6.31

Any idea on what I am missing to get it to start reading from
192.168.0.2?

Thanks,
James

On Son 07.09.2008 16:13, James wrote:

Ok here’s my config slightly changed for security reasons.

[snipp]

Any idea on what I am missing to get it to start reading from 192.168.0.2?

http://wiki.codemongers.com/NginxHttpUpstreamModule#upstream

maybe

max_fails=x fail_timeout=xxs;

BR

Aleks

I figured it out user error. ok going to nap now.

James