• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

MAMP "403 Forbidden You don't have permis

mysql 搞代码 4年前 (2022-01-09) 17次浏览 已收录 0个评论

用MAMP搭建本地服务器的时候,设置好ip和端口等属性之后,浏览器访问,报 403错误: Forbidden You don’t have permission to access / on this server. google之后,stackoverflow已有类的问题:http://stackoverflow.com/questions/10873295/error-message

用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 中的如下部分

Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all

set the options to : Options Indexes FollowSymLinks Includes ExecCGI

改成:

#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all


也有人提出是访问权限的问题,就是进程的拥有者没有访问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.


看到这我才想到本文来源gaodai$ma#com搞$$代**码)网@原来我将Document root 设在了桌面。而我直接访问Document root,就报错了。如果访问目录下的某个文件就没问题。


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:MAMP "403 Forbidden You don't have permis

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址