nginx access_log 完全关闭
来源:互联网 发布:选择财物软件方案 编辑:程序博客网 时间:2024/06/06 01:23
最近在配置本地nginx开发环境时,发现一个问题,当server段不指定access_log时,并且http段中也未指定任何 access_log参数时,它会默认写到logs/access.log这个文件,也就是access_log默认值就是”logs /access.log”,而且是所有server的访问日志。但nginx网站上我并未找到此配置的默认值。
如果我们不需要,在http段中加一行access_log off;然后在特定的server中配置自己想写入的日志。开发环境我默认不写日志,即不配置任何access_log,需要时才打开。
nginx的http段中,设置access log:
如果我们不需要,在http段中加一行access_log off;然后在特定的server中配置自己想写入的日志。开发环境我默认不写日志,即不配置任何access_log,需要时才打开。
nginx的http段中,设置access log:
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; log_format gzip '$remote_addr - $remote_user [$time_local] "$request" ' '$status $bytes_sent "$http_referer" ' '"$http_user_agent" "$gzip_ratio"'; log_format download '$remote_addr - $remote_user [$time_local] "$request" ' '$status $bytes_sent "$http_referer" "$http_user_agent" ' '"$http_range" "$sent_http_content_range"'; #access_log logs/access.log main;access_log off;
0 0
- nginx access_log 完全关闭
- nginx windows 下,关闭 error_log.log,access_log.log
- nginx access_log日志
- nginx access_log buffer大小设置
- nginx的error_log和access_log分析
- 日志-nginx的access_log与error_log
- nginx服务器access_log日志分析及配置详解
- nginx服务器access_log日志分析及配置详解
- nginx服务器access_log日志分析及配置详解
- nginx服务器access_log日志分析及配置详解
- Nginx访问日志(access_log)配置及信息详解
- 使用nginx的access_log 进行接口调用频率分析
- nginx服务器access_log日志分析及配置详解
- Nginx访问日志(access_log)配置及信息详解
- nginx args urldecode 及nginx access_log中双引号被解析为x22问题解决方案
- Linux 查找nginx access_log 并删除一个月之前的log
- access_log 分析
- access_log过滤
- Swift变量名的一种玩法
- Linux系统日志
- springMVC4(8)模型数据绑定全面分析
- 海康威视Android SDK,并非萤石Android SDK
- 命令学习 of Ubuntu
- nginx access_log 完全关闭
- Auto MDI/MDI-X 简要说明及网线头线序
- 【bzoj1103】【POI2007】【大都市】
- 每周一算法(之数据查找之一)
- iOS绘图教程
- hdu 1288 Hat's Tea
- 资料网站
- display:inline、block、inline-block的区别
- Java web 学习之jsp—javabean