我看到很多人使用 IP 地址,例如,
ec2-54.208.90.77.compute-1.amazonaws.com
仅供参考,这是我的实际实例 IP 地址。
然而,当我尝试时,
$ nslookup ec2-54.208.90.77.compute-1.amazonaws.com
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find ec2-54.208.90.77.compute-1.amazonaws.com: NXDOMAIN
54.208.90.77
是我的 Amazon 实例的实际 EIP。为什么这对我不起作用?
答案1
它应该是:
ec2-54-208-90-77.compute-1.amazonaws.com
...正确解析。
此外,该记录是不是a CNAME
. 这是一项A
记录。
~ dig ec2-54-208-90-77.compute-1.amazonaws.com
; <<>> DiG 9.8.3-P1 <<>> ec2-54-208-90-77.compute-1.amazonaws.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65412
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;ec2-54-208-90-77.compute-1.amazonaws.com. IN A
;; ANSWER SECTION:
ec2-54-208-90-77.compute-1.amazonaws.com. 21599 IN A 54.208.90.77
;; Query time: 53 msec
;; SERVER: 192.168.3.1#53(192.168.3.1)
;; WHEN: Mon Apr 7 13:18:57 2014
;; MSG SIZE rcvd: 74