Nginx 配置之开启状态检查

Nginx About 670 words

查看是否安装所需模块

--with-http_stub_status_module

nginx -V

如若未安装改模块,需重新编译安装

./configure --with-http_stub_status_module
make & make install

参考配置

location /ngx_status {
   allow 127.0.0.1; #允许的IP
   deny all;
   stub_status on;
   access_log off;
}

页面返回的信息

Active connections: 2 server | accepts | handled requests :---:|:---:|:---: 72257 | 72257 | 81307 Reading: 0 Writing: 1 Waiting: 1

Active connections: 2 表示Nginx正在处理的活动连接数2个。
server  72257 表示Nginx启动到现在共处理了72257个连接。
accepts 72257 表示Nginx启动到现在共成功创建72257次握手。
handled requests 81307 表示总共处理了81307次请求。
Reading:0 读取客户端的连接数
Writing:1 响应数据到客户端的数量
Waiting:1 已经处理完正在等候下一次请求指令的驻留链接(开启keep-alive的情况下,这个值等于Active-(Reading+Writing))
Views: 2,671 · Posted: 2019-03-21

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh