Baidu spider is hammering my server and bloating my error_log file

Posted by Gravy on Server Fault See other posts from Server Fault or by Gravy
Published on 2013-10-19T23:28:54Z Indexed on 2013/10/20 3:57 UTC
Read the original article Hit count: 478

I am getting the following errors in my /etc/httpd/logs/error_log file

[Sun Oct 20 00:04:15 2013] [error] [client 180.76.5.16] File does not exist: /usr/local/apache/htdocs/homes
[Sun Oct 20 00:08:31 2013] [error] [client 180.76.5.113] File does not exist: /usr/local/apache/htdocs/homes
[Sun Oct 20 00:12:47 2013] [error] [client 180.76.5.88] File does not exist: /usr/local/apache/htdocs/homes
[Sun Oct 20 00:17:07 2013] [error] [client 180.76.5.138] File does not exist: /usr/local/apache/htdocs/homes

These kinds of errors are so often, that my error log files are over 500MB! I have done an IP trace on the client address to find that it belongs to something called baidu. Beijing Baidu Netcom Science and Technology Co in China.

Is there a way that I can just get apache to deny any incoming requests from some crummy spider that is repeatedly hitting my site??? Is there a better way of dealing with the problem? I am happy to completely block out China if it means that I can actually track real errors.

© Server Fault or respective owner

Related posts about apache2

Related posts about error-logging