gpt4 book ai didi

macos - XAMPP (Mac) 虚拟主机显示 403

转载 作者:行者123 更新时间:2023-12-03 20:50:14 24 4
gpt4 key购买 nike

当我尝试在我的 MAC 上运行我的 XAMPP 安装时,我不断收到访问禁止错误 403

我在 /Applications/XAMPP/htdocs 之外运行该项目.它在我的 /Users/my_user_name/Projects/目录。

每次我尝试访问我的虚拟主机时,都会收到 403 错误:禁止访问。

我已经编辑了我的 httpd-vhosts.conf 文件,并且我在 httpd.conf 中允许了虚拟主机。

我还在 httpd.conf 中将用户和组设置为用户 my_user_name 和组管理员

我什至尝试 chmoding 我的所有文件和目录 777,但我仍然禁止访问。

我还在新安全设置的 httpd-xampp.conf 文件中将拒绝更改为允许。

XAMPP 提供的 erro_log 没有提到 403 错误我确实在访问日志中看到它为 127.0.0.1 - - [21/Aug/2013:14:45:20 -0400] "GET / HTTP/1.1" 403 1034
我打开了错误,我看到了这个 [authz_core:error] [pid 52813] [client 127.0.0.1:57473] AH01630: client denied by server configuration:
不知道还有什么要检查或尝试的。请帮助大声笑。

最佳答案

只是在这里有答案:
您可以通过添加 Require all granted 来允许访问每个VirtualHost在您的 httpd-vhosts.conf 中:

# VirtualHost for my.site.com
<VirtualHost *:80>
ServerAdmin webmaster@site.com
DocumentRoot "/Users/me/www/my.site.com/"
ServerName my.site.com
<Directory "/Users/me/www/my.site.com">
ServerSignature Off
Options Indexes FollowSymLinks IncludesNoExec
AllowOverride All

#Order allow,deny <- You can remove this
#Allow from all <- and that

# Insert the following:
Require all granted

</Directory>
</VirtualHost>

祝你好运!

关于macos - XAMPP (Mac) 虚拟主机显示 403,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18365500/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com