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
訪問: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了.