linux系统下Apache日志分割(按天生成文件)

Apache日志按天显示,修改Apache http.conf文件,注释默认的日志文件,修改为下面2行

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

注意:/usr/local/apache/bin/rotatelogs 需要配置绝对路径

posted @ 2017-07-20 17:27  阿波罗的博客233  阅读(550)  评论(0编辑  收藏  举报