我是非托管 VPS 服务器以及 IPv6 的新手。对于启用 IPv6 的服务器,是否有必要在 /etc/hosts 文件中为 localhost 包含 127.0.0.1 AND ::1 ,或者仅 ::1 就足够了?
您没有提到您使用的是哪个操作系统。
在 Windows 系统上,名称解析localhost由系统处理,hosts文件中不需要这些条目。这甚至在同一个文件中明确提到:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
35996 次 |
| 最近记录: |