不能得到子网站。通配符 - 子域名可能错误地配置了Apache [英] Can't get to subsites. Wildcard-subdomains probably misconfigured in Apache
问题描述
我建设我在工作组织的门户。
该门户是一个字preSS网站使用Wampserver 2.5,龙头安装一个双赢Server 2008 R2上。
它的正常工作和在企业内部网其他机器入店,归功于很有帮助和病人RiggsFolly。
但现在,我把它变成站点的网络,这样我可以建立子门户网站的不同部门在我的组织。
在这种变化的Word preSS作出上述警告消息:警告!通配符DNS可能未正确配置!
字preSS已经解释了如何在Apache配置通配符子域名页面 - HTTP://$c$cx.word$p$pss.org/Configuring_Wildcard_Subdomains 。
我试过以下,但解释缺乏细节,我可能做错了什么。
在 HTTP所在的服务器和站点都安装在机器上,当我写:// HIPO
(HIPO是当前网站的名称)在浏览器的地址栏,我到达现场罚款。
但是,当我写 HTTP://depa.hipo
(DEPA是我成功创建了子网站),地址变为 HTTP:/ /www.depa.hipo /
和浏览器说,它没有发现在该地址的服务器。
我可能已经设置ServerAlias行错的httpd-vhosts.conf,而且我没加行 *。example.com一个192.0.43.10
,或在我的情况 *黑豹A< rightIP方式>
,因为我不知道在哪里把它添加在文件
这是我的httpd-vhosts.conf文件。你的帮助是AP preciated!
<虚拟主机*:80>
的DocumentRootC:/ WAMP / WWW /黑豹
服务器名HIPO
<目录C:/ WAMP / WWW /黑豹>
所有的AllowOverride
要求所有批准
< /目录>
< /虚拟主机> <虚拟主机*:80>
的DocumentRootC:/ WAMP / WWW /黑豹
服务器名subsites.hipo
ServerAlias * .hipo
<目录C:/ WAMP / WWW /黑豹>
所有的AllowOverride
要求所有批准
< /目录>
< /虚拟主机> <虚拟主机*:80>
的DocumentRootC:/ WAMP / WWW
服务器名本地主机
ServerAlias本地主机
<目录C:/ WAMP / WWW>
所有的AllowOverride
要求所有批准
< /目录>
< /虚拟主机>
这个定义并没有一个ServerAlias所以尝试添加一个类似这样的:
<虚拟主机*:80>
的DocumentRootC:/ WAMP / WWW /黑豹
服务器名HIPO
ServerAlias www.hipo
<目录C:/ WAMP / WWW /黑豹>
所有的AllowOverride
要求所有批准
< /目录>
< /虚拟主机>
I'm building a portal for the organization I'm working at.
The portal is a Wordpress site using Wampserver 2.5, intalled on a Win server 2008 R2.
It's working fine and accesible from other machines over the intranet, thanks to the helpful and patient RiggsFolly.
But now, I have changed it into a network of sites so that I can build sub-portals for the different departments in my organization.
During that change Wordpress gave this warning message: Warning! Wildcard DNS may not be configured correctly!
Wordpress has a page explaining how to configure wildcard subdomains on Apache - http://codex.wordpress.org/Configuring_Wildcard_Subdomains.
I tried following it but the explanation lacks details and I'm probably doing something wrong.
On the machine where the servers and site are installed, when I write http://hipo
(hipo is the current site name) in the browser's address bar, I get to the site fine.
But when I write http://depa.hipo
(depa is a subsite I created successfully), the address changes into http://www.depa.hipo/
and the browser says it didn't find a server at that address.
I have probably set the ServerAlias line wrong in httpd-vhosts.conf, and also I didn't add the line *.example.com A 192.0.43.10
, or in my case *.hipo A <rightIP>
, cause I wasn't sure where to add it in the file.
This is my httpd-vhosts.conf file. Your help is appreciated!
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName subsites.hipo
ServerAlias *.hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
This definition does not have a ServerAlias so try adding one like this:
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName hipo
ServerAlias www.hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
这篇关于不能得到子网站。通配符 - 子域名可能错误地配置了Apache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!