What is a fully qualified domain name (FQDN)?
fully qualified domain name (FQDN) is the complete domain name for a specific computer, or host, on the Internet. The FQDN consists of two parts: the hostname and the domain name. For example, an FQDN for a hypothetical mail server might be mymail.somecollege.edu. The hostname is mymail, and the host is located within the domain somecollege.edu.
In this example, .edu is the top-level domain (TLD). This is similar to the root directory on a typical workstation, where all other directories (or folders) originate. (Within the .edu TLD, Indiana University Bloomington has been assigned the indiana.edu domain, and has authority to create subdomains within it.)
The same applies to web addresses. For example, www.indiana.edu is the FQDN on the web for IU. In this case,www is the name of the host in the indiana.edu domain.
When connecting to a host (using an SSH client, for example), you must specify the FQDN. The DNS server then resolves the hostname to its IP address by looking at its DNS table. The host is contacted and you receive a login prompt.
If you are using only the hostname (without the domain information) to connect to a server, the application you're using may not be able to resolve the hostname. This can happen if either the DNS suffix search order in your computer's TCP/IP properties is incorrect, or the DNS table is corrupted. In these cases, entering the host's FQDN will allow DNS to locate the server. Also, if you are trying to connect to a remote host that is not local to your Internet service provider (ISP), you will probably have to use the FQDN. For example, it's unlikely that a DNS server at IU would have a listing for remote hosts at another university or an unrelated ISP.
FQDN是Fully Qualified Domain Name的缩写, 含义是完整的域名. 例如, 一台机器主机名(hostname)是www, 域后缀(domain)是example.com, 那么该主机的FQDN应该是www.example.com.
题外话, 其实FQDN最后是以"."来结尾的, 但是大部分的应用和服务器都允许忽略最后这个点.
Linux允许用户通过hostname命令查看并设置主机名. 用户也可以通过hostname -f命令得到该主机的FQDN. 但是, 却没有直接设置FQDN的命令.
实际上, 设置Linux的FQDN可以通过两种方法实现.
第一种, /etc/hostname + /etc/hosts文件组合
首先在/etc/hostname文件中设置主机名, 假设是
www
然后在/etc/hosts文件中增加一行主机记录, 第一个字段是该主机的IP地址, 第二个字段是你希望设置的FQDN, 最后是刚刚设置的主机名, 如下
A.B.C.D www.example.com www
设置好之后, 通过hostname -F /etc/hostname更新主机名. 这时, 通过hostname -f看到的FQDN就应该是: www.example.com
第二种, /etc/hostname + /etc/resolv.conf组合
如果Linux不能在/etc/hosts文件中找到hostname对应的记录, 就会试图从resolv.conf文件中得到主机的域名后缀(domain name). 例如, 这样的/etc/resolv.conf文件
domain example.com
search example.com
nameserver W.X.Y.Z
根据配置文件中的domain后缀example.com, 加上主机名www, Linux会试图自动拼接成一个候选FQDN:www.example.com. 但这个候选FQDN还需要进一步验证.
Linux通过DNS服务器W.X.Y.Z解析候选FQDN, 如果解析失败, 生成FQDN过程就失败了. 如果解析成功, 则会返回www.example.com这个域名的正式名称. 也就是说, 如果在DNS服务器的记录中, www.example.com这个域名是指向server.example.com的CNAME记录的话, 而server.example.com才是A记录. 返回的FQDN就是server.example.com, 而不是www.example.com.
以上就是Linux下设置FQDN的方法.
FQDN:(Fully Qualified Domain Name)完全合格域名/全称域名,是指主机名加上全路径,全路径中列出了序列中所有域成员。全域名可以从逻辑上准确地表示出主机在什么地方,也可以说全域名是主机名的一种完全表示形式。从全域名中包含的信息可以看出主机在域名树中的位置。DNS解析流程:首先查找本机HOSTS表,有的直接使用表中定义,没有查找网络连接中设置的DNS 服务器由他来解析。
例如,acmecompany公司的Web服务器的全域名可以是 acmecompany.,而若sales主机是在销售部子域,则它的全域名可以是sales.acmecompany。当给出的名字像acmecompany而不是acmecompany.时,他们通常是指主机名,而名字后边带有点号(“.”是指根域名服务器)的则认为是全域名。这种区别在理解和控制解析过程时是非常重要的。点号实际上指出了域名树的根。
全域名在实际中是非常有用的。电子邮件就使用全域名作为收信人的电子邮件地址,如janicejones@ acmecompany. com,其中收信人为janicejones,跟在收信人名字后面是符号@,@后面是邮件服务器的全域名,或者说是邮件服务器所在企业的域名,最后是顶层域名.com。. com意味着acmecompany是一个商业机构。
与URL的区别在于协议头”Http://”。
What is a fully qualified domain name (FQDN)?的更多相关文章
- 解决Apache启动错误:httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
启动apache遇到提示: [root@bqh-119 conf]# ../bin/apachectl -thttpd: apr_sockaddr_info_get() failed for bqh- ...
- 源码安装Apache,报错:Cannot use an external APR with the bundled APR-util和httpd: Could not reliably determine the server's fully qualified domain name, using
一.解决APR和APR-util错误: 1.1.安装APR: [root@ganglia httpd-2.2.23]# cd srclib/apr [root@ganglia apr]# ./conf ...
- 重启Apache报错apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting的解决方法
启动apache提示 : apache2: Could not reliably determine the server's fully qualified domain name, using 1 ...
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName的解决
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ...
- apache2: Could not reliably determine the server's fully qualified domain name
错误信息:apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 ...
- Could not reliably determine the server's fully qualified domain name
启动apache报错: [root@namenode1 ]# service httpd start Starting httpd: httpd: Could not reliably determi ...
- Starting httpd:Could not reliably determine the server's fully qualified domain name
#service httpd start #Starting httpd: httpd: Could not reliably determine the server's fully qualifi ...
- apache启动问题: Could not reliably determine the server's fully qualified domain name
[root@rusky]# service httpd startStarting httpd: httpd: apr_sockaddr_info_get() failed for ruskyhttp ...
- httpd: Could not reliably determine the server's fully qualified domain name
作者:Younger Liu, 本作品采用知识共享署名-非商业性使用-相同方式共享 3.0 未本地化版本许可协议进行许可. 问题描述: AH00558: httpd: Could not reliab ...
随机推荐
- Elasticsearch同义词词汇单元过滤器
1 简单扩展 "jump,hop,leap" 搜索jump会检索出包含jump.hop或leap的词 1.1 扩展应用在索引阶段 1.2 扩展应用在查询阶段 1.3 对比 2 简单 ...
- golang中从一个日期开始往后增加一段时间
废话少说上code, 这个是从当前日期开始,往后增加一个月时间 package main import ( "fmt" "time" ) func main() ...
- Javascript 基础总结
一.预处理 console.log(global); // undefined var global = 'global'; console.log(global); // global functi ...
- POJ 1389 Area of Simple Polygons | 扫描线
请戳此处 #include<cstdio> #include<algorithm> #include<cstring> #define N 1010 #define ...
- vs2008升级正式版
1.VS2008简体中文正式版序列号 1.Visual Studio 2008 Professional Edition: XMQ2Y-4T3V6-XJ48Y-D3K2V-6C4WT 2.Visual ...
- 7月14号day6总结
今天学习过程和总结 IOC和DIO IOC相当于一个容器,在容器中加注解.接口存在意义依赖注入.4个注解都行,依赖注入只能发生在IOC容器里, pring IOC 容器可以管理Bean 的生命周期,S ...
- webapp的favicon应该怎样组织代码
处理过那么多index 页面了那么关于特别针对于此页的favicon是时候详细的总结一下了 它是网站的头像,它出现在浏览器的收藏夹中(标题的旁边) ,浏览器标签页的左上角,微信公众号的logo,保存网 ...
- 生成 RSA 私钥及公钥
$ openssl # 进入 OpenSSL 程序 OpenSSL> genrsa -out rsa_private_key.pem 1024 # 生成私钥 OpenSSL> pkcs8 ...
- bzoj3969 [WF2013]Low Power
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3969 [题解] 二分答案x,贪心选取,如果选取了i个,有j对,那么要满足i<=2*j* ...
- [ CodeVS冲杯之路 ] P1169
不充钱,你怎么AC? 题目:http://codevs.cn/problem/1169/ 感觉这题目好恐怖,莫名其妙乱码一堆就AC了…… 它看上去是两个子问题,实际上可以看成从起点找两条不相交的路径使 ...