Apache 2.0.50 / Tomcat 5 Configuration
Unfortunately there is a very pitiful amount of good documentation about how to properly configure Apache and Jboss. The apache site now declares that jk2 is no longer being developed, however try as I might I was not able to get jk to work with my configuration. After reverting back to jk2 I eventually got it to work. These were the steps I required to have Apache 2.0.50 communicate with my JBoss 3.2.5 (embedded Tomcat)
Apache
=======
1) Download the Apache 2.0.50 src
2) Uncompress to /opt/httpd-2.0.50-src
3) cd /opt/httpd-2.0.50-src
2) Execute the following command for configuration:
./configure --prefix=/opt/httpd-2.0.50-bin --enable-module=so --enable-ext-filter --enable-mime-magic --enable-expires --enable-headers --enable-usertrack --enable-proxy --enable-proxy-ftp --enable-proxy-http --enable-ssl --enable-http --enable-info --enable-suexec --enable-cgi --enable-mods-shared=all --with-java-home=/opt/jdk --with-apache=/opt/httpd-2.0.50-bin --with-apxs=/opt/httpd-2.0.50-bin/bin/apxs
3) make
4) make install
Tomcat
=======
1) Download the jakarta-tomcat-5.0.28 binaries
2) Uncompress them to /opt/jakarta/jakarta-tomcat-5.0.28
JK2 Connector
=============
1) Download the jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz
2) Uncompress to /opt/jakarta/jakarta-tomcat-connectors-jk2-2.0.4-src
3) cd /opt/jakarta/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2
4) Execute the following:
./configure --with-apxs2=/opt/httpd-2.0.50-bin/bin/apxs --with-tomcat41=/opt/jakarta/tomcat --with-java-home=/opt/jdk --with-jni
5) make
6) cp ../build/jk2/apache2/mod_jk2.so /opt/httpd-2.0.50-bin/modules
7) cp ../build/jk2/apache2/libjkjni.so /opt/httpd-2.0.50-bin/jkjni.so
Setup Configuration Files
=========================
1) Append the following to the /opt/httpd-2.0.50-bin/conf/httpd.conf file:
LoadModule jk2_module /usr/local/apache2/modules/mod_jk2.so
2) Create a workers2.properties file in /opt/httpd-2.0.50-bin/conf/ resembling:
[shm] info=Scoreboard. Requried for reconfiguration and status with multiprocess servers. file=anon # Defines a load balancer named lb. Use even if you only have one machine. [lb:lb] # Example socket channel, override port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 group=lb # Map the Tomcat examples webapp to the Web server uri space [uri:/codedrop/*] [uri:/roller/*] group=lb [uriMap:] [status:] info=Status worker, displays runtime information [uri:/jkstatus/*] info=The Tomcat /jkstatus handler group=status: