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. 抽象类 abstract class 接口

    一.抽象类 1.没有具体的实例. 不可实例化,不能创建对象. 2.抽象类有构造器. 二.abstract 方法. 1.没有方法体. 子类必须重写抽象类的所有抽象方法,才能实例化,否则子类也为抽象类. ...

  2. 2018-12-29-WPF-如何建立自己的-3d-gis-程序

    title author date CreateTime categories WPF 如何建立自己的 3d gis 程序 lindexi 2018-12-29 14:11:11 +0800 2018 ...

  3. vs dump调试

    1. dump文件和pdb文件的匹配问题 >> 发布二进制文件时生成的pdb文件一定要保留,只有当发布的二进制文件和pdb文件是同时生成的才好正确调试. 2. dump文件和pdb文件放在 ...

  4. C++中数字转换成字符串

    头文件:<string> 转换函数:to_string(); 例如:int n=10;  string str=to_string(n) ;

  5. Directx教程(30) 如何保证渲染物体不会变形

    原文:Directx教程(30) 如何保证渲染物体不会变形      在Directx11教程(6)中, 我们曾经实现过这个功能,但那时是在SystemClass中,处理WM_SIZE时候,重新调用m ...

  6. Jmeter VS LR参数取值方式和迭代方式

    Jmeter的参数化 Jmeter中的参数就是变量. 变量的来源:测试计划.UDV.CSV.函数.正则表达式.数据库. 以Jmeter的CSV文件参数化为例:

  7. python 模块的作用

  8. @topcoder - SRM766R1 D1L3@ ShortestMissingSubsequences

    目录 @description@ @solution@ @accepted code@ @details@ @description@ 给定一个大小为 G 的字符集,并给定一个长度为 N 的字符串 A ...

  9. 【时光回溯】【JZOJ3571】【GDKOI2014】内存分配

    题目描述 输入 输出 输出m行,每行一个整数,代表输入中每次程序变化后系统所需要的空闲内存单位数. 样例输入 2 3 1 4 1 4 2 2 1 2 1 1 1 1 1 样例输出 2 3 1 数据范围 ...

  10. n!素因子p的幂 swjtuOJ 2090【数论】

    原文地址:http://blog.csdn.net/u012717411/article/details/47334969(感谢作者) 素因子分解写的非常好!数论一道好题:给以两个大整数n,s(n&l ...