让apache日志按照每天来存档的设置方法
来源:岁月联盟
时间:2012-02-19
在apache的配置文件(/etc/httpd/httpd.conf)中找到
ErrorLog logs/error_log
CustomLog logs/access_log common
改为
ErrorLog “| /usr/local/apache/bin/rotatelogs /home/logs/www/%Y_%m_%d_error_log 86400 480″
CustomLog “| /usr/local/apache/bin/rotatelogs /home/logs/www/%Y_%m_%d_access_log 86400 480″common