1 Answer
  • 1
name Punditsdkoslkdosdkoskdo

Ubuntu php5-fpm unix socket

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,

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.

  • 0
Reply Report