说明如下:
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.