Subject: | Blocking country access to 2 virtual hosts |
Posted by: | Paul (paul651931…@gmail.com) |
Date: | Tue, 24 May 2011 |
Hello,
I have 2 virtual hosts on a Windows server.
The directory structure is:
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\website1
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\website2
My error log is filling up with access attempts looking for various .php
files that do not exist, mainly from China IP addresses.
I was thinking about using a .htaccess file to block the country using
the text found here:
https://www.countryipblocks.net/e_country_data/CN_deny.txt
I have 2 questions.
Q1. The PC the server runs on isn't very powerful (basic spec below).
There are a lot of IP entries in the .htaccess file, will this put any
excessive load on the server when users access the website or is it
negligible?
Q2. Do I need to put a copy of the .htaccess file in *both* website root
directory's or will one file work in the htdocs folder?
Thanks for any help given,
Paul.
Windows 7 Ultimate - Pack 1 Build 7601
Intel Pentium 4 CPU 3.60GHz, 3600 MHz, 1 Core, 2 Logical Processors
Physical Memory 4.00 GB