Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have Ubuntu 11.10 and installed php5-fpm and I want to configure nginx. I want to use unix sockets instead of tcp sockets but I couldn't find the


I have looked also


Where is php5-fpm.sock file? I also tried

locate php5-fpm.sock

but I couldn't find anything. Note: php5-fpm is working . I have started as a service

share|improve this question

1 Answer 1

up vote 31 down vote accepted

In the default configuration before 12.10 Quantal, PHP FPM is set to listen on TCP port 9000 on address This can be changed in /etc/php5/fpm/pool.d/www.conf.

Look for the line listen = and change it to something like listen = /var/run/php5-fpm.sock. After doing so, restart PHP FPM:

sudo /etc/init.d/php5-fpm restart

(note: reload is broken on Oneiric as it sends a HUP signal to php5-fpm which is wrong. It's fixed in Precise by sending USR2, bugreport).

Note: as mentioned by @SpamapS (palingdrome :D), newer releases use Unix sockets by default, not the tcp socket. See this Launchpad comment, it got changed in 12.10 Quantal.

share|improve this answer
Just a note, on precise, php5-fpm actually runs on a socket by default. ;) – SpamapS Apr 27 '12 at 20:40
@SpamapS I don't think so, the changelog does not mention anything. Just to be sure, I checked the php5-fpm .deb package for version 5.3.10-1ubuntu3 and it still contains listen = Perhaps you've previously changed this and upgraded while keeping the conffiles? – Lekensteyn Apr 27 '12 at 21:25
Well no, I submitted the change to Debian, and they merged it, but only to the PHP 5.4 packages. I actually mistakenly set the bug status on , so thanks for the heads up, set it back to Triaged. We'll pick it up on the next merge from Debian. – SpamapS Apr 28 '12 at 0:53
In 14.04, it appears to use a UNIX socket by default, so things must have changed. – eegg Apr 30 '14 at 9:47

Your Answer


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.