On Fri, 30 May 2003 19:21:55 +0800, Joe <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to