Ubuntu php5-fpm unix socket
In the default configuration before 12.10 Quantal, PHP FPM is set to listen on TCP port 9000 on address 127.0.0.1. This can be changed in /etc/php5/fpm/pool.d/www.conf
.
Look for the line:
listen = 127.0.0.1:9000
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.