然后在nginx.conf的server段中定义类似如下内容:
location/status{
stub_statuson;
access_logoff;
allowSOME.IP.ADD.RESS;
denyall;
}
访问http://ip.ad.dr.ess/status
Activeconnections:1597
serveracceptshandledrequests
307794230779427823838
Reading:41Writing:83Waiting:1473
activeconnections—对后端发起的活动连接数serveracceptshandledrequests—nginx总共处理了3077942个连接,成功创建3077942次握手(证明中间没有失败的),总共处理了7823838个请求reading—nginx读取到客户端的Header信息数writing—nginx返回给客户端的Header信息数waiting—开启keep-alive的情况下,这个值等于active–(reading+writing),意思就是Nginx说已经处理完正在等候下一次请求指令的驻留连接