When using nginx http_stub_status_module, when using the browser to access the statistics page, 404 is reported.
ringa_lee
ringa_lee 2017-05-16 17:14:30
0
2
481

Imitate http://renxiangzyq.iteye.com/... This article adds the http_stub_status_module module and adds the configuration information of this module in nginx.conf, as shown below.

server{
    listen 80;
    server_name xxxxx.com;
    limit_conn perserver 100;
    location /{
        root z.com;
    index index.html; 
    }
location /NginxStatus {
    stub_status on;
    access_log /home/lily/nginx/logs/zcom_status.log;
    auth_basic "NginxStatus"; 
    }
}

xxxxx.com can be accessed normally. When accessing xxxxx.com/NginxStatus, a 404 error is reported. Please ask for the reason.

ringa_lee
ringa_lee

ringa_lee

reply all(2)
小葫芦

ok, I found a solution: No need to change the location code block, just kill the nginx process and restart it. When you visit the xxxxx.com/NginxStatus page again, the 404 error will no longer be reported. It is easy for novices to make such stupid mistakes.

淡淡烟草味

You can try putting the code in the location below into the location above, and then restart nginx

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!