首页 > 代码库 > Apache 配置日志切割
Apache 配置日志切割
日志切割主要使用 apache 的 rotatelogs 工具,如下,按每天切割一次(即86400秒)
[root@localhost ~]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf<VirtualHost *:80> DocumentRoot "/data/www" ServerName www.test.com ErrorLog "|/usr/local/apache2/bin/rotatelogs -l /usr/local/apache2/logs/test.com_error_%Y%m%d_log 86400" CustomLog "|/usr/local/apache2/bin/rotatelogs -l /usr/local/apache2/logs/test.com_access_%Y%m%d_log 86400" combined</VirtualHost>
Apache 配置日志切割
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。