Hi everyone!
This is my scenario:
1. I have a server with 2 public IPs 128.128.128.1 and 128.128.128.2
2. I have 2 virtual hosts as described below:
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
<single-sign-on path="/"/>
</host>
<host name="second-host" alias="mysecondhost.com" default-web-module="second_host_app"/>
3. I have updated my C:\Windows\System32\drivers\etc\hosts file as follows:
128.128.128.1 localhost
128.128.128.2 mysecondhost.com
If I use the browser inside my server and type http://localhost, the right application is presented; if I type http://mysecondhost.com the second_host_app.war application is presented.
So far so good, but when I try to access the server from outside through the public IP addresses, I get always the application on the default host.
So, accessing http://128.128.128.1 and http://128.128.128.2 has the same effect, while I'm expecting to get the second_host_app.war application when accessing through http://128.128.128.2.
Any suggestions?
Thank you all for your time,
David.