我的服务器正在返回我的所有域的正确路径,只要它们不以 www 为前缀。以下是我的最简单形式的域之一:
<VirtualHost *:80>
ServerName kyle-o.info
ServerAlias www.kyle-o.info
DocumentRoot /home/kyle/www/kyle-o.info
</VirtualHost>
如果需要的话我可以提供日志。服务器正在运行 Ubuntu:
Distributor ID: Ubuntu
Description: Ubuntu 12.10
Release: 12.10
Codename: quantal
答案1
DNS
A
的记录不www.kyle-o.info
存在,因此您需要修复 ,DNS
以使其按预期工作:
$ dig kyle-o.info any
; <<>> DiG 9.9.2-P1-RedHat-9.9.2-3.P1.fc17 <<>> kyle-o.info any
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49816
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 3, ADDITIONAL: 4
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;kyle-o.info. IN ANY
;; ANSWER SECTION:
kyle-o.info. 7200 IN SOA ns1.digitalocean.com. hostmaster.kyle-o.info. 1360369139 3600 900 1209600 10800
kyle-o.info. 7034 IN A 192.81.212.242
kyle-o.info. 7200 IN NS ns2.digitalocean.com.
kyle-o.info. 7200 IN NS ns1.digitalocean.com.
kyle-o.info. 7200 IN NS ns3.digitalocean.com.
;; AUTHORITY SECTION:
kyle-o.info. 7200 IN NS ns3.digitalocean.com.
kyle-o.info. 7200 IN NS ns1.digitalocean.com.
kyle-o.info. 7200 IN NS ns2.digitalocean.com.
;; ADDITIONAL SECTION:
ns1.digitalocean.com. 7028 IN A 69.55.55.74
ns2.digitalocean.com. 7028 IN A 141.0.175.217
ns3.digitalocean.com. 7028 IN A 69.55.62.20