Monday 3 September 2018

Can't map certain port and path with hosts file


On my localhost I'm trying to map http://127.0.0.1:8888/site/ to www.test.dev. Hosts file is below.


When I load http://127.0.0.1:8888/site/ I see what I want but for www.test.dev I just see Firefox's Server not found page.


What's wrong with my hosts file?


##
# 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
fe80::1%lo0 localhost
127.0.0.1:8888/site www.test.dev

Answer



The hosts file maps names to IP addresses. You cannot put ports or paths in there.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...