note 129209 added to fpm.status

From: Date: Wed, 31 Jan 2024 00:43:25 +0000
Subject: note 129209 added to fpm.status
Groups: php.notes 
Request: Send a blank email to php-notes+get-221163@lists.php.net to get a copy of this message
Anonymous is correct. So the URI has to match the pm.status_path in the pool configuration and in turn the Apache Location configuration. The same applies to ping.path. Ergo If you want multiple PHP FPMs exposed on the same Apache each needs their own unique path. Also from experience Apache 8 FPM status_listen doesn't seem to work with the domain socket, only TCP. Obviously for 8.x you'll need unique port numbers for each PHP FPM and they need to match between the pm.status_listen and the Apache ProxyPass line. So imagine I want FPM status and ping exposed for 7.4 and 8.2. I then have an Apache config like: <LocationMatch "/fpm-ping-74"> Order Deny,Allow Require local ProxyPass "unix:/run/php/php7.4-fpm.sock|fcgi://localhost" </LocationMatch> <LocationMatch "/fpm-status-74"> Order Deny,Allow Require local IncludeOptional trusted-ips.conf ProxyPass "unix:/run/php/php7.4-fpm.sock|fcgi://localhost" </LocationMatch> <LocationMatch "/fpm-ping-82"> Order Deny,Allow Require local IncludeOptional trusted-ips.conf ProxyPass "unix:/run/php/php8.2-fpm.sock|fcgi://localhost:9002" </LocationMatch> <LocationMatch "/fpm-status-82"> Order Deny,Allow Require local ProxyPass "unix:/run/php/php8.2-fpm.sock|fcgi://localhost:9002" </LocationMatch> Then in the respective pool config files: 7.4/fpm/pool.d/www.conf: ; status_listen default works in 7.4 pm.status_path = /fpm-status-74 ping.path = /fpm-ping-74 8.2/fpm/pool.d/www.conf: ; Need an explicit TCP listen in 8.x - why? pm.status_listen = 127.0.0.1:9002 pm.status_path = /fpm-status-82 ping.path = /fpm-ping-82 ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.157.134 (proxied: 2604:2d80:7083:6000:b12f:44f:e0f7:4269) ---- Manual Page -- https://php.net/manual/en/fpm.status.php Edit -- https://main.php.net/note/edit/129209 Del: integrated -- https://main.php.net/note/delete/129209/integrated Del: useless -- https://main.php.net/note/delete/129209/useless Del: bad code -- https://main.php.net/note/delete/129209/bad+code Del: spam -- https://main.php.net/note/delete/129209/spam Del: non-english -- https://main.php.net/note/delete/129209/non-english Del: in docs -- https://main.php.net/note/delete/129209/in+docs Del: other reasons-- https://main.php.net/note/delete/129209 Reject -- https://main.php.net/note/reject/129209 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221163) next »