Nginx+PHP-FPM打开status
1. 启用 php-fpm 状态功能 修改 php-fpm.conf 文件,如果没有则创建此文件. 在文件夹: php/etc 目录下创建. pm.status_path=/status listen = 9000 #此处是监听 status 的端口, 可以自定义, 要跟等会在 nginx 中配置的一致. 2. nginx配置 在要监控的主机里添加上 locaction. location ~^/(status|ping)$ { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; #对应 php-fpm 里的配置 fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; } 3. 重启 nginx 和php-fpm service nginx restart service php-fpm restart **4. 打开 status 页面 ** 在浏览器里打开或者用 curl 命令打开都可以 http://127.0.0.1/status //如果你的 nginx 默认端口是80的话 pool: www process manager: dynamic start time: 10/Nov/2015:16:36:48 +0800 start since: 1859 accepted