• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query regarding hosts file.

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic