tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chandler <>
Subject Re: Setting up a parallel test environment on the same machine as main server
Date Wed, 15 Feb 2006 07:29:24 GMT
On Wednesday 15 February 2006 01:13, Tim Lucia wrote:
> The http host header is sent by the user-agent ("browser") based on the
> address requested in the URL.  This is how virtual hosts are
> differentiated. Tomcat supports a <host> container for virtual host
> differentiation, just like Apache does.  You do not need to change the
> workers at all.  Tomcat sees the same host header that Apache does.  I.e.,
> using Tamper Data and FireFox, I see

Yes - I get that part.

> When I request your web site.  (Along with a photo of you, presumably, in a
> tie & sunglasses ;-)  You might also want to send just "Apache" for the
> server, rather then

Yes its me (although they are my normal glasses that I wear all the time - 
they just have light sensitive lenses), taken at my daughters graduation from 
Southampton University in the summer 2004 :-)

> Server=Apache/2.0.54 (Debian GNU/Linux) mod_auth_pgsql/2.0.2b1 DAV/2
> SVN/1.1.4 mod_jk/1.2.14 mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-16
> mod_ssl/2.0.54 OpenSSL/0.9.7e mod-xslt/1.0.0rc1
> As it is "more secure".  How to do this was recently discussed on this
> list.

Low priority - but I'll look at it.

> So, you should have two virtual hosts (by name) in both server.xml and
> httpd.conf.  Not sure how to solve the https problem -- never tried to
> myself.

This is where I get lost.  I currently have two virtual hosts on apache 
pointing at the same virtual host on tomcat ALL with different names - so 
this doesn't square with what you are saying  of there being a one to one 

This server is running linux, with two ethernet cards. On the WAN side (which 
is what you can see) my ISP allocated via dhcp a single IP address.  That is 
the address. On the lan side, I can allocate 
multiple IP addresses to the card in a set of "psuedo devices", so at the 
moment it has address and, 31, 32 and 39.  Each of 
these is given separate names such as roo.home, appserv.home, webmail.home 
money.home and test.home by a nameserver also running on that machine

On apache I have a number of virtual hosts set up (but because of the https 
problem they MUST be differenciated by ip address).  At the moment I have the 
virtual hosts and money.home directing traffic to 
tomcat on the host appserv.home (the home page you saw was being generated in 
a java application).

I want to add a tomcat host to serve java applications to an apache virtual 
host running on test.home.  If I understand you correctly you would advocate 
creating additional <host> elements of my server.xml file with names of and test.home (I presume I have to keep default 
host of appserv.home just so that tomcat knows which ip address to listen 
on).  If I do that how do I pick up traffic to money.home? add another <host> 
statement with repeated contexts?

Alan Chandler
Open Source. It's the difference between trust and antitrust.

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

View raw message