-1
✗ 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
✗

But I'm browsing to an app (my app that I'm building/running/coding) at http://localhost.company.com:8080/help.

Checked cat /private/etc/hosts and it matches /etc/hosts.

So where else can I look for this localhost.company.com redirection?

  • localhost is not localhost.domain – Dani_l Jan 4 at 19:30
  • 2
    Check dns - ping localhost.company.com, and see the ip – Dani_l Jan 4 at 19:31
  • but I know that it's running on my machine -- I started the app that's listening on that port (updated question) – jcollum Jan 4 at 19:32
  • 1
    What is your hostname fqdn? Is it possible it’s localhost.company? – Dani_l Jan 4 at 19:37
  • 1
    Your company might have a DNS record for localhost.company.com pointing at 127.0.0.1. – DopeGhoti Jan 4 at 19:50
0

Found the answer elsewhere. The nslookup tool:

nslookup is a network administration command-line tool available for many computer operating systems for querying the Domain Name System (DNS) to obtain domain name or IP address mapping or for any other specific DNS record.

So, running that for localhost tells me that (I think) localhost.company.com is mapped to everyone's local machine at the DNS level.

✗ 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
  • I'm even getting downvoted on the answer, wtf – jcollum Jan 4 at 22:11
  • 1
    You're getting downvoted (not by me, FWIW) because Dani_l and DopeGhoti told you exactly what to look for, and now you're here claiming that you found the answer elsewhere. And  because you're just dumping a command and its output, without any explanation. – G-Man Jan 5 at 1:19
  • I answered Dani's question. DopeGhoti didn't tell me how I could check for that -- which appears to be the answer but since they didn't actually create an answer... – jcollum Jan 5 at 6:36
  • I've amended my answer. It seems rude to downvote people for not responding to every comment or whatever. – jcollum Jan 5 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.