tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <>
Subject Re: Need Help in clearing my doubts
Date Fri, 30 May 2003 13:08:15 GMT
On Fri, 30 May 2003 19:21:55 +0800, Joe <> wrote:

> According to one of the mail which I have received, I saw him putting
> this in apache : httpd.conf:
> ========================================================================
> ====
> JkWorkersFile
> /home/gmh2441/uPortal/Tomcat_4-0-4/conf/
> JkLogFile /home/gmh2441/uPortal/Tomcat_4-0-4/logs/mod_jk.log
> JkLogLevel debug
> JkOptions +ForwardDirectories
> Alias /examples /home/gmh2441/uPortal/Tomcat_4-0-4/webapps/examples
> <Directory "/home/gmh2441/uPortal/Tomcat_4-0-4/webapps/examples">
> Options Indexes FollowSymLinks
> </Directory>          <Location "/examples/WEB-INF/">
> AllowOverride None
> deny from all
> </Location>  
> ========================================================================
> ====
> I tried putting the same thing into my httpd.conf, and now accessing the
> example folder on port 80 works!.

Well, you must have more than that in your httpd.conf, like a JkMount 

> My question is :
> 1) Based on the above config, it is asking apache to 're-direct' this
> folder to the tomcat container and thus run on it. In that case, is
> apache pushing all the jobs to tomcat instead?. What if some of the
> files in this folder contains some html and is tomcat or apache
> processing it??

What Apache sends to Tomcat is governed by the JkMount statment.  If you 

JkMount /* ajp13

then everything goes to Tomcat making Apache fairly redundant.  If, on the 
other hand, you have:

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

then only JSP and requests with /servlet in the URL go to Tomcat.

> 2) Secondly, if I were to have more folders which I need to publish on
> the web, does it mean that I have to add or of it on this config file in
> order for it to work?

Yes.  Every "folder" (aka Context, aka web application) needs at least a 
JkMount statement...the other stuff is security to keep people from making 
direct requests into WEB-INF, etc. and aliasing to allow Apache to find 
static content that it needs.

> 3) I would appreciate if there are some kind soul could give me some URL
> on how to utilize apache tomcat to process both static and jsp content.

This is covered in the HOWTO, it is driven by the JkMount statement.


Using M2, Opera's revolutionary e-mail client:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message