✗ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
✗但我正在http://localhost.company.com:8080/help上浏览一个应用程序(我正在构建/运行/编码的应用程序)。
检查了cat /private/etc/hosts,它与/etc/hosts匹配。
那么,我还能在哪里找到这个localhost.company.com重定向呢?
发布于 2019-01-04 20:58:44
在其他地方找到了答案。nslookup工具:
nslookup是一种网络管理命令行工具,可用于许多计算机操作系统,用于查询域名系统( DNS )以获取域名或IP地址映射,或用于任何其他特定的DNS记录。
因此,为localhost运行它告诉我,(我认为) localhost.company.com映射到每个人的本地机器的DNS级别。
✗ nslookup
> localhost
Server: x.x.x.x
Address: x.x.x.x#x
Non-authoritative answer:
Name: localhost.company.com
Address: 127.0.0.1https://unix.stackexchange.com/questions/492560
复制相似问题