Enable the php-fpm status function and access domain/status. The result is 404?

WBOY
Release: 2016-08-08 09:06:52
Original
1322 people have browsed it

1.nginx default configuration added

<code>location ~ ^/(status|ping)$
        {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php5.6-fpm.sock;
        }</code>
Copy after login
Copy after login

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

Reply content:

1.nginx default configuration added

<code>location ~ ^/(status|ping)$
        {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php5.6-fpm.sock;
        }</code>
Copy after login
Copy after login

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>
Copy after login

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.

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template