tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan <snot...@comcast.net>
Subject Re: simple virtual host question
Date Sun, 25 Jan 2004 18:30:01 GMT
Thank you Miquel. Let me repeat what you are saying. Essentially, I set 
up a host element entry in my server.xml with my lan servers IP. The 
router, when it receves a request to IP 12.12.12.12:80 will translate 
that request into 192.168.1.1:80 and sent it to the lan server.

Thanks again.

Dan



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 
servername.

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.

HTH

Miguel

> 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 12.12.12.12 and I have it forward all 
> http requests to the Tomcat machine at IP 192.168.1.1. 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: 12.12.12.12 or 192.168.1.1? 
> It seems that the browsers are sending the requst to 12.12.12.12, 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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message