How do I disable apache error.log globally?
I want to know how to disable error.log globally. I understand the risk that come with it. I just want to do it. I was able to find one for access_log and disable it:
#CustomLog logs/access_log combined
but error_log does not exist in /etc/apache2/conf/httpd.conf
Where do one go to disable it /etc/apache2/logs/error_log?
-
Any reason to completely disable it? is it taking to much of your space if so why not think about adding a cron to clear them on a regular time interval? 0 -
Hello, You can disable error logging for all virtual hosts on the system, but note that you will still see a limited number of entries in the Apache error log (e.g. Apache restarts). To do this, you should first create the required directory and include file: mkdir /etc/apache2/conf.d/userdata touch /etc/apache2/conf.d/userdata/errorlog.conf
Then, edit /etc/apache2/conf.d/userdata/errorlog.conf so that it contains the following line:ErrorLog /dev/null
The last step is to rebuild the Apache configuration file and restart Apache:/scripts/rebuildhttpdconf /scripts/restartsrv_httpd
Thank you.0
Please sign in to leave a comment.
Comments
2 comments