Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 亚马逊网络服务路由53忽略域名_Amazon Web Services_Dns_Amazon Route53 - Fatal编程技术网

Amazon web services 亚马逊网络服务路由53忽略域名

Amazon web services 亚马逊网络服务路由53忽略域名,amazon-web-services,dns,amazon-route53,Amazon Web Services,Dns,Amazon Route53,我在AWS上托管了一组微服务,这些服务通过使用路由53上定义的DNS名称的请求/响应相互交互,在路由53上我创建了一个名为api.io的新私有区域,并定义了DNS,例如WSG_KAFKA,在我的代码中,我已使用区域名称配置DNS名称,如WSG_KAFKA.api.io 是否有任何方法可以忽略域名api.io并直接使用DNS名称要直接使用主机名,您需要编辑/etc/resolv.conf并添加搜索api.io选项,因此您的文件可能如下所示: search api.io nameserver 10.

我在AWS上托管了一组微服务,这些服务通过使用路由53上定义的DNS名称的请求/响应相互交互,在路由53上我创建了一个名为
api.io
的新私有区域,并定义了DNS,例如
WSG_KAFKA
,在我的代码中,我已使用区域名称配置DNS名称,如
WSG_KAFKA.api.io

是否有任何方法可以忽略域名
api.io
并直接使用DNS名称要直接使用主机名,您需要编辑
/etc/resolv.conf
并添加
搜索api.io
选项,因此您的文件可能如下所示:

search api.io
nameserver 10.0.0.2
这将有助于只使用
WSG\u KAFKA
搜索主机名

从那个男人那里:

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.