centos-rhel服务器相关 / 未分类 · 2015年5月23日

让Apache禁止IP直接访问的方法

#for
#for yryz.org


AllowOverride All
Options FollowSymLinks
# Order allow, deny
Allow from all
DirectoryIndex index.php index.html index.htm

DocumentRoot "/data/y.org"
DirectoryIndex index.html index.htm index.php
ServerName www.yryz.org
ServerAlias yryz.org

##deny ip


Order Allow,Deny
Deny from all

DocumentRoot "/data/"
DirectoryIndex index.html index.htm index.php
ServerName 12.401.179.153

###********
http://help.aliyun.com/knowledge_detail.htm?knowledgeId=5973898
###********
http://help.aliyun.com/knowledge_detail.htm?knowledgeId=5973898