主机名无法解析为IP WHM / cPanel

时间:2013-11-16 13:38:54

标签: centos cpanel hostname centos6 whm

我将WHM / cPanel安装移动到新服务器。更改名称服务器IP后,稍后域名开始指向新服务器。

但是,主机名无法解析为IP地址。

/scripts/ipcheck --verbose


IMPORTANT: Do not ignore this email.

Your hostname (xxx.example.com) could not be resolved to an
IP address. This means that /etc/hosts is not set up correctly,
and/or there is no dns entry for xxx.example.com. Please be
sure that the contents of /etc/hosts are configured correctly, and
also that there is a correct 'A' entry for the domain in the zone
file.

Some or all of these problems can be caused by /etc/resolv.conf
being setup incorrectly. Please check that file if you believe
everything else is correct.

You may be able to automatically correct this problem by using the
'Add an A entry for your hostname' option under 'Dns Functions' in
your Web Host Manager.

我跑了:

nano /etc/hosts


# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
XXX.XXX.XXX.XXX         xxx.example.com xxx

我也检查:

nano /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

此外:

nano /etc/nameserverips

XXX.XXX.XXX.XXX=ns1.example.com
XXX.XXX.XXX.XXX=ns2.example.com

我在WHM中检查了“为主机名添加条目”:

Hostname | Server Main IP
xxx.example.com | XXX.XXX.XXX.XXX

我检查并重建了dnsconfig

/scripts/rebuildingdnsconfig

我真的不确定还有什么要检查,我重新启动了服务器。指向名称服务器的域工作正常。我遇到的问题是通过https://xxx.example.com为电子邮件路由所有cpanel访问和SSL配置,因为它具有SSL证书。我已将设置与旧服务器进行了比较,除了IP地址外,它们是相同的。

Centos 6.4 WHM 11.40.0 Build 19

  • XXX.XXX.XXX =服务器IP
  • xxx.example.com =主机名

任何帮助都将不胜感激。

2 个答案:

答案 0 :(得分:1)

解决了这个问题:

转到WHM,“为您的主机名添加条目”,然后再次提交。

即使它是正确的提交它再次工作。此修复程序来自cPanel支持。

答案 1 :(得分:0)

我知道这是一个旧帖子,但如果有人在将来需要帮助时遇到类似问题,除此之外还有一些检查点:

1>检查

的内容
/etc/wwwacct.conf

2 - ;调查您的主机名和NS获得适当的结果

dig ns1.example.com
dig hostname.exmple.com
host ns1.example.com
host (HOST IP)
nslookup hostname.exmple.com

3)确保您已在域名注册商处注册了hostname.example.com和ns1.example.com,并且他们指向的是正确的IP。

4)确保没有防火墙阻塞端口UDP:53和其他基本端口。

相关问题