4

I'm going off of section 3.1 of http://www.howtoforge.com/php-fpm-nginx-security-in-shared-hosting-environments-debian-ubuntu .

I have created a directory in /var/run which www-data:www-data has rwxrwx permissions on.

My new pool config file consists of: http://pastebin.com/nmrJkMkz

However, upon restart of php5-fpm, /var/run/php5-fpm/domain.com.sock is not created as specified in the conffile. Nothing is in the error log of PHP5-FPM.

Any ideas as to why this may be occurring?

2
  • I would change the group of the /var/run/php5-fpm directory to client, which is the group php5-fpm uses. PHP5-FPM might have some restrictions about ownership of the directories for sockets. – Tero Kilkanen Jun 27 '14 at 10:08
  • Actually not a bad theory now that I think about it. Guess I had it in my head that FPM would create the sockets as www-data but change ownership to the user/group and spawn the process for the pool. I'll give that a shot. – Josh H. Jun 28 '14 at 11:20
2

I got the same error. Perhaps you forgot the .conf extension as i did.

So, try to rename your config file domain like this:

#File in /etc/php5/fpm/pool.d/

domain.com.conf

I hopê this help you !

1
  • Ahrr!!! Crap. I got exactly the same problem. Thanks for pointing to this! – Viktor S. Apr 4 '18 at 9:46
0

PHP-FPM will only create the file if it's defined within the /etc/php-fpm.d/www.conf file

To solve the problem add this to the file

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

Make sure to also set these two

listen.owner = nginx listen.group = nginx

(Nginx or Apache default user)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.