您的位置:首页 > 运维架构 > Apache

apache日志分割的方法

2013-09-24 09:13 239 查看
在httpd.conf中找到这两项

ErrorLog logs/error_log
CustomLog logs/access_log common

替换成
ErrorLog "| /usr/sbin/rotatelogs /var/log/httpd/%Y_%m_%d_error_log 86400 480"
CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/%Y_%m_%d_access_log 86400 480" common

rotatelogs是apache的一个日志分割的一个软件,centos里路径是/usr/sbin里面,替换之前查找一下这个文件的路径 find / -name rotatelogs
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: