Load Balancing PHP

Mickie D nginx-forum at nginx.us
Mon May 31 21:08:32 MSD 2010

Hi there I am trying to load balance my website between 2 servers.

I have set them both up to mirror each other

But they are a forum and using PHP ???

This is the code I have but it will only use one site.

It only uses the local address and will not contact my other PHP server ?

I opened the port 9000 on both machines via iptables ???

upstream newsite {

             listen       80;
             server_name  thissite.com;
             index index.html index.htm index.php;
             root  /data0/htdocs/www/forum;

             location ~ .*\.php?$
                  include fcgi.conf;
                  fastcgi_pass  newsite;
                fastcgi_index index.php;


Thank you very much

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,92738,92738#msg-92738

More information about the nginx mailing list