我在Linux Mint 18.1 Serena上。就在上周,我的机器开始出现奇怪的行为。我的/etc/hosts中有几个条目指向一些本地网站进行开发。由于一个不明显的原因,上周我的浏览器停止了解析这些域名的能力,但是使用curl我得到了一个有效的响应。我试着重启所有的东西,但是没有成功。
下面是我的/etc/hosts和/etc/nsswitch.conf的内容
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.27.0.4 dp-relaunch-coreshop.dp.dev
172.29.0.4 foodexplorer-coreshop.dp.dev
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis我希望有人能帮我解决这个问题。
发布于 2018-04-03 22:25:05
我可以看到你在Unix系统上,根据我的经验,我发现Chrome忽略了系统主机字段,尽管我在windows上。
确保运行浏览器的用户具有读取/etc/host和/etc/nsswitch.conf文件的权限,并查看是否可以正常工作。
发布于 2018-09-27 00:30:07
似乎最近更新的浏览器对以*.dev结尾的本地域有问题,请尝试将其更改为*.local,然后重试。这解决了我的问题,尽管我不知道为什么
https://stackoverflow.com/questions/49632411
复制相似问题