apache日志文件怎么删除
今天无意中发现Apache下的apache_access.log和error.log文件已经达到3G左右了,遂决定清除该文件。
(学习视频推荐:java视频教程)
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
相关推荐:apache
以上就是apache日志文件怎么删除的详细内容,更多请关注其它相关文章!