Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to have httpd/php stop logging errors if they are repeating over and over again to prevent flooding?

Currently the /usr/local/apache/logs/error_log file is getting flooded and would like to prevent that.

share|improve this question
Is fixing the error out of the question? – Ladadadada Oct 30 '12 at 23:00
It's a shared hosting setup so we have a lot of clients and a lot of errors. Some are more serious then others and flood the log files and we can't fix every little problem. – Tiffany Walker Oct 30 '12 at 23:09
up vote 0 down vote accepted

To piggy back what Michael said, I'd setup individual logging for each vhost.

This is a simple configuration change and should save you lots of headaches down the road.. Simply add an ErrorLog entry in each entry. This also helps limit confusion for development and troubleshooting.

Once the individual logging has been enabled, your next step should be to setup log rotation on each of those directories/logs using logrotate.

Lastly, you could also configure/implement user quotas for those vhosts/users/homedirs and prevent their logs from eating all of the system's available hard disk.

share|improve this answer

Split your error logs per VirtualHost and make the clients deal with their own web site errors.

share|improve this answer

This is something I would not recommend, as Ladadadada asked you, it is better to fix error logs then to stop loggin, but if you are sure you want to stop logging errors here is what you have to do:

ErrorLog off
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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