Wamp2.5(Apache2.4.9)外网访问403(Forbidden)错误

Wamp2.5是新版,搭配的是Apache2.4.9,因为Apache配置命令升级,弄了一个下午,百度了很久都是几乎都是以前2.2的解决方案。

 

先介绍一下环境:Windows+wamp2.5(apache2.4.9)

安装路径:D:\wamp

1、在D:\wamp\bin\apache\apache2.4.9\conf目录下找到“httpd.conf”文件(建议先备份一下)

2、将“httpd.conf”下240行处的:

<Directory />
AllowOverride none
Require all denied
</Directory>

 

更改为

<Directory />
AllowOverride none
 #Require all denied
Require all granted

</Directory>

 

2、将“httpd.conf”下约254行处的:

在“Require local”下面增加一条配置“Require all granted”,保存后退出。我把内容贴上来了。

<Directory “d:/wamp/www/”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
#   AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all

#
# Controls who can get stuff from this server.
#

#   onlineoffline tag – don’t remove
    Require local
</Directory>

 

更改为:

<Directory “d:/wamp/www/”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
#   AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all

#
# Controls who can get stuff from this server.
#

#   onlineoffline tag – don’t remove
  Require local
Require all granted
</Directory>

 

实际上就是在“Require local”下面增加一条配置“Require all granted”,保存后退出。

3、重启Wmapserver,应该就OK了。
 
(转载)

posted on 2015-03-27 13:49  孤云独去闲  阅读(921)  评论(0)    收藏  举报

导航