ITeye博客

按日期生成apache日志

godlogin · 2012-07-04 07:50 · Web前端 · Markdown

在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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。