2022-11-23 352
编译选项
作用
Nginx的客户端状态
./nginx -V
# 如果没有我们需要的模块,例如本次试验添加的 –with-http_stub_status_module ,那么则需要重新编译安装一下
configure 文件是在安装包目录下的文件,具体可参考 centos 7 安装 nginx
./configure --prefix=/usr/local/nginx --with-http_realip_module --with-http_ssl_module --with-pcre --with-stream --with-http_stub_status_module
cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
make
# 这里是需要 make 编译,不用 make install
# 找到 nginx 安装包目录 /root/nginx-1.10.1/objs ,将 nginx 文件复制到原本的 /usr/local/nginx/sbin/nginx
cp /root/nginx-1.10.1/objs/nginx /usr/local/nginx/sbin/
./nginx -s reload
./nginx -V
地址:https://nginx.org/libxslt/en/docs/http/ngx_http_stub_status_module.html
文件目录:/usr/local/nginx/conf
# 在文件中添加新的 location
location /nginx_status {
stub_status;
}
# 解释说明:
nginx_status 这是自定义命名的,访问的时候添加这个字段访问
stub_status; 这个是固定参数
http://192.168.169.131/nginx_status
# 访问内容结果如下图
# 解释说明:
1)Active connections-活跃连接数
The current number of active client connections including Waiting connections.
(2)accepts-已接受的客户端连接总数
The total number of accepted client connections.
(3)handled-已处理的连接总数
The total number of handled connections. Generally, the parameter value is the same as acceptsunless some resource limits have been reached (for example, the worker_connections limit).
(4)requests-客户端连接总数
The total number of client requests.
(5)Reading-读取请求头的当前连接数
The current number of connections where nginx is reading the request header.
(6)Writing-将响应写回客户端的当前连接数
The current number of connections where nginx is writing the response back to the client.
(7)Waiting-等待请求的当前空闲客户端连接数
The current number of idle client connections waiting for a request.
参考官网地址:https://nginx.org/libxslt/en/docs/http/ngx_http_stub_status_module.html
以上所述是小编给大家介绍的nginx 添加http_stub_status_module模块,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对77isp云服务器技术网的支持!原文链接:https://77isp.com/post/15912.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态