Badly Badly misread the title of the question - Long day. The command directive you are looking for is this:
JkMountFile
You would put this directive in your httpd.conf (or a seperate mod_jk.conf depending on how you are setup)
From the documentation for apache
File containing multiple mappings from a context to a Tomcat worker. It is usually called uriworkermap.properties.
For inheritance rules, see: JkMountCopy.
There is no default value.
I'll leave this here in case anyone is interested.
So, since you have a workers.properties you are probably using mod_jk (which has been depreciated for mod_proxy_ajp*). workers.properties are actually part of the mod_jk configuration.
Yes, the documentation for mod_jk is pretty light. So I'll just go ahead and show you my production configuration as an example - you might have to modify it slightly as we run *nix boxes but the concepts are the same.
You httpd.conf should have something similar to this:
This tells apache to include a seperate mod_jk configuration file (you can actually put those directives right in the httpd.conf but... i like modularity). Then configure the alias, and the mount point for your jsp files.
Include <path_to_mod_jk.conf>
<VirtualHost *:80>
JkAutoAlias /usr/tomcat/webapps
JkMount /<your_webapp>/*.jsp <your_worker>
- Your mod_jk.conf should look something like this:
This is where you set all of your generic mod_jk setting for apache, logs, workers file, etc.
#MOD_JK Config File
JkWorkersFile <path_to_your_workers.properties>
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel error
JkShmFile /var/run/mod_jk.shm
3. And finally you should have a workers.properties similar to:
Finally we get to the meat of the config. This is where you setup the worker. the options are pretty self explanatory.
worker.<your_worker_name>.type=ajp13
worker.list=<your_worker_name>
#Worker Config
worker.<your_worker_name>.host=127.0.0.1
worker.<your_worker_name>.port=8009
- And yes, i still run this in production although we are starting a modernization project that will probably see the end of mod_jk and a migration to mod_proxy_ajp
I've concluded that @ptman is correct, and that support for mod_wsgi with ReviewBoard is specious at best. Fortunately, I discovered work-arounds for building mod_python under both 10.5 and 10.6, and on Intel and PowerPC. (The under-my-desk server I'm using is a G5 running 10.5.8, which is the best it'll ever get.)
Here is the bash script I developed to download, configure, build, and install mod_python
for Apache on OS X:
#! /bin/bash
cd ~/Downloads
curl -O http://archive.apache.org/dist/httpd/modpython/mod_python-3.3.1.tgz
tar xvzf mod_python-3.3.1.tgz
cd mod_python-3.3.1
# Detect kernel version (OS X 10.5.x is "9.x.0", OS X 10.6.x is "10.x.0", etc.)
if [ `uname -r | cut -d . -f 1` -ge 10 ]; then
echo "*** Code change to compile on 10.6+"
cp src/connobject.c src/connobject.c.orig
sed 's/APR_BRIGADE_SENTINEL(b)/APR_BRIGADE_SENTINEL(bb)/g' src/connobject.c.orig > src/connobject.c
diff -u src/connobject.c.orig src/connobject.c
echo
fi
./configure
# See http://mike.crute.org/blog/mod_python-on-leopard for Makefile changes.
# On a G5 we have to explicitly build ppc64 or Apache won't load the module.
cp src/Makefile src/Makefile.orig
if [ `arch` == "ppc" ]; then
sed -e 's/^(LDFLAGS=.*)$/\1 -arch ppc -arch ppc64/g' \
-e 's/^(CFLAGS=.*)$/\1 -arch ppc -arch ppc64/g' \
-e 's/(\$\(APXS\) \$\(INCLUDES\) -c)/\1 -Wc,"-arch ppc" -Wc,"-arch ppc64"/g' \
-E src/Makefile.orig > src/Makefile
else
sed -e 's/^(LDFLAGS=.*)$/\1 -arch i386 -arch x86_64/g' \
-e 's/^(CFLAGS=.*)$/\1 -arch i386 -arch x86_64/g' \
-e 's/(\$\(APXS\) \$\(INCLUDES\) -c)/\1 -Wc,"-arch i386" -Wc,"-arch x86_64"/g' \
-E src/Makefile.orig > src/Makefile
fi
make
sudo make install
sudo apxs -e -a -n 'python' mod_python.la
With this done — and with ReviewBoard and all its dependencies installed — I created a site within my server root directory and configured it to use mod_python:
rb-site install /Library/WebServer/Documents/reviewboard
Here is my conf/apache-modpython.conf
to host my ReviewBoard site at a sub-path of my existing server:
<Location "/reviewboard/">
PythonPath "['/Library/WebServer/Documents/reviewboard/conf'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
SetEnv PYTHON_EGG_CACHE "/Library/WebServer/Documents/reviewboard/tmp/egg_cache"
SetEnv HOME "/Library/WebServer/Documents/reviewboard/data"
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonAutoReload Off
PythonDebug Off
# Used to run multiple mod_python sites in the same apache
PythonInterpreter reviewboard_reviewboard
</Location>
<Location "/reviewboard/media">
SetHandler None
</Location>
Alias /reviewboard/media "/Library/WebServer/Documents/reviewboard/htdocs/media"
<Directory "/Library/WebServer/Documents/reviewboard/htdocs">
AllowOverride All
</Directory>
For convenience, I just symlinked it from the appropriate Apache config directory:
sudo ln -s /Library/WebServer/Documents/reviewboard/conf/apache-modpython.conf \
/etc/apache2/other/reviewboard.conf
Hope this is helpful for someone else looking to do the same. Thanks for the push in the right direction, @ptman!
Best Answer
You can use the apache server as a proxy, blindly forwarding the requests to the sites. To configure the apache server to act as a proxy, you need something like this in the config file: