MacOS XAMPP Access Forbidden Error 403 - You don#39;t have permission to access the requested directory(MacOS XAMPP 访问禁止错误 403 - 您无权访问请求的目录)
问题描述
我有一些 PHP Web 应用程序在 macOS 10.15 上运行 XAMPP 7.4.1.XAMPP 过去曾为我工作过.我把我的开发环境搞砸了,因为 32 位应用程序在 Catalina 的基础上搞砸了,而且我的旧 XAMPP 安装没有打开.我恢复了我的 VirtualHosts 设置,但现在当我尝试访问我的一个网站时,我收到以下错误.
I have some PHP web apps running off XAMPP 7.4.1 on macOS 10.15. XAMPP has worked for me in the past. I got my dev environment screwed up because 32 bit apps sh*t the bed with Catalina, and my old XAMPP installation didn't open. I got my VirtualHosts set back up, but now when I try to access one of my sites I get the following error.
Access forbidden!
You don't have permission to access the requested directory. There is
either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
我的虚拟主机如下所示:
My virtual hosts look like the following:
# localhost
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/htdocs">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
#####################
# PERSONAL PROJECTS #
#####################
# Dunsparce.net
<VirtualHost *:80>
ServerName dunsparce.net
DocumentRoot "/Users/danielschnoll/Documents/Projects/Dunsparce.net"
<Directory "/Users/danielschnoll/Documents/Projects/Dunsparce.net">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/dunsparce-error_log"
</VirtualHost>
我列出了更多虚拟主机,它们都遵循相同的格式.我在每一个上都有 Require all grant
以及 Allow Override All
和 Options...
行.就像我在帖子开头所说的那样,他们过去都工作过.我的 httpd.conf
文件中也有 # Include
未注释,尽管我很确定 Access Forbidden 错误与它完全无关.
I have more VirtualHosts listed and they all follow the same format. I have Require all granted
on each one, as well as the Allow Override All
and the Options...
line. Like I said at the start of the post, they all worked in the past. I also have the # Include
uncommented in my httpd.conf
file, though I'm pretty sure Access Forbidden error is completely unrelated to it.
有什么想法吗?
推荐答案
我不得不再次编辑 httpd.conf
.User
组权限有一个部分.默认情况下它说
I wound up having to edit httpd.conf
again. There’s a section for User
group permissions. By default it says
User daemon
Group daemon
将 User
从 daemon
更改为您的 macOS 用户名.对我来说,我的 User
组现在看起来像
Change the User
from daemon
to your macOS Username. For me, my User
group now looks like
User danielschnoll
Group daemon
这篇关于MacOS XAMPP 访问禁止错误 403 - 您无权访问请求的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MacOS XAMPP 访问禁止错误 403 - 您无权访问请求的目录
基础教程推荐
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01