You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matt Raible <ma...@raibledesigns.com> on 2003/12/05 00:47:22 UTC

2 Hosts: 2nd one tries to load the first's XML files

I have two domains that I host with tomcat - raible.net and
raibledesigns.com.  In $CATALINA_HOME/conf/Catalina/raible.net - no XML
files exist.  In Catalina/raibledesigns.com, I have many XML files for
the differents apps I host.  However, it seems that raible.net is trying
to load all the apps from raibledesigns.com.  How can I prevent this
from happening? My config is below.  I tried changing the appBase of
raible.net to webapps/raiblenet and the docBase (on the Context) to "",
but that resulted in an IndexOutOfBounds Error.


      <!-- Define the default virtual host -->
      <Host name="raibledesigns.com" debug="0" appBase="webapps" 
        unpackWARs="true" autoDeploy="true">
        <Alias>www.raibledesigns.com</Alias>
        <Alias>raible.kgbinternet.com</Alias>
    
        <Logger className="org.apache.catalina.logger.FileLogger"
          directory="logs"  prefix="localhost_log." suffix=".txt"
          timestamp="true"/>
      </Host>

      <Host name="raible.net" debug="0" appBase="webapps"
unpackWARs="true">
        <Alias>www.raible.net</Alias>
        <Alias>raiblenet.kgbinternet.com</Alias>
        
        <!-- Tomcat raible.net Context -->
        <Context path="" docBase="raiblenet" debug="0"
allowLinking="true"/>
      </Host>

Thanks,

Matt



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


Re: 2 Hosts: 2nd one tries to load the first's XML files

Posted by Matt Raible <ma...@raibledesigns.com>.
This did fix the problem - thanks Liem.

Matt

On Dec 4, 2003, at 6:17 PM, Liem Do wrote:

> If each virtual host has their own set of applications then you should 
> set
> the appBase for each host to different directories.
>
> So in your case the Host defs should look like the following:
>
> <Host name="raible.net" debug="0" appBase="webapps" unpackWARs="true">
>  ...
> </Host>
> <Host name="raible.net" debug="0" appBase="webapps2" unpackWARs="true">
> ...
> </Host>
>
> Where webapps and webapps2 are directories at the same level under your
> TOMCAT_HOME.
>
> HTH
>
> ----- Original Message -----
> From: "Matt Raible" <ma...@raibledesigns.com>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, December 04, 2003 3:47 PM
> Subject: 2 Hosts: 2nd one tries to load the first's XML files
>
>
>> I have two domains that I host with tomcat - raible.net and
>> raibledesigns.com.  In $CATALINA_HOME/conf/Catalina/raible.net - no 
>> XML
>> files exist.  In Catalina/raibledesigns.com, I have many XML files for
>> the differents apps I host.  However, it seems that raible.net is 
>> trying
>> to load all the apps from raibledesigns.com.  How can I prevent this
>> from happening? My config is below.  I tried changing the appBase of
>> raible.net to webapps/raiblenet and the docBase (on the Context) to 
>> "",
>> but that resulted in an IndexOutOfBounds Error.
>>
>>
>>       <!-- Define the default virtual host -->
>>       <Host name="raibledesigns.com" debug="0" appBase="webapps"
>>         unpackWARs="true" autoDeploy="true">
>>         <Alias>www.raibledesigns.com</Alias>
>>         <Alias>raible.kgbinternet.com</Alias>
>>
>>         <Logger className="org.apache.catalina.logger.FileLogger"
>>           directory="logs"  prefix="localhost_log." suffix=".txt"
>>           timestamp="true"/>
>>       </Host>
>>
>>       <Host name="raible.net" debug="0" appBase="webapps"
>> unpackWARs="true">
>>         <Alias>www.raible.net</Alias>
>>         <Alias>raiblenet.kgbinternet.com</Alias>
>>
>>         <!-- Tomcat raible.net Context -->
>>         <Context path="" docBase="raiblenet" debug="0"
>> allowLinking="true"/>
>>       </Host>
>>
>> Thanks,
>>
>> Matt
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

Re: 2 Hosts: 2nd one tries to load the first's XML files

Posted by Liem Do <li...@waterware.com>.
If each virtual host has their own set of applications then you should set
the appBase for each host to different directories.

So in your case the Host defs should look like the following:

<Host name="raible.net" debug="0" appBase="webapps" unpackWARs="true">
 ...
</Host>
<Host name="raible.net" debug="0" appBase="webapps2" unpackWARs="true">
...
</Host>

Where webapps and webapps2 are directories at the same level under your
TOMCAT_HOME.

HTH

----- Original Message ----- 
From: "Matt Raible" <ma...@raibledesigns.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, December 04, 2003 3:47 PM
Subject: 2 Hosts: 2nd one tries to load the first's XML files


> I have two domains that I host with tomcat - raible.net and
> raibledesigns.com.  In $CATALINA_HOME/conf/Catalina/raible.net - no XML
> files exist.  In Catalina/raibledesigns.com, I have many XML files for
> the differents apps I host.  However, it seems that raible.net is trying
> to load all the apps from raibledesigns.com.  How can I prevent this
> from happening? My config is below.  I tried changing the appBase of
> raible.net to webapps/raiblenet and the docBase (on the Context) to "",
> but that resulted in an IndexOutOfBounds Error.
>
>
>       <!-- Define the default virtual host -->
>       <Host name="raibledesigns.com" debug="0" appBase="webapps"
>         unpackWARs="true" autoDeploy="true">
>         <Alias>www.raibledesigns.com</Alias>
>         <Alias>raible.kgbinternet.com</Alias>
>
>         <Logger className="org.apache.catalina.logger.FileLogger"
>           directory="logs"  prefix="localhost_log." suffix=".txt"
>           timestamp="true"/>
>       </Host>
>
>       <Host name="raible.net" debug="0" appBase="webapps"
> unpackWARs="true">
>         <Alias>www.raible.net</Alias>
>         <Alias>raiblenet.kgbinternet.com</Alias>
>
>         <!-- Tomcat raible.net Context -->
>         <Context path="" docBase="raiblenet" debug="0"
> allowLinking="true"/>
>       </Host>
>
> Thanks,
>
> Matt
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


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