![localhost.company.com에서 애플리케이션을 탐색할 수 있지만 애플리케이션이 /etc/hosts에 없으며 다른 곳에서는 리디렉션이 가능합니까?](https://linux55.com/image/145629/localhost.company.com%EC%97%90%EC%84%9C%20%EC%95%A0%ED%94%8C%EB%A6%AC%EC%BC%80%EC%9D%B4%EC%85%98%EC%9D%84%20%ED%83%90%EC%83%89%ED%95%A0%20%EC%88%98%20%EC%9E%88%EC%A7%80%EB%A7%8C%20%EC%95%A0%ED%94%8C%EB%A6%AC%EC%BC%80%EC%9D%B4%EC%85%98%EC%9D%B4%20%2Fetc%2Fhosts%EC%97%90%20%EC%97%86%EC%9C%BC%EB%A9%B0%20%EB%8B%A4%EB%A5%B8%20%EA%B3%B3%EC%97%90%EC%84%9C%EB%8A%94%20%EB%A6%AC%EB%94%94%EB%A0%89%EC%85%98%EC%9D%B4%20%EA%B0%80%EB%8A%A5%ED%95%A9%EB%8B%88%EA%B9%8C%3F.png)
✗ 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
?
답변1
답은 다른 곳에서 찾았습니다. nslookup 도구:
nslookup은 도메인 이름이나 IP 주소 매핑 또는 기타 특정 DNS 레코드에 대해 DNS(Domain Name System)를 쿼리하는 많은 컴퓨터 운영 체제에서 사용할 수 있는 네트워크 관리 명령줄 도구입니다.
따라서 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.1