rss feed Twitter Page Facebook Page Github Page Stack Over Flow Page

How to easily disable log in apache

Logs are important, specially for production server. For development or QA servers, they might not be as important since you can turn on errors directly on the screen.

Here's how to easily disable log (access and error log) in apache to avoid excessive writes on local server.

Open your /etc/apache2/apache2.conf file and change the following two configurations:

Change the ErrorLog to:

ErrorLog /dev/null

Now, open /etc/apache2/conf.d/other-vhosts-access-log and comment the following line

#CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined

In addition, you might have to change these files:

and change the ErrorLog and comment out the CustomLog:

ErrorLog /dev/null
#CustomLog ${APACHE_LOG_DIR}/access.log combined