I setup a system similar to the tutorial here: http://vladgh.com/blog/varnish-nginx-and-php-533-ubuntu-1010

I'm having issues with nginx connecting to the php5-fpm socket, but from what I can tell the permissions on the socket are correct... can you give me a hand?

2011/04/14 15:31:24 [crit] 13147#0: *1 connect() to unix:/var/run/php5-fpm.socket failed (2: No such file or directory) while connecting to upstream, client: 74.129.***.***, server: app.mydomain.com, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.socket:", host: "app.mydomain.com"

root@app0:/# ls -l /var/run/php5-fpm.socket
srw-rw-rw- 1 www-data www-data 0 Apr 14 15:51 /var/run/php5-fpm.socket

root@app0:/# ps aux | grep fpm
root     13315  0.0  1.9 168276  4948 ?        Ss   15:51   0:00 /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/main.conf
www-data 13316  0.0  2.1 168672  5492 ?        S    15:51   0:00 /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/main.conf

root@app0:/# ps aux | grep nginx
root     13341  0.0  0.4  33200  1036 ?        Ss   15:52   0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf
www-data 13342  0.0  0.7  34008  1880 ?        S    15:52   0:00 nginx: worker process
www-data 13344  0.0  0.6  33680  1628 ?        S    15:52   0:00 nginx: worker process

I've got a few customizations to the configurations you provide, but it's largely the same. Want to suggest a troubleshooting avenue?

link|improve this question

50% accept rate
Nevermind - I figured out a key configuration I was missing for nginx. – zeroasterisk Apr 14 '11 at 16:08
PLEASE tell what the heck was the problem... – Smar Apr 11 at 11:59
feedback

1 Answer

This is a gotcha that many tutorials omit. the php user should be the owner of the socket. So you want to make sure that

chown www-data:www-data /var/run/php5-fpm.socket
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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