禁止MAC OS X Xampp访问

时间:2014-04-09 02:04:09

标签: macos xampp

我已经在我的MAC中安装了XAMPP。

我刚刚尝试打开一个文件夹,它返回了一个错误403:禁止访问!

我在foruns上读到我需要更改httpd存档,但是,在更改之后,没有更改,错误Access禁止!在我的文件夹/网站上继续。

我已更改的http.conf位于:“Applications / XAMPP / xamppfiles / apache2 / conf”

Alias /bitnami/ "/Applications/XAMPP/xamppfiles/apache2/htdocs/"
Alias /bitnami "/Applications/XAMPP/xamppfiles/apache2/htdocs"

    <Directory />
        Options All
        AllowOverride All
        Order deny,allow
        Allow from all
    </Directory>

谢谢!

-

编辑:已解决:http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/

7 个答案:

答案 0 :(得分:32)

此链接非常有用

  

已解决:http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/

您所需要的只是权利。

我没有启用虚拟主机。

我刚刚替换了User daemon

User yourUserName上的/Applications/XAMMP/xammpfiles/etc/httpd.conf

所以我可以访问我的自定义文件夹(在我的情况下通过htdocs文件夹中的符号链接)

答案 1 :(得分:4)

我遇到了同样的错误,但结果证明这是Mac OSX文件系统权限问题,而不是apache配置问题。

每次阅读This article for more details

时可能并非如此

什么解决了我的问题:

我使用 chmod更改了 / Applications / XAMPP / xamppfiles / htdocs / 的权限

^RC Version: ([0-9]+)

答案 2 :(得分:2)

(这个问题由OP解决,并通过编辑问题中的URL来回答。转换为社区维基答案。请参阅Question with no answers, but issue solved in the comments (or extended in chat)

OP写道:

  

已解决:http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/

在SO上不推荐使用仅限URL的答案。总之,博客文章解释了文件/Applications/XAMPP/xamppfiles/etc/httpd.conf/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf

所需的修改

答案 3 :(得分:1)

我有同样的错误。我查看了错误日志,找到了"xe2\x80\x9c"

原来错误是由httpd-vhosts.conf文件引起的。

错误是由于我的一个定义末尾的Curly引号(DocumentRoot)引起的。文本编辑可能会导致您出现此问题。

使用(直引号)查找并替换"。 保存并重新启动服务器。

有效!

答案 4 :(得分:1)

请在终端输入,然后按enter键

sudo chmod 777 /Applications/XAMPP/xamppfiles/htdocs/

答案 5 :(得分:0)

更改htdocs中应用程序文件夹的权限

示例:

sudo chmod -R 777示例

重新启动apache

http://localhost/example

答案 6 :(得分:0)

对我来说,问题在于

/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf

通过它,我保留了之前驻留在其中的默认虚拟主机。但是它们配置错误。

评论后。该服务器可以像以前一样完美运行

相关问题