您的足迹:首页 > apache >wamp2.5 新版配置后外网访问 Forbidden

wamp2.5 新版配置后外网访问 Forbidden

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

 

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

安装路径:D:wamp

1、在D:wampbinapacheapache2.4.9conf目录下找到“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了。
本博客所有文章如无特别注明均为原创。作者:fly复制或转载请以超链接形式注明转自 PHPWinner
原文地址《wamp2.5 新版配置后外网访问 Forbidden

相关推荐

PHPWinner -洛阳市网站制作,偃师市网站制作

联系我