dnsmasq无法正常工作的域名.local [英] Dnsmasq not working domain .local

查看:130
本文介绍了dnsmasq无法正常工作的域名.local的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我购买了一个macpro,并且是一个很新的设备,正在配置我的开发环境,当我安装dnsmasq时,我无法访问"anyname.local"页面,它说网站无法访问,我正在运行所有内容,apache,dnsmasq,但是没有任何效果,我按照上面的教程进行操作. Link Tut

i bought a macpro and im quite new, im configuring my development environment, and when i installed dnsmasq i cant access the "anyname.local" page, it says site cant be reached, i have everything running, apache, dnsmasq, but nothing works, i followed this tutorial above. Link Tut

我打印了一些信息,也许有人可以知道发生了什么事.

I print some information maybe someone can have any idea whats wrong.

dig foo.local

; <<>> DiG 9.8.3-P1 <<>> foo.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 3951
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;foo.local.         IN  A

;; AUTHORITY SECTION:
.           10800   IN  SOA a.root-servers.net. nstld.verisign-grs.com. 2018030101 1800 900 604800 86400

;; Query time: 18 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri Mar  2 00:03:23 2018
;; MSG SIZE  rcvd: 102

推荐答案

在MacOS上应避免使用 .local 后缀,因为后缀由MacOS Bonjour服务使用.

The .local suffix should be avoided on MacOS because it is used by MacOS Bonjour service.

您可以查看 Apple说明页,他们建议在其中使用其他后缀,例如: .private .intranet .internal .lan .

You can look at Apple explanation page where they recommend to use other suffixes like: .private, .intranet, .internal, or .lan.

我个人使用 .localhost .test .example .

作为一个侧面说明,也不建议使用 .dev ,因为Chrome 63开始为此后缀要求SSL证书.

As a side note, it's also not to recommended to use .dev because Chrome 63 started requiring a SSL certificate for this suffix.

希望这会有所帮助!

这篇关于dnsmasq无法正常工作的域名.local的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆