Nginx 禁止记录access 或者 error 日志:修订间差异
跳转到导航
跳转到搜索
无编辑摘要 |
(没有差异)
|
2019年10月17日 (四) 08:23的最新版本
有时,在一些不重要的业务上 ,我们希望关闭log 以节约空间 于是 下面两个指令配置时候的适用范围 main, http, mail, stream, server, location
********************************************************
access log 关闭
access_log off;
error log 关闭
关闭 error log 千万不要写 error_log off; ,这样错误日志会被写到一个叫做 off的文件中
error_log /dev/null ;