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.

Novice here, so please be gentle :)

I'm installing Nginx with php5-fpm on a Ubuntu 10.04 box according to this guide by ArsTechnica: http://arstechnica.com/information-technology/2012/12/web-served-part-3-bolting-on-php-with-php-fpm/

Nginx is up and running, it serves static html fine. I'm running into problems with getting php5-fpm to work. I'm getting a 502 bad gateway error, when I look into the log it says:

connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream

When I go back through the guide it mentions to configure /etc/php5/fpm/pool.d/www.conf. I don't seem to have a pool.d directory at all, and no file named www.conf.

I do have php-fpm.conf in the /etc/php5/fpm directory that has similar settings to the ones described in the guide (listen = /var/run/php5-fpm.soc, etc). Can I use this file or has something gone wrong in installing php5-fpm?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

pool.d/www.conf is most likely just a file that gets included by php-fpm.conf. so you can either create that file and include it in php-fpm.conf or just put its content into the php-fpm.conf directly.

if you have the lsten directive in php-fpm.conf the socket file should be created once php-fpm gets started.

share|improve this answer
    
When I look at /var/run it has a file named php5-fpm.soc (.soc, not .sock). Can this be the source of the problem? I can't figure out wich file references .sock instead of .soc? –  Squrler Feb 21 '13 at 15:01
    
is that maybe just a typo? usually its .sock, not sic, so try changing your php conf to sock –  mauro.stettler Feb 21 '13 at 18:49
    
Yup, turned out it was; once I corrected php5-fpm.conf with the added k everything worked. Thanks so much!! –  Squrler Feb 21 '13 at 23:29

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.