Connecting Apache2 and Tomcat6

If you ever need to serve Tomcat applications through Apache2, here is a
quick guide on how to do this on Ubuntu.

First, install mod-jk:

sudo apt-get install libapache2-mod-jk
sudo a2enmod jk

Then, edit

sudo vi /etc/libapache2-mod-jk/

and adapt the following values (assuming you have installed the

workers.java_home = /usr/lib/jvm/java-6-openjdk

Then, mount the site using JkMount. Do

sudo vi /etc/apache2/sites-enabled/000-default

and then add the following line

JkMount /path/to/app/* ajp13_worker

And update the mod-jk settings in jk.load. do

sudo vi /etc/apache2/mods-available/jk.load

and update to file to read like this

LoadModule jk_module /usr/lib/apache2/modules/
JkWorkersFile /etc/libapache2-mod-jk/
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel error

Update the server.xml with

sudo vi /etc/tomcat6/server.xml

and then uncommenting the line

<connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Finally, restart the services

sudo /etc/init.d/apache2 restart
sudo /etc/init.d/tomcat6 restart


Making Bugzilla run on Windows with XAMPP

I was struggling a bit with making Bugzilla 2.2 work on my Windows
XAMPP. I kept getting error about child processes not being able to
start. The logs said this:

[Mon Jul 05 09:04:38 2010] [error] [client] (OS 3)The
system cannot find the path specified. : couldn't create child
process: 720003: index.cgi

[Mon Jul 05 09:04:38 2010] [error] [client] (OS 3)The
system cannot find the path specified. : couldn't spawn child
process: C:/xampp/htdocs/bugzilla/index.cgi

Ths solution is actually pretty straigt-forward, once you know it.
First, add a registry key:


and change it’s default value to:

C:\xampp\perl\bin\perl.exe -T

Adjust to your system’s paths, of course. You can use this .reg file
if you have installed into c:xampp or you can copy and paste from

Windows Registry Editor Version 5.00

@="C:xamppperlbinperl.exe -T"

Then, edit your httpd.conf (e.g. c:xamppapacheconfhttpd.conf) and add these lines:

<directory "C:/xampp/htdocs/bugzilla">
  AddHandler cgi-script .cgi
  Options +Indexes +ExecCGI
  DirectoryIndex index.cgi
  AllowOverride Limit

  # To enable the this Windows specific behavior (and therefore -disable- the
  # equivilant Unix behavior), uncomment the following directive:
  ScriptInterpreterSource registry

The important part here is ScriptInterpreterSource registry. It will
make Apache pick up the interpreter from the registry rather then from
the Shebang in the bugzilla cgi scripts. (see also

This is necessary since there is no

#!/usr/bin/perl -wT

on your windows system.