使用nginx http_stub_status_module时,利用浏览器访问统计页面时,报404
ringa_lee
ringa_lee 2017-05-16 17:14:30
0
2
489

仿照http://renxiangzyq.iteye.com/... 这篇文章添加了http_stub_status_module模块并在nginx.conf中添加了此模块的配置信息,如下所示。

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能够正常访问,当访问xxxxx.com/NginxStatus时,报404错误,求原因。

ringa_lee
ringa_lee

ringa_lee

全部回复(2)
小葫芦

ok,找到解决方案了:不用调换location代码块的位置,只是kill掉nginx进程重启一次,再访问xxxxx.com/NginxStatus页面时,就不报404错误了。新手就容易犯这种低级错误哎。

淡淡烟草味

你把下面的location中的代码放到上面的location试试,然后在重启nginx

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!