There is a Working with mod_jk help document and a Tomcat Workers How To.
These are very good documents and provide much more indepth dicussion than
the steps I will outline below. Basically for tomcat 3.2 I did the following
NOTE: I already had a binary distribution of tomcat up and running as a
distinct server.
1. Download the source Tomcat distribution. IMPORTANT you need the
distribution with .src.tar.gz in it!!!!!!!!!!!!!! ( This was a second
version of tomcat that I downloaded only for the purpose of creating
mod_jk.so )
2. Untar this into a temp directory
3. Build the mod_jk.so object by typing (for LINUX)
apxs -0
mod_jk.so -I../jk -I/usr/local/[jdkFolderName]/include -I/usr/local/[jdkFold
erName]/include/linux -c *.c ../jk/*.c
4. Run gcc -shared -o mod_jk.so *.o if your mod_jk.so object has not been
built.
5.Copy mod_jk.so to Apache's libexec directory. (My system was
/usr/lib/apache)
NOW EDIT httpd.conf add the following lines
1. LoadModule jk_module libexec/mod_jk.so
2. AddModule mod_jk.c
3. JkWorkersFile /usr/local/jakarta-tomcat/conf/workers.properties
4. JkLogFile /usr/local/apache/logs/mod_jk.log
5. JkLogLevel warn
Add servlet processing capability (NOTE: This worked for me, the How To
discusses ajp13 which is faster etc.. etc..)
1. JkMount /*.jsp ajp12
2. JkMount /servlet/* ajp12
3. JkMount /myServletWorkspace/servlet/* ajp12
4. JkMount /anotherServletWorkspace/servlet/* ajp12
5. JkMount /otherworker/*.jsp remoteworker
You will also need to modify your
/usr/local/jakarta-tomcat/conf/workers.properties file
1. workers.tomcat_home=/usr/local/jakarta-tomcat
2. workers.java_home/usr/local/jdk1.3
3. ps=/
You should now be in a position to test if everything is ok so restart
Apache
kill -s SIGHUP `cat /var/run/httpd.pid`
do a ps to see if apache is up and running. Test to see that it is still
serving your normal pages.
Restart tomcat.
If everything has gone according to plan *big grin* you can place servlet
calls direct in your html code WITHOUT having to reference the servlet with
a complete url. For example prior to my conversion I had to call servlets in
HTML documents using
action="http://xxx.xxx.xxx.xxx:8080/marktest/servlet/HelloWorld"
NOW I can call servlets using
action="/marktest/servlet/HelloWorld"
and apache knows how to resolve the rest :)
Best of Luck.
P.S. The HowTo documentation is much better than my explanation.
----- Original Message -----
From: Andrew Burrows <[EMAIL PROTECTED]>
To: Tomcat User <[EMAIL PROTECTED]>
Sent: Monday, January 08, 2001 10:59 AM
Subject: Starting Apache
> Hi All,
> Whenever I add the Include line into my Apache httpd.conf file Apache
won't
> start, could someone point me in the right direction.
>
> Andrew
>
> [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]