File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes 2 different IPs, same port Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "2 different IPs, same port" Watch "2 different IPs, same port" New topic

2 different IPs, same port


Joined: Mar 12, 2002
Posts: 1
Lets say I assign 2 IPs for my PC (e.g. and I want my Apache to listen to port 80 and my Tomcat to listen to port 80. Is this possible?

Roan Wilson Nicolas<br />Macromedia JRun Technical Support
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

Yes. However, if you expect to address the servers by hostname rather than IP address, you do have the limitation that the hostname can map to only one IP address - you'd have to provide an alternate hostname for the other.
The more common case is to use one of the bridging mechanisms (such as the ajp13 or mod_webapp) connectors to pass through requests from Apache to Tomcat. It's less confusing to the user.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: 2 different IPs, same port
It's not a secret anymore!