• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Thoroughly confused by PHP-FPM, Nginx, etc.

pDecrette

New Pleskian
Is anyone else thoroughly confused by the configuration of PHP-FPM, Nginx, FastCGI, etc.? This is what I have been able to determine and not determine...

** NGINX **
Error log: /var/log/nginx/error.log
NGINX configuration file: /etc/nginx/nginx.conf
Domain specific NGINX: /var/www/vhosts/system/domain.tld/conf/nginx.conf

Gets overwritten; I guess you make these changes somewhere in Plesk? For now, I just use the master /etc/nginx/nginx.conf which DOES seem to work. I have lots of customizations in here, most commented.
Restart the service: through Plesk, or /bin/systemctl restart nginx.service or service nginx restart.


** PHP-FPM **
Error log = /var/log/plesk-php56-fpm/error.log
And /var/log/php-fpm/error.log
PHP-FPM configuration file: /opt/plesk/php/5.6/etc/php-fpm.conf
Gets overwritten when you make changes in Plesk.

Another PHP-FPM configuration file (that I don't think is used, but could be): /etc/php-fpm.d/www.conf

Another PHP-FPM configuration file/etc/php-fpm.conf:

Domain specific PHP-FPM: /var/www/vhosts/system/domain.tld/conf/php.ini

Note: FPM uses php.ini syntax for its configuration file.
Make changes in /var/www/vhosts/system/domain.tld/conf/php.ini, then run this:
/usr/local/psa/bin/php_settings -u
It will add your custom settings to the bottom of /opt/plesk/php/5.6/etc/php-fpm.d/domain.tld.conf
Then restart php-fpm service: Through Plesk, or /bin/systemctl restart plesk-php56-fpm.service or service plesk-php56-fpm restart (/bin/systemctl restart php-fpm.service or service php-fpm restart are for the base PHP's fpm service which we do not use.)

** PHP **
Error log = /var/www/vhosts/system/domain.tld/logs/error_log
and /var/www/vhosts/system/domain.tld/logs/proxy_error_log
PHP configuration file (for PHP 5.6): /opt/plesk/php/5.6/etc/php.ini
Domain specific PHP file: /var/www/vhosts/system/domain.tld/etc/php.ini
Using the PHP Additional Directives in Plesk, plesk overwrite this file.
Don't change this file manually, but you can check things there after making changes. Plesk also writes some values to the bottom of /opt/plesk/php/5.6/etc/php-fpm.d/domain.tld.conf
Restart the service: through Plesk, or /bin/systemctl restart httpd.service or service httpd restart


** FastCGI **
Error log = /var/www/vhosts/system/domain.tld/logs/proxy_error_log
Config file 1: /etc/httpd/conf.d/fcgid.conf
Another: /etc/psa/php_versions.d/plesk-php56-fastcgi.conf
Another: /etc/nginx/fastcgi.conf
(There are more. I really don't know how these are edited or work.)

Is there any comprehensive documentation on any of these configuration files, when they are used, how to modify them, and so on? 4 different configuration files for JUST php-fpm seems... um, confusing. We are trying to track down the cause of "connect() failed (111: Connection refused) while connecting to upstream..." errors.

If anyone can shed light on any of this for me, it would be greatly appreciated.
 
Hi pDecrette,

you might be interested in:

Customizing PHP Configuration ( Plesk 12.5 online documentation )

and it's schemata:
69697.gif
As you can see, there is a hierarchy, which follows the order "last command = final configuration".


Gets overwritten; I guess you make these changes somewhere in Plesk? For now, I just use the master /etc/nginx/nginx.conf which DOES seem to work. I have lots of customizations in here, most commented.
Again, there is a hirarchy for webserver - configuration files:

 
Back
Top