why my NginxStatus do not work?

ultrawind nginx-forum at nginx.us
Thu Apr 8 13:20:14 MSD 2010


1.  I had add "--with-http_stub_status_module" when I configure the Nginx.

2.  I run "/usr/local/nginx/sbin/nginx -t", and the test is successful. 
My nginx.conf:

user  daemon;
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  192.168.1.140;

        location / {
            root   /home/httpd;
            index  index.html index.htm index.php;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/httpd/$fastcgi_script_name;
            include        fastcgi_params;
        }
        location /NginxStatus {
             stub_status             on;
             auth_basic              "NginxStatus";
             auth_basic_user_file  conf/htpasswd;
         }
    }
}


3.  I visit http://192.168.1.140, and it is OK.
But I visit http://192.168.1.140/NginxStatus, it return "403 Forbidden".

Is my nginx.conf wrong? What should I do to make visit http://192.168.1.140/NginxStatus ok?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,72641,72641#msg-72641




More information about the nginx mailing list