无法成功进入子域

无法成功进入子域

我在尝试进入子域时遇到了一点问题,我希望您能让我清楚了解我正在使用的命令行,因为实际上它让我感到困惑。

域的服务器块

listen       80;
server_name  just4bettors.mobi  www.just4bettors.mobi;
root   /home/c0pt/capilleira/capilleiraclickandgamblemobile/www;

对于子域名

listen 80;
server_name www.desktop.just4bettors.mobi desktop.just4bettors.mobi;
root   /home/c0pt/capilleira/capilleiraclickandgambleweb/dist;

域名在这里运行良好,但子域名不行,一旦我将其放入www.desktop.just4bettors.mobi浏览器,我就会收到一条消息Server not found

现在,我在命令行中遇到的问题

如果我做

$ host just4bettors.mobi
  just4bettors.mobi has address 190.171.28.156

上面的那个是正确的,但如果我这样做:

$ host desktop.just4bettors.mobi
  Host desktop.just4bettors.mobi not found: 3(NXDOMAIN)

好的,那里说没有找到子域名。

如果我做

$ dig +trace desktop.just4bettors.mobi

; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> +trace desktop.just4bettors.mobi
;; global options: +cmd
.           501531  IN  NS  f.root-servers.net.
.           501531  IN  NS  e.root-servers.net.
.           501531  IN  NS  m.root-servers.net.
.           501531  IN  NS  j.root-servers.net.
.           501531  IN  NS  h.root-servers.net.
.           501531  IN  NS  a.root-servers.net.
.           501531  IN  NS  c.root-servers.net.
.           501531  IN  NS  k.root-servers.net.
.           501531  IN  NS  b.root-servers.net.
.           501531  IN  NS  i.root-servers.net.
.           501531  IN  NS  d.root-servers.net.
.           501531  IN  NS  g.root-servers.net.
.           501531  IN  NS  l.root-servers.net.
.           517068  IN  RRSIG   NS 8 0 518400 20150409170000 20150330160000 16665 . BzguVAWJRGszQChsRtOjy70WLm3b8tLD8UMF2E/+Lpg2DMDsE98I7FEA Wsjt9xk922XISUC87Bw38jToiuthW6XxkMAbXiQvtQylmoNBNjAjNrL6 mZezPNnYLO9shiB+awce1+k/JEivmGoPmo9DW5eBmZ0D0GxfCSczMjae KEM=
;; Received 913 bytes from 127.0.0.1#53(127.0.0.1) in 6 ms

mobi.           172800  IN  NS  a0.mobi.afilias-nst.info.
mobi.           172800  IN  NS  a2.mobi.afilias-nst.info.
mobi.           172800  IN  NS  b0.mobi.afilias-nst.org.
mobi.           172800  IN  NS  b2.mobi.afilias-nst.org.
mobi.           172800  IN  NS  c0.mobi.afilias-nst.info.
mobi.           172800  IN  NS  d0.mobi.afilias-nst.org.
mobi.           86400   IN  NSEC    moda. NS RRSIG NSEC
mobi.           86400   IN  RRSIG   NSEC 8 1 86400 20150409170000 20150330160000 16665 . 1MbFsEBpYrLlxRGsBsktvDt8Qqk7n1ZSPOfpR5H+oMZL+RY0ng4n0azO Bf8ylaCkFryQOPc+LTb8DBwRi9q7eRfBDJp/kZQ/jKZErzWaYqu8GHwj hjDjVCV4rR4LdVSGX9wiXWQB1TZjUOIRO3kdfEiGlxFactSgVeCZdQZ0 QWU=
;; Received 646 bytes from 128.63.2.53#53(h.root-servers.net) in 113 ms

just4bettors.mobi.  86400   IN  NS  ns1.capilleira.com.
just4bettors.mobi.  86400   IN  NS  ns2.capilleira.com.
just4bettors.mobi.  86400   IN  NS  udns1.ultradns.net.
just4bettors.mobi.  86400   IN  NS  udns2.ultradns.net.
;; Received 156 bytes from 199.249.118.1#53(a2.mobi.afilias-nst.info) in 359 ms

desktop.just4bettors.mobi. 38400 IN A   190.171.28.156
desktop.just4bettors.mobi. 38400 IN NS  ns2.capilleira.com.
desktop.just4bettors.mobi. 38400 IN NS  ns1.capilleira.com.
;; Received 152 bytes from 196.40.69.98#53(ns1.capilleira.com) in 1 ms

最后一个似乎就像是将desktop.just4bettors.mobi附加到190.171.28.156?所以,我仍然不明白为什么我无法访问我的子域。

答案1

您必须等待 DNS 传播,时间取决于区域文件上设置的 TTL。

https://www.whatsmydns.net/#A/desktop.just4bettors.mobi(对这个网站不太了解)

+trace选项让你感到困惑,因为它的工作原理如下:

(手册页)

+[no]trace 启用对正在查找的名称的根名称服务器的委托路径的跟踪。默认情况下,跟踪处于禁用状态。启用跟踪后,dig 将进行迭代查询以解析正在查找的名称。它将遵循来自根服务器的引用,显示用于解析查找的每个服务器的答案。

至少,您向您的 DNS 服务器询问,它显然有答案:(ns1.capilleira.com)。

dig @196.40.69.98 desktop.just4bettors.mobi A +short
190.171.28.156

但是您用来浏览网页的 DNS 服务器又如何呢:

(例如 OpenDNS)

dig @208.67.222.222 desktop.just4bettors.mobi A

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @208.67.222.222 desktop.just4bettors.mobi A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 59389
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;desktop.just4bettors.mobi. IN  A

;; AUTHORITY SECTION:
just4bettors.mobi.  2772    IN  SOA udns1.ultradns.net. pvargas.capilleira.com. 2012062805 10800 3600 2592000 86400

;; Query time: 5 msec
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Tue Mar 31 00:24:32 2015
;; MSG SIZE  rcvd: 119

相关内容