Skip to main content

How do I disable apache error.log globally?

Comments

2 comments

  • webhostuk
    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
  • cPanelMichael
    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.