2016-09-28 77 views
-2

如何禁用日志访问/错误zip apache2如何禁用apache2中的日志zip

+0

多么雄辩的方式来问一个问题......你为什么要重复同一句话的4倍?你认为这会增加你获得答复的机会吗? _抖我的头...... _ – arkascha

+0

除此之外:apache http服务器并不自己压缩日志文件。你可能有一些其他的工具。最有可能是'logrotate'可以配置。 – arkascha

+0

如何禁用? /var/log/apache2/*.log { \t每日 \t missingok \t旋转14 \t压缩 \t delaycompress \t notifempty \t创建640根ADM \t sharedscripts \t postrotate 如果/ etc /初始化。 d/apache2 status>/dev/null;然后\ /etc/init.d/apache2 reload>/dev/null; \ fi; \t endscript \t prerotate \t \t如果[-d /etc/logrotate.d/httpd-prerotate];那么\ \t \t \t run-parts /etc/logrotate.d/httpd-prerotate; \ \t \t fi; \ \t endscript } – penchY

回答

0
/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 

}

+0

如何禁用日志zip? – penchY