I am confused why my host name in /etc/hosts works for Google Chrome only. Not on Safari, not on Firefox, not from command-line tools like curl
.
##
# 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
127.0.0.1 cool.pl.localhost
Only on chrome http://cool.pl.localhost:8080
works. On other browsers I can reach the site only by entering 0.0.0.0:8080
or 127.0.0.1:8080
.
Confused what is misconfigured. What magic is Google Chrome doing that it works?
Best Answer
I think I just found the answer to this problem. If you are working on a virtual machine, as I am, and you change the /etc/hosts file in your virtual linux machine, only chrome will detect that. You will need to change the hosts file in windows (c:\windows\system32\drivers\etc\hosts) in order to force firefox to check the table. The moment I change that file, firefox recognized the new mapped names.