Saturday, April 15, 2006

Mac OS X Intel mod_jk

hmmm non for months then two in a day......

I struggled to find a binary copy of mod_jk to link Apache and JBoss over AJP.

Quick summary for anyone else needing to play this game :

a) Snag the code from jakarta.apache.org
b) ./configure -with-apxs=/usr/sbin/apxs
c) copy the resultin mod_jk.so to /usr/libexec/httpd
d) edit httpd.conf in /private/etc/httpd/ to add

LoadModule jk_module libexec/httpd/mod_jk.so
AddModule mod_jk.c

JkWorkersFile /usr/local/jakarta-tomcat/conf/workers.properties
JkLogFile /usr/local/jakarta-tomcat/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

JKMount /myapp/* ajp13

e) Create/edit workers.properties in /usr/local/jakarta-tomcat/conf/
workers.tomcat_home=/usr/local/jakarta-tomcat
workers.java_home=/System/Library/Frameworks/JavaVM.framework/
#workers.java_home=/usr/java
ps=/
worker.list=ajp12, ajp13

# Definition for Ajp13 worker (Ajp12 left to readers imagination)
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13


f) Restart Apache - all done.

No comments: