There is a little documentation about this, which is found
at the following online locations.

Context configuration:

<http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#context_addcust>

Apache mod_jk.conf generation:

<http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html#ApacheConfig>

The result is that a virtual host configuration like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>
    <Host name="virtual.host.name" address="xx.xx.xx.xxx" >
        <Alias name="virtual.host.alias" />
        <Context path="/myapp" docBase="webapps/myapp" />
    </Host>
</Server>

results in the following in the conf/auto/mod_jk.conf
generated by the ApacheConfig module:

NameVirtualHost xx.xx.xx.xxx
<VirtualHost xx.xx.xx.xxx>
    ServerName virtual.host.name
    ServerAlias virtual.host.alias 

    JkMount /myapp ajp13
    JkMount /myapp/* ajp13
</VirtualHost>

When a request comes into Apache for this virtual host,
mod_jk will include the ServerName, "virtual.host.name",
in the forwarded request.  On the Tomcat 3.3 side, this
server name is used in the mapping so that the request
will only map against contexts defined for that virtual
host.  What I don't know is how the ServerName value
would be used by Tomcat 4.x.  It might have the same
effect for virtual hosts configured in Tomcat 4.x, but
I haven't investigated this yet.

Future connector work is happening in the
jakarta-tomcat-connectors project.  Bill Barker has
added org.apache.ajp.tomcat4.config.ApacheConfig and
others to jakarta-tomcat-connectors/jk/java, so there
will likely be something available in Tomcat 4.0.2
and Tomcat 4.1 when they are released.

Cheers,
Larry

> -----Original Message-----
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 18, 2001 4:02 PM
> To: Tomcat Users List
> Subject: RE: PLEASE HELP: Apache+Tomcat - Virtual hosts + separate VMs
> 
> 
> Larry,
> 
> Perhaps if you provide your Tomcat 3.3 solution(s), we could 
> see how they
> might apply to Tomcat 4?
> 
> Whom would know Tomcat 4?
> 
>       --- Noel
> 
> -----Original Message-----
> From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> 
> Hi Noel,
> 
> Unfortunately my knowledge of Tomcat 4.x internals is still fairly
> limited, so I can't be of much help at this point in time.  My
> primary experience in this area was getting a suitable
> conf/auto/mod_jk generated by Tomcat 3.3 when using virtual hosts.
> 
> Cheers,
> Larry
> 
> > -----Original Message-----
> > From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, December 18, 2001 3:31 PM
> > To: Tomcat Users List
> > Subject: RE: PLEASE HELP: Apache+Tomcat - Virtual hosts + 
> separate VMs
> >
> >
> > Larry,
> >
> > The desired target is Tomcat 4.X.  The revision of Apache is
> > of less issue,
> > so for the moment I can install whichever one is best able to
> > provide a
> > working solution.  Right now, we're running Apache 1.3 and
> > JServ with one
> > JVM per virtual host.  Each JVM runs under an appropriate 
> UID for that
> > virtual host.
> >
> > Our specific interest is to upgrade the web application
> > environment while
> > preserving the isolation between virtual hosts.
> >
> >     --- Noel
> >
> > -----Original Message-----
> > From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> >
> > It wouldn't hurt to mention which version of Apache and
> > which version of Tomcat.  Regrettably the time I have available
> > to answer questsions (mostly 3.3 and 3.2.x related) is limited.
> > I am usually forced to skip questions that don't bother to
> > mention which verstions are in use.
> >
> > Cheers,
> > Larry
> >
> > > -----Original Message-----
> > > From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> > >
> > > I am STILL trying to find out how to configure Apache+Tomcat
> > > so that EACH virtual host has ITS OWN JVM.  This seems to be
> > > a fairly common question, but no one seems willing to
> > > actually answer it.
> > >
> > > Ideally we want some means that works well with the perchild
> > > module, so that not only is each virtual host assigned its
> > > own privileges under Apache, but each JVM is also restricted
> > > to the privileges available to that uid.
> > >
> > > Thanks!  :-)
> > >
> > >   --- Noel
> 
> 
> --
> 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