First edit the file /www/wdlinux/apache/conf/vhost/00000.default.conf

and add the additional line to the directory settings:

<Directory /www/web/default/>
order deny,allow
deny from all
allow from 127.0.0.1
allow from 192.168.1.0/15
</Directory>

If you wanted to allow access to everybody then you could just change it to:

<Directory /www/web/default/>
order allow,deny
allow from all
</Directory>

Allow in all sections of the file.

A restart (service httpd restart) is enough to pick this up.

这样都可以访问,

如果想只在服务器里面能访问,可以如下配置:

<Directory /www/web/default/>
Options Indexes FollowSymLinks MultiViews

AllowOverride all

Order Deny,Allow

deny from all

allow from 127.0.0.1

allow from 133.99.108.60 #133.99.108.60为服务器ip

</Directory>

 

posted on 2016-05-13 20:10  袁晓平  阅读(525)  评论(0编辑  收藏  举报