tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel González Castaños <>
Subject Re: simple virtual host question
Date Sun, 25 Jan 2004 17:55:04 GMT
Dear Dan,

 If you want to use Virtual hosting based on Server name you need to use 
the servername you have. If you an internet domain and you want your lan 
server to be accessed from the internet, then you have to use that 

 About the IPs, you need to use the lan IP, not the router one. If the 
router is using NAT then It will make the translation for you.



> I am using Tomcat 4.1.29 with JDK 1.4.x. The network is configured 
> with a router with a firewall to the Internet and a Tomcat server with 
> a static IP(maintained by the router for forwarding purposes) behind 
> the firewall. The router's IP is and I have it forward all 
> http requests to the Tomcat machine at IP So, for 
> purposes of connecting to the server from the Internet, I must send 
> the request to the router which forwards the request to the Tomcat 
> server.
> So, what do I define my virtual host as: or 
> It seems that the browsers are sending the requst to, so I 
> would build a virtual host for this host name? And localhost if I am 
> building on the same machine.
> OT: If I want the same multiple contexts deployed to two virtual 
> hosts(server IP and localhost), do I have to repeat the context 
> elements in both? Is there a way to cut down on the redundancy or 
> normalize the code so the context is defined in one location with the 
> same properties for both virtual hosts?
> Thank you for any insight,
> Dan Doyle
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message