• 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 PHP7 and php7.0-fpm.sock. How to make it work?

Gabor H

Basic Pleskian
Hi,

I've a dedi server from a large server seller/operator in EU. Installed their Debian 8.5+Plesk 12.5 image.
I'd like to use Nginx+PHP7-FPM on several domains.

What I've set for the domain:
-PHP 7.0.10
-run PHP as FPM application via Nginx
-additional nginx directives (just a part of it regarding FPM)


# PHP handling with FPM
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/www/vhosts/system/mydomain.com/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}


This above code is from a forum, not sure whether it's good or not.
If I search for *fpm.sock on a server, I get this result:


/var/www/vhosts/system/mydomain.com/php-fpm.sock
/run/php5-fpm.sock

If I check the content of the ..../php-fpm.sock ,then it's an empty file.

Anyway, as I read on other sources, shouldn't it be php7.0-fpm.sock file name??

If I check the info.php on a given domain, I get this results:

Server API: FPM/FastCGI
Loaded Configuration File: /opt/plesk/php/7.0/etc/php.ini


So, is my configuration is good for PHP7-FPM, or anything needed to be amended?

Regards,
G
(I'm not a pro sysadmin)
 
In a default Plesk installation there is no need to add additional PHP handling directives to Nginx configuration files/templates. If you omit any additional statements you should be set with PHP 7 FPM running. Adding additional handlers will probably break it.
 
Ok, I removed the additional nginx directives.

So no need to look for php7.0-fpm.sock?


Is the empty php-fpm.sock file all right??
 
Back
Top