Configure the Virtual Host as follows:
Order Deny,Allow
Deny from all
Allow from 11.211.0.0/15
Allow from 12.212.0.0/15
Require valid-user
Satisfy all
AuthName “Restricted Area”
AuthType Basic
AuthUserFile /home/web/.htpasswd
Require valid-user
Create file with the following command:
htpaddwd /home/web/.htpasswd
Another option:
1. Type the following text into your VirtualHost file:
Allow from all
Deny from [Enter IP address here]
2. Save the file.
Alternatively, you may specify the directory by using:
Order Allow,Deny
Allow from all
Deny from [Enter IP address here]