nginx版本:nginx / 1.6.2
/usr/logs/nginx-error.log [ uest: "GET /server-status HTTP/1.1", host: "127.0.0.1" 2015/03/14 05:21:24 [error] 23068#0: *8616047 openat() "/var/www/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: myname.proj, req ]
我的位置设置为:
location /nginx_status { # Enable nginx status page stub_status off; # Disable status page logging in access_log access_log off; # Allow access from 127.0.0.1 allow 127.0.0.1; # Deny all the other connections deny all; }
如果您希望请求者在请求该URL时能够获得一些基本统计信息,请添加:
location /server-status { stub_status; }
到你的configuration。 如果不这样做,则需要查找并停止提出该请求的任何消息以消除错误。