在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放到里面就可以了

原文地址:https://www.cnblogs.com/yangxiaocheng/p/4253238.html