php-fpm开启status监控

  1. php-fpm.ini增加配置
1
pm.status_path = /4bc020cd40b51db16c85e685b86da43b
  1. nginx增加本地配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
listen 3380;
server_name 127.0.0.1;
index index.html index.htm index.php;

error_page 404 /404.html;

location ~ /(4bc020cd40b51db16c85e685b86da43b)$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
}
}
  1. 检查配置是否正确
1
nginx -t && php-fpm -t
  1. 重启php-fpm, nginx 本地访问
1
2
3

systemctl restart php-fpm && systemctl restart nginx
curl http://127.0.0.1:3380/4bc020cd40b51db16c85e685b86da43b