Apache日志配置优化

Apache日志配置优化

经验文章nimo972024-12-16 13:40:2212A+A-

Apache 关闭 access_log 并优化 error

在 Apache 配置文件里面注释掉下面几行:

#<IfModule log_config_module>

# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

# LogFormat "%h %l %u %t \"%r\" %>s %b" common

# <IfModule logio_module>

# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

# </IfModule>

# CustomLog logs/access_log common

#</IfModule>

然后重启 Apache WEB 服务器就可以了。

另外顺便把 error_log 也优化了:

LogLevel warn

改成:

LogLevel crit

看了几个大型 WEB 2.0 的案例,尤其是 LiveJournal 的惨痛发展经验,正在思考我们刚刚起步的网站如何做好服务器的配置工作,于是做了这个优化。

点击这里复制本文地址 以上内容由nimo97整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!
qrcode

尼墨宝库 © All Rights Reserved.  蜀ICP备2024111239号-7