使用nginx http_stub_status_module時,利用瀏覽器存取統計頁面時,報404
ringa_lee
ringa_lee 2017-05-16 17:14:30
0
2
483

仿照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學習者快速成長!