You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Natursprung <na...@googlemail.com> on 2007/07/25 11:14:16 UTC

Tomcat "virtuelle server"

Hi there,

 i have a problem with a "virtuall Server" on Tomcat

i want redirect 2 different DNS-names to one Tomcat on one server. The
DNS-names has 2 different destinations inside the webapps-directory. We
can´t not insert the whole path in the dns, so i need a other sulution for
my problem.

thx for your help

Andi

RE: Tomcat "virtuelle server"

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Kristian Rink [mailto:kristian@zimmer428.net] 
> Subject: Re: Tomcat "virtuelle server"
> 
> [Natursprung <na...@googlemail.com> @ Wed, 25 Jul 2007 11:14:16
> +0200]
> ...
> > i want redirect 2 different DNS-names to one Tomcat on one 
> server. The
> > DNS-names has 2 different destinations inside the webapps-directory.
> > We can´t not insert the whole path in the dns, so i need a other
> > sulution for my problem.
> ...
> 
> I'd go for using apache2 for doing the virtual host stuff and mod_jk
> for linking it to your tomcat installation, this should make your
> desired setup rather straightforward.

There's no reason to add the complexity of httpd to do this.  All you need is two <Host> elements in Tomcat's conf/server.xml, one for each registered DNS name.  Each <Host> element should have a unique value for its appBase attribute, pointing to separate web application directories for each.  Name the default application ROOT for each and you're done.  No extra components to install, configure, and maintain.

Look here for the full doc:
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat "virtuelle server"

Posted by Kristian Rink <kr...@zimmer428.net>.
Hi there;

[Natursprung <na...@googlemail.com> @ Wed, 25 Jul 2007 11:14:16
+0200]
...
> i want redirect 2 different DNS-names to one Tomcat on one server. The
> DNS-names has 2 different destinations inside the webapps-directory.
> We can´t not insert the whole path in the dns, so i need a other
> sulution for my problem.
...

I'd go for using apache2 for doing the virtual host stuff and mod_jk
for linking it to your tomcat installation, this should make your
desired setup rather straightforward. In example, see here

http://www.howtoforge.com/apache2_tomcat5_mod_jk

for more. :)

Cheers,
Kristian


-- 
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
"One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality." (Hundertwasser)

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org