在ubuntu 12.04 apache 限制IP访问的方法

环境:ubuntu 14.04 apache2

打开etc/apache2/apache2.conf

在最后面加上一段代码

<Location />

<Limit GET POST PUT>

order allow,deny

allow from all

deny from xxx.xxx.xxx.xxx

</Limit>

</Location>

 

把你需要禁止的IP放到里面就可以了

posted @ 2015-01-27 16:03  嘿嘿哈哈你懂得  阅读(629)  评论(1编辑  收藏  举报