22

I've been reading about disabling the logging of the apache server, which is crucial for me as I'm running huge tests on it, and it fills the disk.

I've tried changing http.conf and directing stuff to /dev/null, but none of it worked, as most of it was the Error logging.

Any idea anyone?

Thanks

1 Answer 1

44

Just comment the areas where logging was set.

On,

httpd.conf
virtual hosts configurations (virtual.conf, domain.conf etc)

For something like

CustomLog logs/access_log common
ErrorLog logs/error_log

Just do,

#CustomLog logs/access_log common
#ErrorLog logs/error_log
7
  • My conf file is apache2.conf and it doesnt have anything like that :( My httpd.conf file is empty
    – Alon_T
    Commented Nov 25, 2012 at 15:26
  • 7
    Sweet, I didn't get the acceptance.. :(
    – Rum Verse
    Commented Nov 25, 2012 at 15:49
  • 4
    Because of your changes, if you're not able to start apache after commenting out said lines, then you can do try following: Just change actual target directory to null device: ErrorLog /dev/null Commented May 29, 2016 at 16:08
  • 7
    Uncommenting doesn't disable anything, just sets back to default. /dev/null seems like a better answer. Commented Jun 6, 2017 at 10:14
  • 3
    To find the line try grep -ri errorlog /etc/{httpd,apache,apache2} Commented Sep 3, 2017 at 4:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.