【发布时间】:2012-06-03 09:48:49
【问题描述】:
我的服务器上只有 32GB,而日志正在迅速耗尽该空间。所以我想禁用日志。
我想我找到了做这件事的地方,但是由于我在服务器方面完全是个菜鸟,所以我不想在不确定它们不会导致服务器崩溃的情况下开始更改。
在 etc/apache2/apache2.conf 中,我发现了这个:
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
在 etc/apache2/conf.d/other-vhost-access-log 中,我发现了这个:
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined
我需要做什么来禁用日志?
提前致谢
【问题讨论】:
-
添加日志轮换到系统