Home >Backend Development >PHP Tutorial >Enable the php-fpm status function and access domain/status. The result is 404?
1.nginx default configuration added
<code>location ~ ^/(status|ping)$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php5.6-fpm.sock; }</code>
2. Open pm.status = /status
3. Restart nginx and fpm, service nginx restart, service php-fpm restart
Visit: http://192.168.10.10/status
Result: 404
1.nginx default configuration added
<code>location ~ ^/(status|ping)$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php5.6-fpm.sock; }</code>
2. Open pm.status = /status
3. Restart nginx and fpm, service nginx restart, service php-fpm restart
Visit: http://192.168.10.10/status
Result: 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>
I tried it, and accessing /status can output PHP-FPM work information normally.
Did you add an extra / after /status when accessing, then 404 will be returned.