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.
- More About Apache Log File Rotation
- Move Apache Log Files
- Separate Log Files for Virutal Host
- Log Files
- Apache and Google
- Apache Error Log File
- .htaccess error
- Disable Remote Access for MySQL
Filed Under: Apache