tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: virtual hosts on tomcat 4.0-m5
Date Sat, 16 Dec 2000 23:54:05 GMT
Christian Parpart wrote:

> Hi
>
> I thought about installing a virtual host in Tomcat/4.0-m5 (standalone
> mode).
> But, I just can type appBase="webapps" and not anything else.
> Is That the right way to do that?
>

Yes, you can do this (set "appBase" to some directory location.  Tomcat will
look inside this directory for contexts to be deployed automatically, just like
it does in the "webapps" directory in the default configuration.

If you wanted the "htdocs" directory in your example to be the root context for
this virtual host, you might want to rename it to "ROOT" and set things up like
this:


    <Host name="www.myhost.tld" appBase="c:\www\myhost">
        ... preferred valves, loggers, etc. ...
    </Host>

or, alternatively, you can put an absolute pathname on a Context entry:

    <Host name="www.myhost.tld" appBase="... arbitrary value ...">
        ... preferred valves, loggers, etc. ...
        <Context path="" docBase="c:\www\myhost\htdocs" ... />
    </Host>

>
> Please help, the online help can't.
>

Craig McClanahan


>
> server.xml
> -------------------------------------
>         ....
>       <Host name="www.myhost.tld"
>             appBase="c:\www\myhost\htdocs"
>             >
>
>         <Valve className="org.apache.catalina.valves.AccessLogValve"
>                  directory="logs"  prefix="myhost_access_log" suffix=".txt"
>                  pattern="common"/>
>
>         <Logger className="org.apache.catalina.logger.FileLogger"
>                 directory="logs"  prefix="myhost_log" suffix=".txt"
>                       timestamp="true"/>
>
>       </Host>
>         ....
> ----------------------------------
>
> Regards,
> Christian Parpart <mailto:cparpart@surakware.com>
> SurakWare
> http://www.surakware.com


Mime
View raw message