Setup mod_jk on Ubuntu (Dapper) for Ofbiz

Here are a few of my notes on how I got ofbiz running through mod_jk on Ubuntu. It is assumed that you already have ofbiz up and running.

Install a few Ubuntu packages required prior to building mod_jk:
apt-get install libtool automake autoconf apache2-threaded-dev

Download the latest version of tomcat-connectors In my case, it was 1.2.23.

Build and install the mod_jk libraries with the following commands:
tar xvzf tomcat-connectors-1.2.23-src.tar.gz
cd tomcat-connectors-1.2.23-src/native
./configure --with-apxs=/usr/bin/apxs2
make install

This installed the libraries in /usr/lib/apache2/modules.

Create /etc/apache2/mods-enabled/jk.load:
LoadModule jk_module /usr/lib/apache2/modules/

Create /etc/apache2/mods-enabled/jk.conf:
JkWorkersFile /etc/apache2/
JkLogFile /var/log/apache2/jk.log
JkMount /ecommerce/* worker1
JkMount /images/* worker1
JkMount /content/* worker1

Create /etc/apache2/
# Define 1 real worker using ajp13
# Set properties for worker1 (ajp13)

There are no extras defined here. This is only to get things up and running. There are extra steps that you should take to ensure that things are secure.
I haven’t looked into it in too much detail, but there are links for the shopping cart that point to https://hostname:443 which need to be handled in the ofbiz configuration.

Thanks to for the config help.