I am trying to enable the PHP-FPM status page on a vhost running under Plesk 17 using apache to serve PHP files, but with nginx as a proxy.
I have enabled the status page for php, but I am having trouble with the nginx rules. Here is my additional nginx directives so far
location /fpm-status {
include fastcgi.conf;
fastcgi_pass unix:/var/www/vhosts/system/fifthelement.gr/php-fpm.sock;
access_log off;
allow all;
}
However, this (and some other directives I tried too) does not seem to work since I am getting a “File not found” error while visiting the status page.
Has anyone managed to do this?
Thanks!
2
Answers
the status-page expects the ports 80/443 for apache2, but in combination with Plesk, your apache2 – webserver listens on the ports 7080/7081 and nginx on the ports 80/443.
Pls. use for example
inside your server.conf, httpd.conf and call the page from your SSH – command line with for example “lynx”
For your PHP-FPM – status – page, pls. locate the corresponding “fifthelement.gr.conf” ( example for the usage of the standart PHP5 – Handler from your vendor on your domain: “/etc/php5/fpm/pool.d/fifthelement.gr.conf” ) and define inside:
Afterwards, modify your additional nginx directive to for example:
… and again, you might use “lynx” with the example – command:
The following works for me using PLESK 17 on CentOS 7 (inside Plesk > Websites & Domains > [yourdomainname] > Hosting Settings I have: run PHP as FPM application served by nginx)
Steps to get a working /status page
Create/edit
/var/www/vhosts/system/[yourdomainname]/conf/php.ini
adding the followingInside Plesk > Websites & Domains > [yourdomainname] > Apache & nginx Settings add to Additional nginx directives the following
Reload Plesk PHP configuration
Then you should be able to access http://[yourdomainname]/status and http://[yourdomainname]/status?full