您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

ngix_http_stub_status_module

2024/5/11 3:20:03发布34次查看
1.ngx_http_stub_status_module 是一个 nginx 的内置 http 模块,该模块可以提供 nginx 的状态信息。默认情况下这个模块是不被编译进来的,所以在编译 nginx 时要指定加载该模块--with-http_stub_status_module
2.首先检查nginx是否安装ngx_http_stub_status_module模块
如果没有安装,需要重新编译。
# nginx  -v | grep http_stub   
ngx_http_stub_status_module (static)
# nginx   -v
tengine version: tengine/2.1.1 (nginx/1.6.2)
3,首先在nginx的server段配置对应的信息
server {
    listen  80;
    server_name  xxx;
    location /ngx_status   自定义模块名称
    {
        stub_status on; 开启状态访问
        access_log off;
#allow all;   可以设置需要那些主机访问
#deny all;
    }
}
4,重新加载nginx,访问测试
# service nginx reload
curl 127.0.0.1:80/ngx_status
active connections: 135  
server accepts handled requests request_time
 13711907 25715823 5175039843
reading: 0 writing: 12 waiting: 123
说明:
active connections: 135  #//正在活跃的连接数
server accepts handled requests  
13711907 25715823 5175039843          #处理了13711907次连接,创建25715823次握手,共5175039843请求。
reading: 0 writing: 1 waiting: 1          # reading:读取客户端header数,writing:返回客户端header数,waiting:请求完成,等待下一次连接。

以上就是ngix_http_stub_status_module的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product