标签:日志切割
vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
把两行注释打开(ErrorLog和CustomLog)
vim /usr/local/apache2/conf/httpd.conf (common主日志文件)
vim /usr/local/apache2/conf/extra/httpd-vhosts.conf(修改CustomLog行如下)
CustomLog "|/usr/local/apache2/bin/rotatelogs -l /usr/local/apache2/logs/test.com-access_%Y%m%d_log 86400" combined #切割日志的方法
保存退出
apachectl restart
本文出自 “林春杰的运维之路” 博客,请务必保留此出处http://kratoslinux.blog.51cto.com/9844108/1775118
标签:日志切割
原文地址:http://kratoslinux.blog.51cto.com/9844108/1775118