/www外部的命名虚拟主机上的Wampserver 403 [英] Wampserver 403 on named virtual hosts outside of /www

查看:96
本文介绍了/www外部的命名虚拟主机上的Wampserver 403的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在c:/wamp/www/目录之外创建虚拟主机时,Wampserver告诉我访问被拒绝.我可以在该目录中进行优化.即使建立指向该文件夹的符号链接也可以,但是我宁愿不必使用符号链接.为什么不起作用?

Wampserver tells me accessed denied when I try making a virtual host outside of the c:/wamp/www/ directory. I can make one fine within that directory. Even making a symbolic link to the folder works, but I would rather not have to use symbolic links. Why doesn't it work?

这是我在httpd.conf结尾处使用的代码

Here is the code I use at the end of httpd.conf

NameVirtualHost *:80

<VirtualHost *:80>  
DocumentRoot "c:/wamp/www" 
ServerName localhost 
ServerAlias localhost 
</VirtualHost> 

<VirtualHost *:80>
ServerName local.cascade
DocumentRoot c:/wamp/www/cascade/
</VirtualHost>

<VirtualHost *:80>
ServerName local.md9
ServerAlias local.md9
DocumentRoot "m:/Work/New MD9.ca/site/"
</VirtualHost>

<Directory "m:/Work/New MD9.ca/site/">
    Order Allow,Deny
    Allow from All
</Directory>

级联" vh工作正常.

The "cascade" vh works fine.

推荐答案

我想我应该更仔细地研究一下http.conf.时间不长,主要是评论.麻烦的是这个.

I guess I should have looked at the http.conf more carefully. It's not that long, mostly comments. The troublesome part was this.

# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#

<Directory />
    AllowOverride none
    Require all denied
</Directory>

我将其注释掉,现在可以正常工作,尽管我认为它的安全性较差,但它只是一个测试服务器.

I commented it out and now stuff works, although I guess it's less secure, but it is just a testing server.

我以为<Directory "m:/Work/New MD9.ca/site/">位应该处理它,但我想不是.

I thought the <Directory "m:/Work/New MD9.ca/site/"> bit was supposed to take care of it but I guess not.

这篇关于/www外部的命名虚拟主机上的Wampserver 403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆