XAMPP (Mac) 虚拟主机显示 403 [英] XAMPP (Mac) Virtual host showing 403
问题描述
当我尝试在我的 MAC 上运行我的 XAMPP 安装时,我不断收到访问禁止错误 403
I keep getting Access Forbidden Error 403 when I try running my installation of XAMPP on my MAC
我在 /Applications/XAMPP/htdocs
之外运行该项目.它在我的 /Users/my_user_name/Projects/
目录中.
I am running the project outside of /Applications/XAMPP/htdocs
. It's in my /Users/my_user_name/Projects/
directory.
每次我尝试访问我的虚拟主机时,我都会收到 403 错误:访问被禁止.
Every time I try and go to my virtualhost I get a 403 error: Access forbidden.
我已经编辑了我的 httpd-vhosts.conf 文件,并且我在 httpd.conf 中允许了虚拟主机.
I have edited my httpd-vhosts.conf file and I have allowed Virtual hosts in httpd.conf.
我还在 httpd.conf 中将用户和组设置为用户 my_user_name 和组管理员
I have also set the User and Group to User my_user_name and Group Admin in httpd.conf
我什至尝试修改我的所有文件和目录 777,但仍然禁止访问.
I even tried chmoding all my files and directory 777 but I still get Access forbidden.
我还在新安全设置的 httpd-xampp.conf 文件中将拒绝更改为允许.
I have also change Deny to Allow in the httpd-xampp.conf file in the new security settings.
XAMPP 提供的 erro_log 没有提到 403 错误我在我的访问日志中看到它作为 127.0.0.1 - - [21/Aug/2013:14:45:20 -0400] "GET/HTTP/1.1" 403 1034
The erro_log provided by XAMPP doesn't mention the 403 error I do see it in my access log as 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:客户端被服务器配置拒绝:
I turned on errors and I am seeing this [authz_core:error] [pid 52813] [client 127.0.0.1:57473] AH01630: client denied by server configuration:
不确定还要检查或尝试什么.请帮助大声笑.
Not sure what else to check or try. Please help lol.
推荐答案
就在这里得到答案:您可以通过向 httpd-vhosts.conf 中的每个 VirtualHost
添加 Require all allowed
来允许访问:
Just to have the answer right here:
You can permit access by adding Require all granted
to each VirtualHost
in your 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>
祝你好运!
这篇关于XAMPP (Mac) 虚拟主机显示 403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!