FPM status page not working

edvanleeuwen

Verified User
Joined
Nov 18, 2013
Messages
155
I am trying to get the status page working in php-fpm55 with apache2. I have uncommented the pm.status variable and set it to /status. Furthermore, I have added the following to my virtual hosts config in Custom HTTPD configuration:

<FilesMatch "^ping|status$">
SetHandler php-script
</FilesMatch>

After that, I restarted httpd and php-fpm55. Trying to access the status page, gives me a 404 error.

Am I missing something?
 
Thanks, Martynas. But that one is for Nginx. What would be the syntax for Apache?
 
Code:
<FilesMatch "^ping|status$">
SetHandler "proxy:unix:/usr/local/php[B]56[/B]/sockets/[B]webapps[/B].sock|fcgi://localhost"
</FilesMatch>

Just change the text in bold to fit your own needs :)
 
Thanks again, Martynas. Still, it is not working for me. Steps I carried out:

Chose Custom HTTPD Confuigurations.
Chose the domain I would like to stat, referees.eu.
Inserted the following (I am using php55):
<FilesMatch "^ping|status$">
SetHandler "proxy:unix:/usr/local/php55/sockets/covst.sock|fcgi://localhost"
</FilesMatch>
Verified that the httpd.conf consists of the SetHandler; the AddHandler is added automatically.
Restarted httpd and php-fpm55.
Browsed to http://referees.eu/status
Got a 404.

I also verified that status.html is available:
In /usr/local/php55
./php/php/fpm/status.html
./php/fpm/status.html

I am sorry if I am missing something obvious.
 
Where did you enable the status page in FPM? You should have done that in per-user custom PHP-FPM configuration (reachable on DA admin level, "Custom HTTPD Configurations" URL).
 
Originally, I added it to the global php-fpm.conf in /usr/local/php55/etc. Per your advice I added it to the custom 1 section of the corresponding domain. No luck. Tried to enter it in custom 2, but no luck with that either.
 
Please PM me with the details, I'll check what's configured incorrectly there.
 
The problem was caused by a .htaccess file in public_html folder, so that's why /stats and /ping did not work there. Disabling RewriteEngine for /stats and /ping did the trick:
Code:
<FilesMatch "^ping|status$">
   RewriteEngine Off
   SetHandler "proxy:unix:/usr/local/php55/sockets/covst.sock|fcgi://localhost"
</FilesMatch>
 
Code:
<FilesMatch "^ping|status$">
SetHandler "proxy:unix:/usr/local/php[B]56[/B]/sockets/[B]webapps[/B].sock|fcgi://localhost"
</FilesMatch>

Just change the text in bold to fit your own needs :)

Is this still correct way to enable status page in PHP-FPM when not running nginx?

What I am trying to figure out, is how to enable the PHP-FPM status page to be viewable only on server hostname, and not on users own domains?

Then I can't do in in "Custom HTTPD Configurations", because server hostname is not listed there.
 
Code:
I almost figured it out. I managed to get it working for a selected user, but what I wanted was to get it working on server.hostname.com/fpmstatus, please share it if you know how to.

Here is how I got it working on a user:

On admin level "Custom HTTPD Configurations" click the "php-pfm" link and add this to :CUSTOM2
Code:
pm.status_path = /fpmstatus

Then on admin level "Custom HTTPD Configurations" click on a domain for a user that you want to view status page for. Then add this in "Httpd.conf Customization for yourdomain.com" (replace "USER" with the actual username and replace 111.111.111.111 with your computer ip address):
Code:
<LocationMatch "/fpmstatus">
Require ip 111.111.111.111
SetHandler "proxy:unix:/usr/local/php70/sockets/[B]USER[/B].sock|fcgi://localhost"
</LocationMatch>

Please share if you know how to do this for server hostname and to get a status page with status for all users/domains on the server. I don't know how because server hostname is not available in "Custom HTTPD Configurations".
 
Last edited:
But the php-fpm status page do not show any urls like apache status page does. Is it possible to change settings to get urls on php pages to show up on php-fpm status page? If not that is a big drawback for me when changing from mod_php to php-fpm.

Edit: I am confused. It seems that I still see the urls to php page request on the apache status page. I believed that php-fpm would handle all php request and apache only handle static files? Anyway, I don't need to see the urls in php-fpm status page as long as I can see the urls also on request to php pages in apache status page. So that is solved, but makes me confused, again. :)
 
Last edited:
I have problem with config for php-fpm70 status page (apache 2.4)
add into fpm70 for this subdomain
in |Custom2| section -> pm.status_path = /status
in httpd conf for subdomain
<FilesMatch "^ping|status$">
RewriteEngine Off
SetHandler "proxy:unix:/usr/local/php70/sockets/szukamprac.sock|fcgi://localhost"
</FilesMatch>
Rewrite confs and when go to blog.szukampracy.pl/status have File not found.

add this
<FilesMatch "^ping|status$">
SetHandler "proxy:unix:/usr/local/php70/sockets/szukamprac.sock|fcgi://localhost"
</FilesMatch>
and have 404 error

another problem with apache status page ;/
I have add into /etc/httpd/conf/extra/httpd-info.conf
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
</Location>

and remove # before ExtendedStatus On

reset httpd and go to mydomain/server-status
Forbidden
You don't have permission to access /server-status on this server.
 
Last edited:
I actually got this working but
Code:
Require ip <my ip>
fails (403), removing it is fine.... Even tried enclosing it in <RequireAny> tags, no dice :(
 
Back
Top