阿帕奇给了我403禁止访问时的DocumentRoot指向两种不同的驱动器 [英] Apache gives me 403 Access Forbidden when DocumentRoot points to two different drives
问题描述
我收到一个403试图访问一个虚拟主机所在的文档根目录是坐在不同的驱动器上不到哪里Apache是坐下打开一个页面时,禁止的。我安装使用apachefriends发布。这是我的httpd-vhosts.conf文件:
I am getting an 403 access forbidden when attempting to open a page under a vhost where the document root is sitting on a different drive than where apache is sitting. I installed using the apachefriends release. This is my httpd-vhosts.conf file:
NameVirtualHost 127.0.0.1
<虚拟主机127.0.0.1>
服务器名foo.localhost
的DocumentRootC:/ XAMPP / htdocs中/富/公
< /虚拟主机>
<VirtualHost 127.0.0.1> ServerName foo.localhost DocumentRoot "C:/xampp/htdocs/foo/public" </VirtualHost>
&LT;虚拟主机127.0.0.1>
服务器名bar.localhost
的DocumentRootF:/酒吧/公
&LT; /虚拟主机>
<VirtualHost 127.0.0.1> ServerName bar.localhost DocumentRoot "F:/bar/public" </VirtualHost>
当我在浏览器中打开bar.localhost,阿帕奇是给我403禁止访问。我试着设置很多不同的访问权限,甚至完全权限给大家,但没有我试图帮助。
When opening bar.localhost in my browser, Apache is giving me 403 Access Forbidden. I tried setting lots of different access rights, even full rights to everyone, but nothing I tried helped.
编辑:谢谢你!对于未来的参考,增加索引选项中显示目录索引。
Thanks! For future reference, add 'Options indexes' within to show directory indexes.
推荐答案
您并不需要
Options Indexes FollowSymLinks MultiViews Includes ExecCGI
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
你所需要的唯一的事情就是...
the only thing what you need is...
Require all granted
...目录段内。
...inside the directory section.
请参阅阿帕奇2.4升级端:
See Apache 2.4 upgrading side:
<一个href=\"http://httpd.apache.org/docs/2.4/upgrading.html\">http://httpd.apache.org/docs/2.4/upgrading.html
这篇关于阿帕奇给了我403禁止访问时的DocumentRoot指向两种不同的驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!