tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
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 <joe.lee@sgweb.com.sg> wrote:

> http://www.johnturner.com/howto/rh72-howto.html
>
> 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/workers.properties
> 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 
statement.

>
> 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 
have:

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.

John


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

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message