Might be a bit late now but I wanted to post a straight forward simple answer to this issue with php-fpm(7.1+)/apache(2.4) as most of the answers I found online were a bit convoluted. This is using the default php-fpm settings that require unix sockets vs port mapping.
1) Within , I have the following config options set for listen sock below and uncommented out:/etc/php-fpm.d/www.conf
listen = /var/run/php-fpm.sock
pm.status_path = /fpm-status
2) With my apache config (or similar) I added a match that looked for fpm-status and set it to to the unix socket and run the fpm-status from fcgi. It also restricts it so only localhost can call it:php-latest.confproxypass
<LocationMatch "/fpm-status">
Order Allow,Deny
Allow from 127.0.0.1
ProxyPass unix:/var/run/php-fpm.sock|fcgi://localhost/fpm-status
</LocationMatch>
3) Just simply run the command locally:curl
$ curl http://localhost/fpm-status
pool: www
process manager: dynamic
start time: 16/Oct/2019:11:33:25 -0400
start since: 14
accepted conn: 12
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 38
active processes: 2
total processes: 40
max active processes: 5
max children reached: 0
slow requests: 0
Źródło: Link







Leave a Reply