Wamp2.5(Apache2.4.9)外网访问403(Forbidden)错误
发布日期:2022-03-30 20:19:28 浏览次数:29 分类:博客文章

本文共 1434 字,大约阅读时间需要 4 分钟。

把wamp配置到Azure上之后,倒腾好久都没有解决403错误问题,网上百度了很多资料,差不多都是这样修改的:

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

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

<Directory />

  AllowOverride All

    OptionsNone
    Orderallow,deny
    Deny from all
</Directory>

将其改为

<Directory"c:/wamp/apache2/cgi-bin">

  AllowOverride All

    OptionsNone
    Orderallow,deny
    Allow from all
</Directory>

 

但实际上在后面的版本中,这样修改仍然会出现403错误,归其原因有两点:

1、2.5版本之后新增了一些命令;

2、单单配置这一个地方没有用。

 

后来继续查询资料,然后多次尝试之后发现这样改可以解决问题:

将“httpd.conf”下240行处改为:

AllowOverride none Require all granted

将“httpd.conf”下约254行处改为:

# # 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

然后保存后退出,重启Wamp就可以了。

 

转载地址:https://www.cnblogs.com/aidenchen8/p/6812380.html 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:前端js调用navigator Network Information API获取设备网络状态
下一篇:两种数字删除问题算法比较

发表评论

最新留言

哈哈,博客排版真的漂亮呢~
[***.90.31.176]2024年04月17日 19时36分19秒