当前位置: 移动技术网 > 网络运营>服务器>Linux > apache中封IP的实现方法

apache中封IP的实现方法

2019年05月06日  | 移动技术网网络运营  | 我要评论
说明如下:

1. 在配置文件里设置:

打开httpd.conf编辑,将下列block如下编辑:
httpd.conf

复制代码 代码如下:

<directory “/var/www/html”>
options indexes followsymlinks
allowoverride none
order allow,deny
allow from all
deny from 124.114.0.
deny from 124.115.0.
</directory>

.htaccess文件法(在网站根目录下建立或打开.htaccess文件,加入如下内容)
复制代码 代码如下:

order allow,deny
allow from all
deny from 124.114.0.
deny from 124.115.0.

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网