On Sat, 24 Mar 2001, sankar kondur wrote:

> Hi,
> 
> Has anyone done this using tomcat.
> 
> I have a single machine with ip address 24.3.111.12 . 
> I have 2 domains www.xyz.com and www.abc.com pointing
> to it.
> I want multiple hosts like host1.xyz.com,
> host2.xyz.com, etc to point to 24.3.111.12 and to
> different directories on this machine.
> Is it possible to do this using Tomcat 4.0
> 

You will need to set up DNS to point both "host1.xyz.com" and
"host2.xyz.com" to point at 24.3.111.12.  Then, set up your server.xml
file something like this:

  <Engine name="Standalone" ...>

    <Host name="host1.xyz.com" appBase="webapps1" ...>
      <Context ...>
      <Context ...>
    </Host>

    <Host name="host2.xyz.com" appBase="webapps2" ...>
      <Context ...>
      <Context ...>
      <Context ...>
    </Host


  </Engine>

Note that the settings above define two different webapps directories (one
for each virtual host).  Directories or WAR files that you deploy into
either of these directories will be automatically registered, just as the
default server.xml file does for the "webapps" directory.

The set of web applications that you run in each virtual host are
completely separate from each other, and should be loaded from separate
directories.


> thanks,
> Shankar
> 

Craig McClanahan

Reply via email to