Rob*_*Gee 51 windows apache virtualhost http-status-code-403
尝试在vhost下打开页面时,我获得了403访问权限,其中文档根位于与apache所在位置不同的驱动器上.我使用apachefriends发布安装.这是我的httpd-vhosts.conf文件:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
  ServerName foo.localhost
  DocumentRoot "C:/xampp/htdocs/foo/public"
</VirtualHost>
<VirtualHost 127.0.0.1>
  ServerName bar.localhost
  DocumentRoot "F:/bar/public"
</VirtualHost>
在我的浏览器中打开bar.localhost时,Apache正在给我403 Access Forbidden.我尝试设置了许多不同的访问权限,甚至是对所有人的完全权利,但我尝试过没有任何帮助.
编辑:谢谢!为了将来参考,请在其中添加"选项索引"以显示目录索引.
小智 58
你不需要
Options Indexes FollowSymLinks MultiViews Includes ExecCGI
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
你唯一需要的是......
Require all granted
...在目录部分内.
请参阅Apache 2.4升级方:
http://httpd.apache.org/docs/2.4/upgrading.html
Mar*_*ing 50
在某个地方,您需要告诉Apache,允许人们查看此目录的内容.
<Directory "F:/bar/public">
    Order Allow,Deny
    Allow from All
    # Any other directory-specific stuff
</Directory>
小智 26
对于Apache 2.4.2:当我试图通过WiFi上的iPhone从我的Windows 7桌面访问WAMP时,我得到了403:Forbidden.在一个博客上,我找到了解决方案 - 在<Directory>部分中的Allow all all之后添加Require all grant.这就是我的<Directory>部分在<VirtualHost>中的样子
<Directory "C:/wamp/www">
    Options Indexes FollowSymLinks MultiViews Includes ExecCGI
    AllowOverride All
    Order Allow,Deny
    Allow from all
    Require all granted
</Directory>
| 归档时间: | 
 | 
| 查看次数: | 104626 次 | 
| 最近记录: |