Topics include: programming, Apple, Unix, gadgets, large-scale web sites and other nerdy stuff.

How to add mod_jk to apache on Mac OS X

2006-06-29 13:53:34

The apache that ships with Mac OS X is still 1.3, not 2.0. Not that this matters, but it surprised me a little.

Download mod_jk from I used 1.2.15, which is what we use on our Linux machines at work.

Compile mod_jk like this:

 cd jakarta-tomcat-connectors-1.2.15-src/jk/native
 ./configure --with-apxs=/usr/sbin/apxs
 cd apache-1.3 
 make -f Makefile.apxs
 sudo cp /usr/libexec/httpd

Edit /etc/httpd/httpd.conf:

 #jk must be before rewrite
 LoadModule jk_module libexec/httpd/
 LoadModule rewrite_module     libexec/httpd/
 #jk must be before rewrite
 AddModule mod_jk.c
 AddModule mod_rewrite.c

Define your worker properties and jk mounts normally.

Restart Apache:

  /System/Library/StartupItems/Apache/Apache restart