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

I've gone through the trouble of blocking a number of bots that are trying to crawl our site. The issue now is that the following error is taking over the apache error log:

client denied by server configuration

I was hoping that an Apache expert out there can tell me how I can suppress the error message for this specific issue from being written to the error log.

Thanks in advance for your help!

share|improve this question
up vote 1 down vote accepted

grep -v

Really. I mean it. Why manipulate the logs at time of writing?

Edit 1

tail -f -n100 /var/log/httpd/error_log | grep -v 'client denied by server configuration'

If you really want to prevent the error from being written to disk, you can pipe your logs through a script. More details here:

Apache docs

share|improve this answer
@Warner - Fair enough. Any ideas how I can change the following command I currently use to view the log file so that it suppresses those errors? tail -100 /etc/httpd/logs/error_log – Russell C. Mar 5 '10 at 2:06
@Warner - Thanks! That seems to produce something slightly different since it first grabs 100 lines of the error log and then only shows non-matching lines. Is there a way to instead display the last 100 lines that don't match? – Russell C. Mar 5 '10 at 2:32
Try this: grep -v 'client denied by server configuration' /etc/httpd/logs/error_log | tail -n100 – Warner Mar 5 '10 at 2:37
works great. Thanks for the help! – Russell C. Mar 5 '10 at 14:04

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.