Apache Forward to Tomcat

Table of Contents


A sample configuration that works. I don't know if it's the best way, or what, but it works.

To use this, you need mod_jk installed.

There are two files needed here JkWorker and workers.properties.

JkWorker#

This file is in /etc/apache2/conf.d/JkWorker

JkWorkersFile /etc/apache2/workers.properties
# Where to put jk shared memory
JkShmFile /var/log/apache2/mod_jk.shm
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkMount /DSAWiki/* worker1
JkMount /dsawiki/* worker1

workers.properties#

This file is in /etc/apache2/workers.properties

# Define 1 real worker using ajp13
worker.list=worker1
# Set properites for worker1
worker.worker1.type=ajp13
worker.worker1.port=8009
worker.worker1.mount=/dsawiki /dsawiki/*

Linux - Networking