You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Purcell <sp...@vertisinc.com> on 2006/02/06 15:19:32 UTC

Two DNS Entries Two Sites?

Hello,

Running Tomcat 5.5 @ home and running a website which has a DNS entry in
it. I made the site the default webapp, and configured it in the
server.xml.

 

A week ago, I created another context (in the server.xml) for a
dev-site, of my live site, and I am using that for QA. I want to run a
second real-web site off this box, and same Tomcat. It has its own DNS
entry, and want to know if this is doable? If so, what should I read
about as far as configuration. I had read about the Engine, Server,
Context but have not really seen how to put two site DNS entries in.

 

Thanks,

Scott


Re: Two DNS Entries Two Sites?

Posted by David Delbecq <de...@oma.be>.
If it's 2 names, one IP, one server, you can simply have tomcat do
virtual hosting. We did it here like that:
Create 2 <host>
Give each host a list of alias corresponding to the server the will act on
Give each host a different Application Base (like webapps-hostX and
webapps-hostY) this will prevent webapplication in one host to be
visible in the other host
Ensure the manager webapp is present in both Apllication Base (unless
you don't need the manager webapp of course)
Optionnally define a default host in Catalina engine properties.

That's all, tomcat will redirect http requests to the correct virtual host.

Scott Purcell a écrit :

>Hello,
>
>Running Tomcat 5.5 @ home and running a website which has a DNS entry in
>it. I made the site the default webapp, and configured it in the
>server.xml.
>
> 
>
>A week ago, I created another context (in the server.xml) for a
>dev-site, of my live site, and I am using that for QA. I want to run a
>second real-web site off this box, and same Tomcat. It has its own DNS
>entry, and want to know if this is doable? If so, what should I read
>about as far as configuration. I had read about the Engine, Server,
>Context but have not really seen how to put two site DNS entries in.
>
> 
>
>Thanks,
>
>Scott
>
>
>  
>


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


Re: Two DNS Entries Two Sites?

Posted by Edmund Urbani <em...@liland.org>.
Scott Purcell wrote:

>Hello,
>
>Running Tomcat 5.5 @ home and running a website which has a DNS entry in
>it. I made the site the default webapp, and configured it in the
>server.xml.
>
> 
>
>A week ago, I created another context (in the server.xml) for a
>dev-site, of my live site, and I am using that for QA. I want to run a
>second real-web site off this box, and same Tomcat. It has its own DNS
>entry, and want to know if this is doable? If so, what should I read
>about as far as configuration. I had read about the Engine, Server,
>Context but have not really seen how to put two site DNS entries in.
>
> 
>
>Thanks,
>
>Scott
>
>
>  
>
Do you have several IPs (one per site) or just several hostnames 
pointing to the same IP?
In the first case, creating one <Host> section per IP should do the 
trick. In the second case you need name-based virtual hosts. I'm not 
sure whether this can (easily/at all) be achieved with multiple <Host> 
tags as well. So far I have only set up name virtual hosts with Apache 
HTTPD using the NameVirtualHost directive.

 Edmund


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