NGINX - Monitoring PHP-fpm

From IT-Arts.net
Revision as of 09:07, 17 January 2026 by Admin (talk | contribs) (Text replacement - "Category:Wiki" to "Category:Wiki '''''[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]''''' ")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Return to Wiki Index



PHP Configuration

In /etc/php/7.X/fpm/pool.d/www.conf uncomment:

pm.status_path = /status


NginX Configuration

In /etc/nginx/nginx.conf adapt:

server {
                listen 127.0.0.1:80;
                server_name 127.0.0.1;

                location ~ ^/(status|ping)$ {
                        allow 127.0.0.1;
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        fastcgi_index index.php;
                        include fastcgi_params;
                        #fastcgi_pass 127.0.0.1:9000;
                        fastcgi_pass   unix:/var/run/php/php7.X-fpm.sock;
                }
        }

Restart the service and test with:

curl http://127.0.0.1/status

Sources