Loading [MathJax]/jax/output/CommonHTML/config.js
前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >MAMP “403 Forbidden You don’t have permission to access / on this server.”

MAMP “403 Forbidden You don’t have permission to access / on this server.”

作者头像
全栈程序员站长
发布于 2021-12-23 09:59:29
发布于 2021-12-23 09:59:29
72400
代码可运行
举报
运行总次数:0
代码可运行
2015年01月22日 17:27:31

用MAMP搭建本地服务器的时候,设置好ip和端口等属性之后,浏览器访问,报 403错误:

 Forbidden  

You don’t have permission to access / on this server.

google之后,stackoverflow已有类似的问题:http://stackoverflow.com/questions/10873295/error-message-forbidden-you-dont-have-permission-to-access-on-this-server

主要有以下方法是:

将 /Application/MAMP /conf/ apache/httpd.conf  中的如下部分

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制

 <Directory />
     Options FollowSymLinks
     AllowOverride All
     Order deny,allow
     Allow from all
 </Directory>
 set the options to : Options Indexes FollowSymLinks Includes ExecCGI

改成:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
 <Directory />
     #Options FollowSymLinks
     Options Indexes FollowSymLinks Includes ExecCGI
     AllowOverride All
     Order deny,allow
     Allow from all
 </Directory>

也有人提出是访问权限的问题,就是进程的拥有者没有访问Document root的权限,原话如下:

Also, one should check the folder’s permissions so that the Apache process’ owner has permissions to read/execute the specified path for the virtual host. On Windows this could rarely be a problem but on Linux it can be a more frequent cause of 403.

看到这我才想到原来我将Document root 设在了桌面。而我直接访问Document root,就报错了。如果访问目录下的某个文件就没问题。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/113346.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021年10月19日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
加入讨论
的问答专区 >
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
    本文部分代码块支持一键运行,欢迎体验
    本文部分代码块支持一键运行,欢迎体验