• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question How to specify PHP-FPM.SOCK file

Zoo3

Regular Pleskian
Please tell me how to specify PHP-FPM.SOCK file.

In the config file in /opt/plesk/php/7.1/etc/php-fpm.d:
For example, it is set as follows.

listen = /var/run/php-fpm/php-fpm.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660​

nginx.conf:
upstream php-handler {
server unix:/var/run/php-fpm/php-fpm.sock;
}​

If I set this up, I get a 502 Bad Gateway error.
Even if I set "server 127.0.0.1:9000" "listen=127.0.0.1:9000" it is an error.

How should I specify in Plesk?


My emvironment:
Plesk 17.0.17, CentOS 7.3, PHP 7.1.10, nginx 1.11.10.
 
Last edited:
Could you please explain why do you need to specify this? Actually php-fpm.sock files already exist for your vhosts as /var/www/vhosts/system/domain.com/php-fpm.sock
 
Could you please explain why do you need to specify this? Actually php-fpm.sock files already exist for your vhosts as /var/www/vhosts/system/domain.com/php-fpm.sock
Thank you for reply.
I'm using nextcloud. When I reviewed the settings, I noticed that php-fpm.sock was not in /var/run/php-fpm/.
Because I'm still running Nextcloud, I think that it is not a fatal problem.

I specify "/var/www/vhosts/system/domain.com/php-fpm.sock" in nginx.conf.
Is this correct?
 
Back
Top