Amazon Web服务Route 53忽略域名
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Amazon Web服务Route 53忽略域名相关的知识,希望对你有一定的参考价值。
我在AWS上托管了一组微服务,这些服务通过请求/响应使用在Route 53上定义的DNS名称相互交互,我在其中创建了一个名为api.io
的新私有区域,并在我的代码中定义了DNS,例如WSG_KAFKA
我已经使用区域名称配置DNS名称,如WSG_KAFKA.api.io
有没有办法忽略域名api.io
并直接使用DNS名称
答案
要直接使用主机名,您需要编辑/etc/resolv.conf
并添加search api.io
选项,因此您的文件可能如下所示:
search api.io
nameserver 10.0.0.2
这将有助于仅使用WSG_KAFKA
搜索您的主机名。
从男子resolv.conf:
search Search list for host-name lookup.
The search list is normally determined from the local domain
name; by default, it contains only the local domain name.
This may be changed by listing the desired domain search path
following the search keyword with spaces or tabs separating
the names. Resolver queries having fewer than ndots dots
(default is 1) in them will be attempted using each component
of the search path in turn until a match is found. For
environments with multiple subdomains please read options
ndots:n below to avoid man-in-the-middle attacks and
unnecessary traffic for the root-dns-servers. Note that this
process may be slow and will generate a lot of network traffic
if the servers for the listed domains are not local, and that
queries will time out if no server is available for one of the
domains.
The search list is currently limited to six domains with a
total of 256 characters.
以上是关于Amazon Web服务Route 53忽略域名的主要内容,如果未能解决你的问题,请参考以下文章
从阿里云迁移域名至 Amazon Route 53 帮你了解域名迁移
将 Amazon Route 53 域名链接到 EC2 实例
如何将 Amazon Route 53 与 Digital Ocean 水滴一起使用?