![Ubuntu 16.04 服务器上的正确主机](https://linux22.com/image/997482/Ubuntu%2016.04%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E7%9A%84%E6%AD%A3%E7%A1%AE%E4%B8%BB%E6%9C%BA.png)
VPS:Ubuntu 16.04 服务器,Nginx 1.10,PHP 7,MySQL 5.7。我从提供商处获得了 IP4 和 IPv6 地址。我一直在寻找这个问题的答案:我是否必须在 /etc/hosts
?
现在我的 hosts 文件:
127.0.0.1 localhost
188.225.32.275 server.domain.com server
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
像这样改变:
127.0.0.1 localhost
188.225.32.275 server.domain.com server
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
2a04:6f00:4::bce1:444d server.domain.com server