Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Nevermind - I figured out a key configuration I was missing for nginx. –  zeroasterisk Apr 14 '11 at 16:08
1  
PLEASE tell what the heck was the problem... –  Smar Apr 11 '12 at 11:59
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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