Create a Host and Alias.  You can do this through teh
Admin tool.  

1.      Create a directory to be the base of the new host:

C:\Program Files\Apache Software Foundation\Tomcat
5.0\webapps2

2.      Open Tomcat Admin tool.

3.      expand Service (Catalina)
4.      Click Service (Catalina)

5.      On the right, select Create New Host
6.      Name the host what ever (no spaces)
7.      Provide the base directory:
        C:\Program Files\Apache Software Foundation\Tomcat
5.0\webapps2

8.      Click Save
9.      Click Commit Changes
10.     Log out and log back on.
11.     Expand service
12.     your new host should appear
13.     click you new host

14.     On the right, choose Create New Alias

15.     Provide the Virtual Host name in the Alias name
box
16.     Click Save


My server.xml for that section has:

  <Engine defaultHost="localhost" name="Catalina">
      <Host appBase="C:\Program Files\Apache Software
Foundation\Tomcat 5.0\webapps2" name="webfocus2">
      <Alias>hostname2</Alias>
      <Alias>hostname.domain.com</Alias>
      </Host>



> > Subject: Virtual domain problem
> Date: Fri, 15 Apr 2005 18:34:34 -0600
> From: Lorenzo Jim�nez <[EMAIL PROTECTED]>
> To: "Tomcat Users List"
> <[email protected]>
> 
> Hi,
> 
>  
> 
> I have one domain www.nacion.com
> <http://www.nacion.com/>  and another domain
> www.revistaperfil.com
> <http://www.revistaperfil.com/> .
> 
> Both domains land on the same ip.
> 
>  
> 
> We want to have the apps of nacion.com in webapps
> directory, and the apps from revistaperfil.com in
> webapps2.
> 
>  
> 
> In server.xml we have:
> 
>  
> 
> <Engine defaultHost="localhost" name="Catalina">
> 
>        <!-- This Host is the default Host -->
> 
>        <Host appBase="webapps" name="localhost"
> debug="0">
> 
>               <Logger
> className="org.apache.catalina.logger.FileLogger" 
> 
>                      suffix=".txt" 
> 
>                      prefix="localhost_log." 
> 
>                      timestamp="true"/>
> 
>               <Context path="" docBase="ROOT"
> debug="0"/>
> 
>        </Host>
> 
>        <!-- This Host is the "www.revistaperfil.com"
> -->
> 
>        <Host appBase="webapps2 "
> name="www.revistaperfil.com" debug="0">
> 
>               <Logger
> className="org.apache.catalina.logger.FileLogger" 
> 
>                      suffix=".txt" 
> 
>                      prefix="revistaperfil_log." 
> 
>                      timestamp="true"/>
> 
>                <Context path="" docBase="Perfil"
> debug="0"/>
> 
>        </Host>
> 
>        <Realm
>
className="org.apache.catalina.realm.UserDatabaseRealm"/>
> 
> </Engine>
> 
>  
> 
> The problem is that when he start Tomcat, when we
> load www.revistaperfil.com
> <http://www.revistaperfil.com/>  we land in
> www.nacion.com <http://www.nacion.com/> .
> 
>  
> 
> How can we configure Tomcat so it can take the
> correct action depending on the domain asked?
> 
> Do we need to change the context.xml from the
> webapps also?
> 
>  
> 
> We don't have Apache installed, only Tomcat 5.
> 
>  
> 
> Thanks very much,
> 
>  
> 
> Lorenzo
> 
> 
>
-------------------------------------------------------------
> 
> Si usted no es el destinatario indicado en este
> mensaje o responsable como persona 
> de la entrega del mensaje, no debe copiar o reenviar
> este mensaje, por favor notifique 
> al correo [EMAIL PROTECTED] Para m�s referencia
> sobre t�rminos importantes 
> relacionados a este correo visite
> http://www.nacion.com/disclaimer/index_es2.htm
> 
> If you are not the addressee indicated in this
> message (or responsible for delivery of the 
> message to such person), you may not copy or send
> this message to anyone, please notify
> to [EMAIL PROTECTED] Click here for important
> additional terms relating to this e-mail. 
> <http://www.nacion.com/disclaimer/index_en2.htm>
> 
>
-------------------------------------------------------------
> 
> 
> 



                
__________________________________ 
Do you Yahoo!? 
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to