Tag Archives: Nginx+Apache

Apache allows specified IP access

system CentOS7.0

sets the site directory permissions to allow only specified IP access. Usually used for internal testing.

code as follows:

#just allow from xx's ip
<Directory "/data/www/xxoo">
Options All
AllowOverride None
Order Deny,Allow
Deny From all
Allow From 192.168.0.0/24
Allow From 127.0.0.1
Allow From xx.xx.xx.xx/28
</Directory>