Home > Apache > Disable Apache Log Files

Disable Apache Log Files

August 11, 2010 Posted by KP

Today I was overwhelmed by all kinds of error messages caused by insufficient storage space, this happened once 5 years ago. Since I linked /var/db/ and /var/log/www/ to another big partition, /var usually only uses a few hundred MB and should never use up its 10GB space. It turned to be the master Apache log file (/var/log/httpd-access.log).

I use Google Analytics on many websites, Apache access log files are no long needed, so I disabled them by removing CustomLog lines in httpd.conf, but it’s not the right way, Apache started to write the log info to its master log file instead, which grew up to 9GB over the months.

The correct way to disable Apache log files is changing CustomLog line to:

CustomLog /dev/null combined

Error log files should be kept anyway.

The daily run output email contains the output of command ‘df’, but I didn’t notice the changes.



Related Posts:

Filed Under: Apache

2 Comments to “Disable Apache Log Files”

  1. MagentoEye Says:

    Thank you very much. That’s what I’ve been looking for ;)

  2. MagentoEye Says:

    Use ‘CustomLog /dev/null common’ maybe better performance



Archives