Home  >  Q&A  >  body text

When using nginx http_stub_status_module, when using the browser to access the statistics page, 404 is reported.

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_leeringa_lee2713 days ago490

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-05-16 17:16:30

    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.

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-16 17:16:30

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

    reply
    0
  • Cancelreply