1

我刚刚设置了我的debian 挤压服务器。但是现在我遇到了一个小问题,我无法通过我的域(在本例中为 example.com)访问我的服务器。

我还用 namecheap 注册了一个名称服务器,它“连接”到我的服务器 ip。

这是我的 bind9 named.conf

zone "." {
        type hint;
        file "/etc/bind/db.root";
};

zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

options {
    directory "/var/named";
};

zone "example.com" {
    type master;
    file "e/example.com";
};

这是位于“/var/named/e/”中的相应区域文件

$TTL 2H
@       IN      SOA     ns1.example.tld. hostmaster.example.tld. (
                        1328627781                      ; serial
                        8H                              ; refresh
                        2H                              ; retry
                        4W                              ; expire
                        2H )                            ; minimum TTL

                NS      ns1.example.tld.                 ; name server
                NS      ns2.example.tld.                 ; name server
                MX      10 mail.example.org.             ; mail exchanger
                A       MY_SERVER_IP_ADDRESS
*               A       MY_SERVER_IP_ADDRESS
mail            A       MY_SERVER_IP_ADDRESS
www             A       MY_SERVER_IP_ADDRESS

如果我做一个nslookup

nslookup stackoverflow.com 8.8.8.8
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   stackoverflow.com
Address: 64.34.119.12

当然,一切都正确显示。

现在对于我的 example.com 域

nslookup example.com 8.8.8.8
Server:         8.8.8.8
Address:        8.8.8.8#53

** server can't find example.com: SERVFAIL

有人可以帮助我吗?因为我不知道我应该从哪里开始找到问题。

非常感谢你提前

4

2 回答 2

2

When you ask the stackoverflow.com from 8.8.8.8 nameserver, it asks the info about this domain recursively. It means, first it goes to one of the root servers, asks ".com" nameservers, then goes one of them, asks "stackoverflow.com" info.

If you get this answer (can't find example.com), that probably means you didn't registered your domain at a domain registrar.

于 2012-02-22T21:31:04.717 回答
1

You should not forget the ns A or AAAA record. It is the glue record.

https://www.cloudaccess.net/cloud-control-panel-ccp/157-dns-management/318-glue-records.html

于 2014-09-05T06:08:54.983 回答