(1)首先查看*.conf 是否有读写权限,如果没有要将文件赋予读写权限,比如

sudo chmod  localhost.conf

(2)再查看/Users/username/Sites/localhost/文件夹是否有index.html文件,没有的话,创建一个,默认是打开index.html文件

(3)最后查看localhost配置文件

对于OSX 10.9 Apache 2.2

<VirtualHost *:>
DocumentRoot "/Users/xx/Sites/localhost"
ServerName localhost
ErrorLog "/Users/xx/Sites/logs/localhost-error_log"
CustomLog "/Users/xx/Sites/logs/localhost-access_log" common
<Directory "/Users/xx/Sites/localhost">
Order deny,allow
Allow from all
</Directory>
</VirtualHost>

对于OSX 10.10 Apache 2.4

<VirtualHost *:>
DocumentRoot "/Users/xx/Sites/localhost"
ServerName localhost
ErrorLog "/Users/xx/Sites/logs/localhost-error_log"
CustomLog "/Users/xx/Sites/logs/localhost-access_log" common
<Directory "/Users/xx/Sites/localhost">
Require all granted
</Directory>
</VirtualHost>

(4)最后重启apache

 sudo apachectl restart

mac osx Forbidden You don't have permission to access / on this server解决方法的更多相关文章

  1. wampserver You don't have permission to access / on this server. 解决 方法(转,正好碰到这样的事情了就转下来)

    最近在安装最近版wampserver 2.2 d时发现安装好后启动服务器,访问localhost显示You don't have permission to access / on this serv ...

  2. wampserver You don't have permission to access / on this server. 解决方法

    最近在安装最近版wampserver 2.2 d时发现安装好后启动服务器,访问localhost显示You don't have permission to access / on this serv ...

  3. localhost访问错误Forbidden You don't have permission to access / on this server.解决办法(亲测)

    在httpd.conf文件下找到这段: <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow D ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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的版本问 ...

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

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

  9. MAMP "403 Forbidden You don't have permission to access / on this server."

    2015年01月22日 17:27:31 阅读数:3488 用MAMP搭建本地服务器的时候,设置好ip和端口等属性之后,浏览器访问,报 403错误: Forbidden You don't have ...

随机推荐

  1. APUE学习--第三版apue编译

    第三版apue编译:     1. 首先在  http://www.apuebook.com/   下载源码解压:      tar zxvf src.3e.tar.gz 看完Readme可知,直接执 ...

  2. C#夯实基础之接口(《CLR via C#》读书笔记)

    一. 接口的类型 接口是引用类型.因此从值类型赋值给接口是需要装箱的.如下所示: class Program { static void Main(string[] args) { ISay catS ...

  3. android下giflib

    源码路径: android/external/giflib 用到的该lib的APP: ./external/chromium_org/android_webview/build/aosp_manife ...

  4. 汗,Google又调整了编译工具(升级SDK先备份!!!)

    1./tools 下的apkbuilder消失了 方法一.用老版本ADT中的apkbuilder(apkbuilder.bat--windows) 方法二.重新生成build.xml文件 2.aapt ...

  5. Django~待解决的问题

    1.一个Model.py中简单调用多个数据库,不写数据库路由

  6. STM32F412应用开发笔记之一:初识NUCLEO-F412ZG

    今天终于收到了期待已久的NUCLEO-F412ZG,感谢电子发烧友论坛! 近几年来基本都是在STM32平台上做一些设计开发工作.STM32F103.STM32F107.STM32F429等都应用过,但 ...

  7. angular1.x的简单介绍 (一)

    angular1.x作为经典的mvc框架,可以创建能够复用的组件,也可进行双向数据绑定.国内的vue.js/avaloon.js都是同类型的框架.适合使用angularjs的项目有大型信息化管理系统: ...

  8. NGUI之UIRoot——屏幕的自适应分辨率的计算

    //原来写在其他博客上的东西,搬迁 预备知识: 要明确的三个概念: 设计分辨率:在编辑器上开发UI使用的分辨率.我们所有的UI都是在这个分辨率下设计制作的. 显示区域分辨率:设备上所显示的UI区域在编 ...

  9. windows 用默认软件打开文档

    System.Diagnostics.Process.Start("Explorer.exe", string.Format("/e, \"{0}\" ...

  10. ThreadStart 与ParameterizedThreadStart的区别

    1) ParameterizedThreadStart与ThreadStart 1 static void Main(string[] args) { #region ParameterizedThr ...