Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

simple virtual host question

Dan

2004-01-25

Replies:

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@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.