Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在apache虚拟主机中添加本地主机子域_Apache_Wamp - Fatal编程技术网

在apache虚拟主机中添加本地主机子域

在apache虚拟主机中添加本地主机子域,apache,wamp,Apache,Wamp,我正在尝试将hothouse的所有子域重定向到hothouse\testsite,但无法使其正常工作 我不理解DocumentRoot和VirtualDocumentRoot之间的区别,不确定这是否有什么区别 “testsite.hothouse”重定向正常,你知道它为什么不工作吗test.hothouse”或任何子域。hothouse不支持(重定向到“www.subdomain.hothouse”) 我花了一整天的时间试图解决这个问题,我已经清除了所有的浏览器缓存。顺便说一句,我用的是WAMP

我正在尝试将hothouse的所有子域重定向到hothouse\testsite,但无法使其正常工作

我不理解DocumentRoot和VirtualDocumentRoot之间的区别,不确定这是否有什么区别

“testsite.hothouse”重定向正常,你知道它为什么不工作吗test.hothouse”或任何子域。hothouse不支持(重定向到“www.subdomain.hothouse”)

我花了一整天的时间试图解决这个问题,我已经清除了所有的浏览器缓存。顺便说一句,我用的是WAMP

DocumentRoot "D:\wamp\www" 
<Directory "D:\wamp\www"> 
    Options Indexes FollowSymLinks Includes ExecCGI 
    AllowOverride All 
    Order allow,deny 
    Allow from all 
</Directory>

<VirtualHost *:80>  
DocumentRoot "D:\wamp\www"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>  
VirtualDocumentRoot "D:\wamp\www\hothouse\testsite"
ServerName testsite.hothouse
ServerAlias test.hothouse
</VirtualHost>

<VirtualHost *:80>
  VirtualDocumentRoot "D:\wamp\www\hothouse\testsite"
  ServerName subdomain.hothouse
  ServerAlias *.hothouse
</VirtualHost>
DocumentRoot“D:\wamp\www”
选项索引如下SYMLINKS包括ExecCGI
允许超越所有
命令允许,拒绝
通融
DocumentRoot“D:\wamp\www”
服务器名本地主机
VirtualDocumentRoot“D:\wamp\www\hothouse\testsite”
ServerName testsite.hothouse
ServerAlias测试温室
VirtualDocumentRoot“D:\wamp\www\hothouse\testsite”
ServerName subdomain.hothouse
ServerAlias*.hothouse

问题不在于apache设置,但我没有更新我的windows主机文件以重定向到本地主机。

你正在运行什么版本的apache?好吧,我觉得很愚蠢,我需要更改我的windows主机文件。