At Thursday, 25 April 2002, you wrote:

>- Are you using tomcat with Apache ? or just tomcat ?
>- is the DNS www.xxx.net pointing to the server where you run tomcat 
(apache?)
>
>If you try setting up only: www.XXX.net in your server.xml does 
the link:
>www.xxx.net/menphis work ?

Thanks for your tough questions.  You made me totally reapproach 
the problem (all the stuff you asked about was configured correctly) 
but I discovered some new things about virtual hosting under tomcat 
(at least 3.2.4).

- The conflict came from the fact that my virtual host (.com) was 
being served out of the default webapps directory.  Once I made its 
own directory (so now I have two non-default roots, comwebapps and 
netwebapps) and removed the stuff from webapps/ I realized that a 
non-configured (at least not as a virtual host in server.xml) "localhost" 
host was being created out of whatever was present in the /webapps 
directory (AND it was replicating that context on the .com virtual 
host as well).
- The webapps in _both_ of my non-default webapp roots _must_ be 
in decompressed form to work.  I cannot deploy WARs into them (leading 
to a lot of the previously mentioned confusion, but now that I have 
that nailed I will just modify my ant tasks accordingly).  I figured 
out that this is the reason my .net virtual host did not work.  Under 
the former scheme (where the .com virtual host was being generated 
from the same webapps folder as the "localhost" or default) this 
would cause a conflict and I had to do the following voodoo:  1. 
the one in /webapps _must_ be a WAR and there must be no remnants 
of it when the server starts.  and 2. the one in the non-default 
folder _must not_ be a war.  Weird, huh?  Again, something I can 
live with.
- Now that I have this all working (again thank you for your questions,
it really helped me just to have someone else ask the same questions 
that had been spinning in my head for three days), there is just 
one remaining "problem" so to speak -- tomcat now complains on startup 
that there are "no apps in webapps/" .  Did I maybe leave something 
on that should have been turned off?

Thanks everybody for your patience and for not flaming me too badly.
This was a very important and interesting problem to me.

;)
cheers
Phillip


>>
>> P.S.  My precise tomcat version is 3.2.4, my environment is Redhat 
7.2.
>>
>>
>> On 4/22/02 12:19 PM, "Phillip Morelock"
><[EMAIL PROTECTED]>
>> wrote:
>>
>> > I am using virtual hosting on Tomcat 3.x standalone but I can't 
seem to
>make
>> > my scenario work:
>> >
>> > www.xxx.com/memphis
>> > and
>> > www.xxx.net/memphis
>> >
>> > Basically the only difference between the two (they're literally 
the
>same
>> > webapp) is that in the web.xml file, I provide a different database 
name
>for
>> > my load-on-startup servlet to create a pool of connections to 
(not IP
>> > address -- it's the same database server, just a different DB 
name).  My
>> > server.xml looks like this:
>> >
>> > <Host name="www.XXX.com">
>> >       <Context path="/memphis"
>> >               docBase="webapps/memphis" />
>> >       <Context path="/"
>> >               docBase="webapps/ROOT" />
>> > </Host>
>> > <Host name="www.XXX.net">
>> >       <Context path="/memphis"
>> >               docBase="netwebapps/memphis" />
>> >       <Context path="/"
>> >               docBase="netwebapps/ROOT" />
>> > </Host>
>> >
>> > So basically, I have two different folders -- the default "webapps"
>folder
>> > and then one I created called "netwebapps."  This works, tomcat 
doesn't
>> > complain -- in fact, it even connects to the database twice during
>startup
>> > (I have debug messages), so I *know* it runs my load-on-startup 
servlet
>> > twice.  So I know it knows I want to run two webapps.
>> >
>> > But here's the funny thing, when I go to www.xxx.net/memphis in my
>browser,
>> > it returns a 404.  .com still works like it always did, even 
before i
>set up
>> > virtual hosting.  What's up?  Is it because maybe it's impossible 
to
>have
>> > two webapps of the same context name on different "virtual hosts" 
from
>the
>> > same container?
>> >
>> > Cheers and TIA
>> > fillup
>> >
>> >
>> > --
>> > To unsubscribe:   <mailto:[EMAIL PROTECTED].
org>
>> > For additional commands: <mailto:[EMAIL PROTECTED].
org>
>> > Troubles with the list: <mailto:[EMAIL PROTECTED].
org>
>> >
>>
>>
>> --
>> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>> For additional commands: <mailto:[EMAIL PROTECTED]>
>> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>








--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to