首页 > 其他 > 详细

nginx模块1--索引autoindex_基于ip_监控模块status

时间:2020-03-14 12:00:46      阅读:43      评论:0      收藏:0      [点我收藏+]

egrep -v ‘#|^$‘ /etc/nginx/conf.d/default.off > /etc/nginx/conf.d/default.conf

/etc/nginx/conf.d/default.conf  中

目录索引

location /download {     #相对根目录下的download文件夹

root /test;                      #根目录

autoindex on;        #开启目录索引

chareset utf-8,gbk;      #字符编码

autoindex_exact_size off;    #是否显示字节,关闭后根据实际大小显示m/g/t等数据

autoindex_localtime on;     #上传时间显示

}

基于ip访问,监控模块

location /status {     #相对根目录下的download文件夹

stub_status;                   #开启监控

access_log off;        #关闭监控写入日志

deny 10.0.0.1;        #禁止该ip或网段访问

allow all;            #允许所有地址访问

}

 

技术分享图片

监控可以看出长连接区别

server 连接数 accepts 连接成功数 requests请求数

如果长连接超时或者减少 刷新后连接数增加

当使用restart服务连接数清空

而reload保留连接数

 

nginx模块1--索引autoindex_基于ip_监控模块status

原文:https://www.cnblogs.com/Leaders543/p/12491233.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!