This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "2 different IPs, same port" Watch "2 different IPs, same port" New topic
Author

2 different IPs, same port

rnicolas
Greenhorn

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


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

Joined: Jun 25, 2001
Posts: 15951
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2 different IPs, same port
 
Similar Threads
Apache not working when connected to Wireless LAN
SocketException
Hosting Tomcat from a subnetted network
please give me java code for printer to be connected in another system
How to bind glassfish to a port