21

我一直在阅读有关禁用 apache 服务器日志记录的信息,这对我来说至关重要,因为我正在对其进行大量测试,并且它会填满磁盘。

我尝试过更改 http.conf 并将内容定向到 /dev/null,但都没有奏效,因为其中大部分是错误日志记录。

有人知道吗?

谢谢

4

1 回答 1

41

只需评论设置日志记录的区域即可。

上,

httpd.conf
virtual hosts configurations (virtual.conf, domain.conf etc)

对于类似的东西

CustomLog logs/access_log common
ErrorLog logs/error_log

做就是了,

#CustomLog logs/access_log common
#ErrorLog logs/error_log
于 2012-11-25T15:21:44.320 回答