apache错误日志过大
最佳回答
所以根本的问题在于看看抛的是啥错误日志,从根源上解决。
如果还是不行,把错误日志贴上来,大家一起看看。
最新回答共有2条回答
-
游客
回复删除 Apache2/logs/目录下的 error.log、access.log文件
打开 Apache 的 httpd.conf配置文件并找到下面两条配置
ErrorLog logs/error.log
CustomLog logs/access.log common
直接注释掉,换成下面的配置文件。
# 限制Apache错误日志文件为 1M
ErrorLog “|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M”
# 每天生成错误日志文件
#ErrorLog “|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400″
# 限制访问日志文件大小为 1M
CustomLog “|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M” common
# 每天生成一个访问日志文件
#CustomLog “|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400″ common