Update: Do not use this config for php. Instead use php-fpm with xcache or apc.
To configure Nginx to load balance multiple FastCgi servers use this type of configuration:
upstream servercom {
server 127.0.0.1:44440;
server 127.0.0.1:44441;
server 127.0.0.1:44442;
server 127.0.0.1:44443;
server 127.0.0.1:44444;
}location ~ \.php$ {
fastcgi_pass servercom;
fastcgi_index stream.app;
fastcgi_param SCRIPT_FILENAME /var/www/htdocs$fastcgi_script_name;
include /etc/nginx/fastcgi.conf;
}
If you’re using spawn-fcgi from lighttpd consider replacing it with php-fpm.

5 Comments
why php-fpm? it is better ?
Mariuz – it provides much better performance and needs less resources.
Memory management maybe ?
memcaced
is APC better than Xcache?