Apache下的apache_access.log和error.log文件一直没动,发现已经3G左右了。
windows下删除apache_access.log和error.log文件
1. 删除C:\wamp\logs目录下的apache_access.log和access.log文件
2. 打开Apache的httpd.conf配置文件并找到下面两条配置
ErrorLog "c:/wamp/logs/apache_error.log"
CustomLog "c:/wamp/logs/access.log" common
#ErrorLog "c:/wamp/logs/apache_error.log"
#限制错误日志文件为 1M
ErrorLog "|bin/rotatelogs.exe -l c:/wamp/logs/apache_error-%Y-%m-%d.log 1M"
#每天生成一个错误日志文件
ErrorLog "|bin/rotatelogs.exe -l c:/wamp/logs/apache_error-%Y-%m-%d.log 86400"
#CustomLog "c:/wamp/logs/access.log" common
CustomLog "|bin/rotatelogs.exe -l c:/wamp/logs/access-%Y-%m-%d.log 1M" common
CustomLog "|bin/rotatelogs.exe -l c:/wamp/logs/access-%Y-%m-%d.log 86400" common