Ban bots (ISPConfig 3)
I am letting my brother in law run a non-profit club website for US military folk. His site has been slowing. From the logs one of the main culprits is a bot/spider from China called Baidu. I have blocked it using robots.txt but it doesn't heed the disallow.
Anyway, he has several gigabytes usage per month just from Baidu and some Russian bot. Oddly enough, all these bots from overseas combined don't take up the same bandwidth as this Baidu and russian bot are using lol
His military folks could very well be overseas but they do NOT need to find the site via search engine. And since my server is mainly family and friends site I want to block out these bots server wide, rather than altering .htaccess files on each site.
So I read this page:
The article mentions adding the following info to my httpd.conf file which I can find simple enough.
Are there any better suggestions for banning these bots?
Thanks as always folks,
The httpd.conf is only used in a stock apache installation, in most cases this default configuration file is even overridden by distribution dependent config files (for example in Debian). If you want your code to be executed in every site you also have to add it to every vhost.
The best way to do this is to create a customer vhost.conf.master (copy it from /usr/local/ispconfig/server/conf to /usr/local/ispconfig/server/conf-custom and do your changes).
After that you have to manually "resave" every vhost for the file to be recreated. Else you could use the remote api to recreate the file for every vhost. The following post suggests the needed steps:
Overthinking this, there is a way simpler way to achieve this. As the new information is static (doenst need to be changed for every host) you could also create a file inside /etc/apache/conf.d with the needed input. This also affects all vhosts.
Here is the needed layout of the file:
Thanks for the reply. Two quick questions:
1. Can I call this file anything I want? i.e. (banned-bots.conf)
2. Do I have to tell any other apache file to include this file or will it be automatic?
Thasnks again for the reply.
When you have a look into /etc/apache2/conf.d you will already find other files like "charset" and "phpmyadmin.conf", so you can basically name it how you want it.
There is also no extra include necessary as this is already done in apache.conf.
|All times are GMT +2. The time now is 04:55.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.