1.nginx default 配置增加
<code>location ~ ^/(status|ping)$
{
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php5.6-fpm.sock;
}</code>2.开启pm.status = /status
3.重启nginx和fpm,service nginx restart,service php-fpm restart
访问:http://192.168.10.10/status
结果:404
1.nginx default 配置增加
<code>location ~ ^/(status|ping)$
{
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php5.6-fpm.sock;
}</code>2.开启pm.status = /status
3.重启nginx和fpm,service nginx restart,service php-fpm restart
立即学习“PHP免费学习笔记(深入)”;
访问:http://192.168.10.10/status
结果:404
<code>Nginx:
location ~ ^/(status|ping)$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}</code>我试了,访问/status能正常输出PHP-FPM的工作信息.
你是不是访问时在/status后面多加了个/,这时就会返回404了.
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号