How To Make php-fpm Listen On Both Tcp And Unix Socket?
I need to make php-fpm listeing on both tcp/unix socket, and this is how it done.
(this was not pretty workarround i guess, but it work 😀 )
first  download php rpm source
$ wget http://centos.alt.ru/pub/php-fpm/5.3.3-2/SRPMS/php-5.3.3-2.el5.src.rpm
Compile and install
$ rpmbuild --rebuild php-5.3.3-2.el5.src.rpm $ sudo rpm -Uvh /path/to/RPMS/php-*
Configuring the default php-fpm for using tcp socket
Edit www.conf
$ sudo vi /etc/php-fpm.d/www.conf
Find line containing
listen = 127.0.0.1:9000
We can make it listening to port what ever we desire, ie 9001 etc
Start php-fpm first instance
$ sudo service php-fpm start
Configuring php-fpm for using unix socket
$ sudo cp /etc/php-fpm.conf /etc/php-fpm2.conf $ sudo cp -rp /etc/php-fpm.d /etc/php-fpm2.d
Edit /etc/php-fpm2.conf
include=/etc/php-fpm2.d/*.conf pid = /var/run/php-fpm/php-fpm2.pid error_log = /var/log/php-fpm/error2.log
Edit /etc/php-fpm2.d/www.conf
listen = /tmp/php-fpm.sock php_admin_value[error_log] = /var/log/php-fpm/www-error2.log