aspose file tools*
The moose likes Tomcat and the fly likes Which IP address is to be given in Listen directive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Which IP address is to be given in Listen directive" Watch "Which IP address is to be given in Listen directive" New topic
Author

Which IP address is to be given in Listen directive

Prasad Darsi
Greenhorn

Joined: Sep 26, 2004
Posts: 16
I am trying to host website from my machine. I am connected to router and I have configured it to forward the port to my machine.

I can see my web page in my local network.
The problem is my page is not getting displayed to others over internet.

Which IP address should I give in the Listen directive ?

The local IP address or the WAN ip address ?

Thanks in advance,
Prasad.
Scott Dunbar
Ranch Hand

Joined: Sep 23, 2004
Posts: 245
Well, kind of both

Your internal network is probably something like 192.168.x.y. This is a non-routable IP address which means that it will not be available from the internet. So in your internal network you'll want to access the server by it's local IP - again, likely to be something like 192.168.something.something. Your router will provide NAT - network address translation from the outside address to the inside address. From your office or outside of your home you'll access the server via the external IP you've been given. But the Listen address will be your local IP.
[ April 12, 2006: Message edited by: Scott Dunbar ]

<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
 
jQuery in Action, 2nd edition
 
subject: Which IP address is to be given in Listen directive