2015年01月22日 17:27:31

阅读数:3488

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

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

改成:

<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,就报错了。如果访问目录下的某个文件就没问题。

MAMP "403 Forbidden You don't have permission to access / on this server."的更多相关文章

  1. 蛋疼的 403 Forbidden You don’t have permission to access / on this server.

    参考博文: a.http://www.linuxidc.com/Linux/2016-09/134827.htm 这个解释挺好 昨天配置新服务器:以为自己老手  就一步到位结果一直出现 403 For ...

  2. php多站点配置以及Forbidden You don't have permission to access / on this server问题解决

    php多站点配置以及Forbidden You don't have permission to access / on this server问题解决 一.总结 一句话总结:我的问题是php的版本问 ...

  3. Forbidden You don't have permission to access / on this server. You don't have permission to access /phpmyadmin/ on this server. 解决办法

    Forbidden  You don't have permission to access / on this server.   解决办法 打开 httpd.conf 文件, 将 #   onli ...

  4. PHP错误:Forbidden You don't have permission to access / on this server.

    今天在测试一个php程序的时候,发现这个问题: Forbidden You don't have permission to access / on this server. 开始的时候我是用http ...

  5. Forbidden You don't have permission to access / on this server.

    原文:Forbidden You don't have permission to access / on this server. Forbidden You don't have permissi ...

  6. 403/you don't have the permission to access on this server

    Localhost/index.php出现 错误403 you don't have the permission to access on this server 现在已经解决,特将方法与大家分享. ...

  7. Forbidden You don't have permission to access / on this server PHP

    在新安装的谷歌游览器里,打不了PHP网站了,错误显示: Forbidden You don't have permission to access / on this server. 原因还是配置权限 ...

  8. server下apache2.4.*虚拟主机配置Forbidden You don't have permission to access / on this server.

    前言: 继前面两节笔记之后,在配置一个虚拟主机时,这中间却遇见了一个问题,这里需要描述做一下笔记,刚刚安装的是Ubuntu server,apt-get下来的apache的版本是2.4.7,之前一直用 ...

  9. Apache error: 403 Forbidden You don't have permission to access

    CentOS 6 solution: chcon -t httpd_sys_content_t -R /directory refer to: https://www.centos.org/forum ...

随机推荐

  1. Mathematica 和 MATLAB、Maple 并称为三大数学软件

    Mathematica是一款科学计算软件,很好地结合了数值和符号计算引擎.图形系统.编程语言.文本系统.和与其他应用程序的高级连接.很多功能在相应领域内处于世界领先地位,它也是使用最广泛的数学软件之一 ...

  2. LintCode A+B问题

    给出两个整数a和b, 求他们的和, 但不能使用 + 等数学运算符. 说明 a和b都是 32位 整数么? 是的 我可以使用位运算符么? 当然可以 样例 如果 a=1 并且 b=2,返回3 1.(忽略进位 ...

  3. nth-child和nth-of-type的使用案列

    HTML: <div id="footer-f"> <ul class="trajectory"> <li> <div ...

  4. 在Eclipse中添加Tomcat

    在Eclipse中开发web或开启web服务需要Tomcat的支持,在添加Tomcat之前要清楚你的Eclipse版本,如果你的Eclipse是javvEE版的就可以直接安装Tomcat,如果不是就需 ...

  5. docker入门 基础命令 docker安装

    docker入门   在学一门新知识的时候,超哥喜欢提问,why?what?how? wiki资料 什么是docker Docker 最初是 dotCloud 公司创始人 Solomon Hykes ...

  6. bzoj1191 超级英雄

    Description 现在电视台有一种节目叫做超级英雄,大概的流程就是每位选手到台上回答主持人的几个问题,然后根据回答问题的多少获得不同数目的奖品或奖金.主持人问题准备了若干道题目,只有当选手正确回 ...

  7. C++之ARX,Acstring,ACahr转char

    AcDbText* pText = AcDbText::cast(pEnt); AcString sText = DBHelper::AcStringFree(pText->textString ...

  8. php输入流简单小例子

    <form method="post" action="index.php/home/index/captchaTest"> <input n ...

  9. 让开发部署提速 8 倍,我参与贡献这款 IDE 插件的全过程

    如何像参与开源那样,去参与一款 IDE 插件的设计? 作为一款 IDE 插件的使用者,我是否能决定下一个版本的功能? 自从产品经理银时小伙和他的开发小哥们在去年12月发布 Cloud Toolkit( ...

  10. linux log4cplus安装和实例

    tar –xvf  log4cplus-1.1.3-rc5.tar.gz cd log4cplus-1.1.3-rc5 configure --prefix=/usr/local/log4cplus ...