从品牌网站建设到网络营销策划,从策略到执行的一站式服务
问题:今天配制一个测试机服务器 Apache2.4.9本地访问正常但是在局域网或外网IP拒绝访问
局域网浏览器报错如下图:
查看Apache报错日志如下信息:
[Fri May 13 15:10:08.565138 2016] [authz_core:error] [pid 4964:tid 836] [client 192.168.0.200:53640] AH01630: client denied by server configuration: F:/wamp/www/test/
[Fri May 13 15:10:09.749206 2016] [authz_core:error] [pid 4964:tid 836] [client 192.168.0.200:53640] AH01630: client denied by server configuration: F:/wamp/www/test/
解决如下:
1、关闭防火墙(注:包括杀毒软件,防火墙),当然你也可以写规则开放你服务器的端口
a、一般如果你的Apache是2.2版本以下的配制如下虚拟主机就可以解决此问题
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
ServerAdmin 826096331@qq.com
DocumentRoot "F:/wamp/www/test"
ServerName www.test.com
DirectoryIndex index.php index.html
ServerAlias test.com
ErrorLog "logs/test.bin-error_log"
CustomLog "logs/test.bin-access_log" common
b、如果你的Apache服务器是2.4.0以上的版本你还需要做第2步
2、 在虚拟主机配制文件中添加 Require all granted
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
ServerAdmin 826096331@qq.com
DocumentRoot "F:/wamp/www/test"
ServerName www.test.com
DirectoryIndex index.php index.html
ServerAlias test.com
ErrorLog "logs/test.bin-error_log"
CustomLog "logs/test.bin-access_log" common
3、重启你自己的Apache服务器生效
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询028-86922220
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图