按日期生成apache日志

在httpd.conf配置文件中找到

ErrorLog logs/error_log
CustomLog logs/access_log common


修改为
ErrorLog “| /usr/sbin/rotatelogs /home/logs/www/%Y_%m_%d_error_log 86400 480″
CustomLog “| /usr/sbin/rotatelogs /home/logs/www/%Y_%m_%d_access_log 86400 480″ common


重启apache


参考文章:http://hi.baidu.com/wenlongzhao/item/9deb7ab74f981165254b09fe

你可能感兴趣的:(apache)