Tags:

How to easily disable log in apache

Friday, February 18, 2011 EST (Updated on: Saturday, November 12, 2011 EST)

by: Eric Potvin

Tags: 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:

  • /etc/apache2/sites-available/default-ssl
  • /etc/apache2/sites-available/default

and change the ErrorLog and comment out the CustomLog:

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

Be the first to reply!

No comments!
Share this article:

Add a comment

* If your comment require a response from us, please make sure you leave your email

Captcha

* is required
The posting of advertisements, profanity, or personal attacks is prohibited.
Please review our terms of use

Latest Articles

Top Articles

Category List

Top of the page
Loading, please wait ...