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.
高洛峰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.
淡淡烟草味2017-05-16 17:16:30
You can try putting the code in the location below into the location above, and then restart nginx