[php] How to find my php-fpm.sock?

I'm running Wordpress with: Nginx + PHP-FPM + APC + W3 Total Cache + PageSpeed.

After 3 days researching and configuring, I succeeded to make it work. I configured PHP-FPM to run via But now I want to configure via Socket.

The problem is that I can't find the socket path in my server. I just found /var/run/php-fpm/php-fpm.pid, but php-fpm.sock was not there.

Running whereis php-fpm the output is:

php-fpm: /usr/sbin/php-fpm /etc/php-fpm.d /etc/php-fpm.conf /usr/share/man/man8/php-fpm.8.gz

But there isn't any php-fpm.sock there.

How can I find php-fpm.sock?

My specs:

  • Amazon Micro EC2
  • Linux version 3.4.48-45.46.amzn1.x86_64 Red Hat 4.6.3-2 (I think it's based on CentOS 5)
  • PHP 5.3.26 (fpm-fcgi)

This question is related to php linux sockets amazon-web-services nginx

The answer is

I know this is old questions but since I too have the same problem just now and found out the answer, thought I might share it. The problem was due to configuration at pood.d/ directory.




listen =

change to

listen = /var/run/php5-fpm.sock

Restart both nginx and php5-fpm service afterwards and check if php5-fpm.sock already created.

Similar questions with php tag:

Similar questions with linux tag:

Similar questions with sockets tag:

Similar questions with amazon-web-services tag:

Similar questions with nginx tag: