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 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
哈哈,博客排版真的漂亮呢~
[***.90.31.176]2024年04月17日 19时36分19秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
025_everything搜索使用体验
2019-04-27
026_好用的windows小工具clover
2019-04-27
027-Mac触摸板实现窗口移动
2019-04-27
028_AUTOSAR RTE学习笔记-1
2019-04-27
029_AUTOSAR VFB学习笔记-2
2019-04-27
030_AUTOSAR软件组件学习笔记
2019-04-27
031_AUTOSAR学习笔记_BSW
2019-04-27
032_AUTOSAR学习笔记_接口
2019-04-27
033_PowerShell学习初探
2019-04-27
034_PowerShell中的HOME环境变量
2019-04-27
模拟登陆C#实现
2019-04-27
【Task05】LeetCode腾讯精选打卡
2019-04-27
掌握JS压缩图片,这一篇就够了
2019-04-27
2020大厂web前端面试都喜欢问这些
2019-04-27
云计算的可信新边界:边缘计算与协同未来
2019-04-27
利用文字技术帮助选购商品,慧眼“识”物的人都这样做……
2019-04-27
go gin 上传文件 目录不存在 创建目录
2019-04-27
4G EPS 第四代移动通信系统
2019-04-27
用 C 语言开发一门编程语言 — 变量元素设计
2019-04-27
Linux 操作系统原理 — 文件系统 — 虚拟文件系统
2019-04-27