Correct upstream configuration for php-fpm?

this is what i have:

upstream handlephp
{
server 127.0.0.1:9000;
server 192.168.1.3:9000;
}

server
{
location ~ .php$
{
include fcgi;
fastcgi_pass http://handlephp;
}
}

This gives configuration error of: invalid upstream in host, on the
fastcgi_pass line. When I change it to: proxy_pass http://handlephp, I
don’t get the configuration error but the website gives a “bad gateway
error”. I tried it with the single local entry only (127.0.0.1) and it
didn’t help. Is my syntax wrong? Am I missing any directives?

Thanks

On Sunday, September 13, 2009 at 18:00:15, Ilan B. wrote:

IB> fastcgi_pass http://handlephp;

  • fastcgi_pass http://handlephp;
    
  • fastcgi_pass handlephp;
    

IB> This gives configuration error of: invalid upstream in host,
IB> on the fastcgi_pass line. When I change it to: proxy_pass
IB> http://handlephp, I don’t get the configuration error but the
IB> website gives a “bad gateway error”. I tried it with the single
IB> local entry only (127.0.0.1) and it didn’t help. Is my syntax
IB> wrong?

http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_pass