Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On my Apache-hosted Ruby on Rails website, an IP address (always identical) from Russia was hammering the website every twenty minutes, based on the path requests I think it's trying to seek out comment forms to submit spam comments onto.

Anyway, I did the following in my .htaccess file to completely boot them off while allowing everyone else...

Order Allow,Deny
Deny from XX.XX.XX.XXX
Allow from all

So it worked, their IP no longer shows up in my Rails logs and they can't access the site. However, the error log for the website in the /var/log/apache2 folder continues to rack up the same error by the banned IP...

[Thu Jun 30 09:11:37 2011] [error] [client XX.XX.XX.XXX] client denied by server configuration: /srv/[...]

It's obvious what the error is for, but I don't think it's necessary to keep recording that this IP was blocked, I want to keep my errors file clean for other legit errors. How can I stop the logs from recording this?

share|improve this question

1 Answer 1

You cannot do this from within apache. The easiest method would be to send the logs to a filter script rather than straight to a file.

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.