Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

2 different IPs, same port

 
rnicolas
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic