[英]Apache Vhost subdomain wildcard
I'm trying to get subdomains working in Apache, but it won't work for me. 我正在尝试让子域在Apache中工作,但对我来说不起作用。 I've already tryed Virtualhost For Wildcard Subdomain and Static Subdomain .
我已经尝试过将Virtualhost用于通配符子域和静态子域 。 My code for now:
我现在的代码:
<VirtualHost *:80>
DocumentRoot /Bestanden/webserver/vandervoorden.com/other
ServerName other.vandervoorden.com
ServerAlias *.vandervoorden.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /Bestanden/webserver/vandervoorden.com
<Directory "/Bestanden/webserver/vandervoorden.com">
allow from all
Options +Indexes
</Directory>
ServerName vandervoorden.com
</VirtualHost>
The second VHost will react on vandervoorden.com and www.vandervoorden.com, but when I browse to didntexist.vandervoorden.com I recieve a page not found. 第二个VHost将在vandervoorden.com和www.vandervoorden.com上做出反应,但是当我浏览到didtexist.vandervoorden.com时,我收到一个未找到的页面。
you need to configure your dns to return an ip for didntexist.vandervoorden.com 您需要配置您的DNS以返回didtexist.vandervoorden.com的IP
$ dig didntexist.vandervoorden.com A
; <<>> DiG 9.8.3-P1 <<>> didntexist.vandervoorden.com A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61164
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;didntexist.vandervoorden.com. IN A
;; AUTHORITY SECTION:
vandervoorden.com. 14400 IN SOA nszero1.axc.nl. hostmaster.vandervoorden.com. 2013071200 14400 3600 1209600 86400
;; Query time: 169 msec
;; SERVER: 129.13.64.5#53(129.13.64.5)
;; WHEN: Mon Jul 15 12:07:03 2013
;; MSG SIZE rcvd: 107
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.