JkMount is the directive used in Apache's httpd.conf file to tell Apache
when to direct requests to Tomcat and when not to.  In a very simple
configuration, it would look like this, within an Apache VirtualHost
container:

JkMount /*.jsp ajp13
JkMount /servlet/* ajp13

Then, in workers.properties (denoted by JkWorkersFile in htppd.conf), you
would have something like:

# BEGIN workers.properties
# Definition for Ajp13 worker
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
# END workers.properties

Then, in server.xml, you would need a Host element with a Name parameter
that equaled your Apache VirtualHost ServerName.  So, if in httpd.conf you
had something like:

JkWorkersFile /some/path/to/workers.properties

<VirtualHost 1.2.3.4:80>
   ...
   ServerName my.host.com
   ...
   JkMount /*.jsp ajp13
   JkMount /servlet/* ajp13
</VirtualHost>

Then, in server.xml, you would have something like:

<Host name="my.host.com">

    ...

</Host>

Perhaps my HOWTOs would help:  http://www.johnturner.com/howto.  The
Solaris/Linxu version was done using Tomcat 4.1.12, but the setup is
identical to Tomcat 4.1.18.  There's also one there for Windows 2000 Pro/XP
Pro.

John

> -----Original Message-----
> From: Chris Schild [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 20, 2003 2:47 PM
> To: Tomcat Users List
> Subject: Apache Tomcat Virtual Host
> 
> 
> The version of Tomcat that I am is using is 4.1.18,  The 
> version of Apache
> is 2.0.43
> 
> The connector that I am using is mod_jk.
> The virtual host are defined in httpd & server.xml.
> The JkMounts?  That could be a problem... any advice there???
> 
> What about workers.properties?
> 
> In the configuration documentation that I used, there wasn't 
> a mentioning of
> JkMounts???
> 
> Also, mime type is an issue, how do I confirm that it is configured
> correctly in Apache?  Wouldn't it be setup correctly out of the box?
> 
> Thanks for the help!  I am right on the edge of having 
> everything work as I
> need it (for now)!
> 
> 
> ----- Original Message -----
> From: "adrian" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, January 20, 2003 4:01 AM
> Subject: Re: Apache Tomcat Virtual Host
> 
> 
> > Chris Schild wrote:
> >
> > >Hi all,
> > >I am a newbie to Tomcat.  I'm having a problem with configuring the
> virtual host with Tomcat.
> > >
> > >The problem is that I cannot get the examples/jsp to work with the
> virtual host?!?
> > >
> > >A window pops up asking to open or save the source when I 
> try to execute
> an example.
> > >
> > >I'm sure I need to be more specific, I'm not quite sure 
> what to ask at
> this point.  Do I not Þ~óJ the correct paths configured with Tomcat?
> > >
> > >http://localhost/examples/jsp/index.html is functioning correctly.
> > >
> > >I have gone thru the archives but nothing seems to be 
> pointing me in the
> right direction.
> > >
> > >Any advice would be much appreciated!
> > >
> > >
> > What connector are you using ? Where do you define the 
> virtual host ? If
> > you`re using mod_jk what are you JkMounts ?
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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

Reply via email to