• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query regarding hosts file.

 
Ajith George
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have 2 tomcats running on my machine. Both on different ports, one on 80 and other on 8086. I want to have a host entry on my hosts file so that i can have a name for the instance running on port 8086. i put entry but it's not working for port 8086.For port 80 it's working.

IS it possible for us to specify port addres also with ip on hosts file? if possible how?

Plese help me
 
Paul Clapham
Sheriff
Pie
Posts: 20729
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question. So I googled "hosts file format" and looked at the first link it returned. It says:

"Entries in the hosts file have the following format:

Address HostName"

There you are. Nothing about ports.

Anyway that would only affect the behaviour of your machine. Hardly worth providing a second name for localhost just to avoid typing ":8086" once in your browser, don't you think?
 
Ajith George
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actualy the requirement is not just to avoid typing 8086. My hosted site is crashing at one point because of this 8086. ie the system is not taking the port 8086 on that point. But it's working well on default port ie on 80. So i thought, i can avoid this crash my providing a host entry with port.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic