【问题标题】:How to disable log zip in apache2如何在 apache2 中禁用日志压缩
【发布时间】:2016-09-28 09:56:21
【问题描述】:

如何在 apache2 中禁用日志访问/错误压缩?

【问题讨论】:

  • 多么雄辩的提问方式……你为什么要把同一句话重复4次?您认为这会增加您获得回复的机会吗? 摇头...
  • 除此之外:apache http 服务器自己压缩日志文件。您可能还有其他工具可以做到这一点。很可能是logrotate,可以配置。
  • 如何禁用?? /var/log/apache2/*.log { daily missingok rotate 14 compress delaycompress notifempty create 640 root adm sharedscripts postrotate if /etc/init.d/apache2 status > /dev/null ;然后 \ /etc/init.d/apache2 重新加载 > /dev/null; \fi; endscript prerotate if [ -d /etc/logrotate.d/httpd-prerotate ];然后 \run-parts /etc/logrotate.d/httpd-prerotate; \fi; \endscript }
  • 不知道你想对该评论说什么。我认为是时候考虑一​​下人类交流的基本规则了。如果想从我们这里获得一些东西,那么以对我们来说易于理解的方式编写内容符合的利益。只是像你现在所做的那样把碎片扔在我们脚前并期待任何事情发生是一件非常愚蠢的事情。对不起。

标签: apache2


【解决方案1】:
/var/log/apache2/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
            if /etc/init.d/apache2 status > /dev/null ; then \
                /etc/init.d/apache2 reload > /dev/null; \
            fi;
endscript
prerotate
    if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
        run-parts /etc/logrotate.d/httpd-prerotate; \
    fi; \
endscript

}

【讨论】:

  • 如何禁用日志压缩?
猜你喜欢
  • 2012-06-03
  • 1970-01-01
  • 2013-12-04
  • 2017-11-21
  • 2016-02-08
  • 1970-01-01
  • 2013-03-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多