当我尝试在我的MAC上运行XAMPP的安装时,我不断收到禁止访问错误403
我正在/Applications/XAMPP/htdocs
之外运行项目。在我的/Users/my_user_name/Projects/
目录中。
每次尝试访问虚拟主机时,我都会收到403错误:禁止访问。
我已经编辑了httpd-vhosts.conf文件,并且允许在httpd.conf中使用虚拟主机。
我还在httpd.conf中将用户和组设置为用户my_user_name和组Admin
我什至尝试更改所有文件和目录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:
不确定要检查或尝试的内容。请帮助大声笑。
只需在这里得到答案:您可以通过在httpd-vhosts.conf中的每个Require all granted
上添加VirtualHost
来允许访问:
# VirtualHost for my.site.com <VirtualHost *:80> ServerAdmin [email protected] 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>
祝你好运!
我一直遇到这个403问题,直到找不到答案...
就我而言,问题在于用户定义httpd.conf
我在以下链接中找到了可以解决我的问题的东西。我希望这可以节省一些人拉头发的时间。哈哈
我收到此错误是因为我忘记将我的'DocumentRoot'网址和'Directory'网址设置为相同。
我通过删除httpd-vhosts.conf中的标准虚拟主机解决了该问题。只保留所需的虚拟主机配置。