一、nginx配置
配置location
location /nginx_status {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
stub_status on;
access_log off;
allow 183.49.46.196; # 允许访问的 IP
allow 127.0.0.1;
deny all;
}
二、效果
nginx status详解
active connections – 活跃的连接数量
server accepts handled requests — 总共处理了91835569个连接 , 成功创建91835569次握手, 总共处理了454138306个请求
reading — 读取客户端的连接数.
writing — 响应数据到客户端的数量
waiting — 开启 keep-alive 的情况下,这个值等于 active – (reading+writing), 意思就是 Nginx 已经处理完正在等候下一次请求指令的驻留连接.