我的服务器上只有32GB,并且日志快速占用了该空间。所以我想禁用日志。禁用apache2日志
我觉得我在哪里可以做到这一点,但由于我是一个完整的noob当涉及到服务器,我不想开始改变的事情,而不必确定他们不会崩溃的服务器。
在等/ 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
和等/ apache2的/ conf.d /其他的虚拟主机的访问日志,我发现这一点:
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined
我需要做什么来禁用日志?
在此先感谢
添加日志旋转到系统 – Sergey