Heim > Fragen und Antworten > Hauptteil
Imitiert http://renxiangzyq.iteye.com/... In diesem Artikel werden das Modul http_stub_status_module und die Konfigurationsinformationen dieses Moduls in nginx.conf hinzugefügt, wie unten gezeigt.
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 kann normal aufgerufen werden. Beim Zugriff auf xxxxx.com/NginxStatus wird ein 404-Fehler gemeldet. Bitte fragen Sie nach dem Grund.
高洛峰2017-05-16 17:16:30
ok,找到解决方案了:不用调换location代码块的位置,只是kill掉nginx进程重启一次,再访问xxxxx.com/NginxStatus页面时,就不报404错误了。新手就容易犯这种低级错误哎。