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?
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.