php-fpm status info under Ubuntu 16.04..
Howard Leadmon
howard at leadmon.net
Fri Sep 29 07:54:39 UTC 2017
On an older Ubuntu 14.x with php5 I had this status info put on a web
page with some other stats with no problem.
On my Ubuntu 16.x server now using php7 I seem to be pulling out the
remainder of my hair, so wanted to see if someone could hit me with a
cloo bat so I can get this straight.
I have in the the php/fpm configured enabling the pm.status_path so it
should be accessible, this seems to be the same as in the older php5.
Where I am running into issues is how to call this inside of apache, as
with all my googlefu, I find references to using a config like I have in
my old Ubuntu 14 server, something like this in php5-fpm.conf:
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Action php5-fcgistat /php5-fcgi virtual
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket
/var/run/php5-fpm.sock -pass-header Authorization
<Directory /usr/lib/cgi-bin>
Options ExecCGI FollowSymLinks
SetHandler fastcgi-script
Require all granted
</Directory>
</IfModule>
So when I go in on the new 16.04 server, and look at conf-enabled I see
is has the following in php7.0-fpm.conf:
# Redirect to local php-fpm if mod_php is not available
<IfModule !mod_php7.c>
# Enable http authorization headers
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler "proxy:unix:/run/php/php7.0-fpm.sock|fcgi://localhost"
</FilesMatch>
<FilesMatch ".+\.phps$">
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(p[3457]?|t|tml|ps)$">
Require all denied
</FilesMatch>
</IfModule>
Quit the difference, and if I try and add the info from the old 14.x
server in, then apache dies and bitches about the Action lines being an
invalid option. Basically I want to be able to use the script in
/usr/share/php/7.0/fpm/status.html to get info on how php-fpm is
operating, but I am needless to say missing something to get this all to
play well together.
If anyone has this working, or can give me insight on how to make this
work on my 16.04 system, I would really appreciate it. The PHP all
seems to be doing well, and looking at the info on php, the FPM stuff is
running. So I just need to pull the stats out if it, thanks...
---
Howard Leadmon
PBW Communications, LLC
http://www.pbwcomm.com
More information about the ubuntu-users
mailing list