StubStatius模块


以下指令指定启用获取Nginx工作状态的功能:

location /NginxStatus {
                    stub_status     on;
                    access_log      logs/NginxStatus.log;
                    auth_basic      "NginxStatus";
                    auth_basic_user_file         /usr/local/nginx/conf/htpasswd;
        }

[root@localhost web]# /usr/bin/htpasswd -c /usr/local/nginx/conf/htpasswd webadmin
New password: 123456
Re-type new password: 123456
Adding password for user webadmin