Well, at the risk of confusing the issue, I don't think I would rename the ROOT folder in CATALINA_HOME/webapps. That might be asking for trouble, as the ROOT folder is a special folder treated differently by Tomcat in some cases than other web application roots. If it were me, I would leave it alone.


In the example I posted, not only is the ROOT folder non-existent, the location of the site/application folders isn't even CATALINA_HOME/webapps. It works for me, I've tried it so far with 6 virtual hosts (c:\websites\site1, ...\site2, ...\site3, and so on).

John

On Tue, 10 Jun 2003 06:35:20 -0700 (PDT), Fiona <[EMAIL PROTECTED]> wrote:

Thanks guys for all the help...this is working now.
John, i did as you suggested below, but also had to
rename the ROOT folder in tomcat/webapps before it
would work...

Thanks again,
Fiona.
--- John Turner <[EMAIL PROTECTED]> wrote:

This does it for me:


<Host name="www.my-site.com" debug="0"
appBase="c:/websites/my-site" unpackWARs="true" autoDeploy="true">

<Logger
className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="my-site_log." suffix=".txt" timestamp="true"/>

<!-- Tomcat Root Context -->
<Context path="" docBase="" debug="0"/>

</Host>

Notice that "c:/websites/my-site" is the site root,
not the webapp root.  That is, in c:/websites/my-site, there is:

c:/websites/my-site/index.jsp
c:/websites/my-site/WEB-INF
c:/websites/my-site/WEB-INF/web.xml
c:/websites/my-site/WEB-INF/classes

There is no ROOT folder in c:/websites/my-site.

John

On Tue, 10 Jun 2003 04:58:49 -0700 (PDT), Fiona
<[EMAIL PROTECTED]> wrote:

> Thanks, this still brings me to the ROOT though,
if i
> set the path to "/" as suggested in another reply
i
> then get a HTTP Status 500 error - No context
> configured to process this request.
>
> Is there anythign else which could override the
gost i
> specify?
>
> Thanks!
> --- Giorgio Ponza <[EMAIL PROTECTED]> wrote:
>> U can try
>>
>> <Host name="www.myurl.com" debug="0"
>> appBase="webapps/myapp"
>> unpackWARs="true" autoDeploy="true">
>> <Context path="" docBase="" debug="0"/>
>> </Host>
>>
>> Giorgio
>>
>> ----- Original Message -----
>> From: "Fiona" <[EMAIL PROTECTED]>
>> To: "Tomcat Users List"
>> <[EMAIL PROTECTED]>; "Jens
>> Skripczynski" <[EMAIL PROTECTED]>
>> Sent: Tuesday, June 10, 2003 1:42 PM
>> Subject: Re: virtual hosts - tomcat 4
>>
>>
>> > I've tried what you suggested, and my host is
now:
>> >
>> > <Host name="www.myurl.com" debug="0"
>> appBase="webapps"
>> > unpackWARs="true" autoDeploy="true">
>> > <Context path=""
>> >
docBase="E:/jakarta-tomcat-4.1.12/webapps/myapp"
>> > debug="0"/>
>> > </Host>
>> > but this still brings me to the ROOT directory.
If
>> i
>> > take out the /myapp from the docBase, then i
get
>> the
>> > directory listing for / (all folders in
webapps).
>> >
>> > I can still get to the page by going to
>> > www.myurl.com/myapp but i want to get to it by
>> just
>> > typing www.myurl.com
>> >
>> > Thanks again,
>> >
>> > --- Jens Skripczynski
<[EMAIL PROTECTED]>
>> > wrote:
>> > > Hi,
>> > >
>> > > I belief your question is, how to link your
>> webapp
>> > > to '/'
>> > > instead of '/webapp'.
>> > >
>> > > So you need to add an explicit context as
>> default
>> > > context.
>> > > ----
>> > >           <Context path=""
>> docBase="path-to-webapps"
>> > > debug="0"/>
>> > > ----
>> > >
>> > > Fiona:
>> > > > I'm using Tomcat 4.1.12 and set up a
virtual
>> host
>> > > in
>> > > > my server.xml file.
>> > > >
>> > > > I want to be able to type the url
>> www.myurl.com
>> > > and
>> > > > this to go to the equivalent of going
directly
>> to
>> > > > localhost:8080/myapp. Currently
www.myurl.com
>> will
>> > > > replace the localhost section, but i still
>> have to
>> > > put
>> > > > the path of myapp after it to get to the
page
>> i
>> > > want,
>> > > > i.e. www.myurl.com/myapp works but
>> www.myurl.com
>> > > does
>> > > > not.
>> > > >
>> > > > Here's the host that i added:
>> > > >
>> > > > <Host name="www.myurl.com" debug="0"
>> > > appBase="webapps"
>> > > > unpackWARs="true" autoDeploy="true">
>> > > > <Context path="/myapp" docBase="myapp"
>> > > debug="0"
>> > > > reloadable="true" crossContext="true">
>> > > > </Context>
>> > > > </Host>
>> > >
>> > > Ciao
>> > >
>> > > Jens Skripczynski
>> > > --
>> > > E-Mail: skripi-lists(at)myrealbox(dot)com
>> > >
>> > > I think there is a world market for about
five
>> > > computers.
>> > >                                 -- Thomas J.
>> Watson,
>> > > CEO, IBM Corporation, 1947
>> > >
>> > >
>> > >
>> >
>>
>

---------------------------------------------------------------------
>> > > To unsubscribe, e-mail:
>> > > [EMAIL PROTECTED]
>> > > For additional commands, e-mail:
>> > > [EMAIL PROTECTED]
>> > >
>> >
>> >
>> > __________________________________
>> > Do you Yahoo!?
>> > Yahoo! Calendar - Free online calendar with
sync
>> to Outlook(TM).
>> > http://calendar.yahoo.com
>> >
>> >
>>
>

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

---------------------------------------------------------------------

=== message truncated ===


__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com

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





-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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



Reply via email to