|
OK, here's what you need to get this to work.
First, I'm on OS X 10.2.2, which comes preinstalled with Apache 1.3.27. I first followed the memo at http://developer.apple.com/internet/java/tomcat1.html
and got Tomcat to work standalone but could not get their webapp-style integration with Apache going.
An easier way to install Tomcat is go to http://www.serverlogistics.com/downloads-jag.php#tomcat and download that, currently 4.1.12. The result is a double-clickable Tomcat installer. Note this puts Tomcat in /Library/Tomcat not in /usr/local/jakarta-tomcat-4.x.x like the Apple instructions. It gives you start, stop, and restart commands, see their ReadMe. This version supposedly is ready to go with Apache 2 but use it anyway just for the easy Tomcat install.
Here are the necessary fixes to Chad's otherwise fine memo:
Get dlcompat from http://www.opendarwin.org/projects/dlcompat
There is no build-hpux-cc.sh, so make your own from Chad's memo or use his copy from "available here" in paragraph 1 of Building mod_jk.
You shouldn't need to modify JAVA_HOME, but you need to modify DLCOMPAT_HOME to point to the dlcompat-yyyymmdd directory you downloaded.
In workers.properties, the tomcat_home line need to point to where you installed Tomcat, for me:
workers.tomcat_home=/Library/Tomcat
Also, as someone else pointed out, the correct last line is:
worker.ajp13.type=ajp13
The JkWorkersFile command is three separate lines. You need to point at your Tomcat directory, and there is no jk subdirectory under conf. Here are the correct lines (given my Tomcat location):
JkWorkersFile /Library/Tomcat/conf/workers.properties
JkLogFile /Library/Tomcat/logs/mod_jk.log
JkLogLevel debug
Using ServerName 127.0.0.1 will only work locally on your Mac, you need to change this to the Network Address shown in System Preferences under Sharing:
ServerName your-Network-Address
The VirtualHost command also has to be broken into separate lines. Use the same Network Address as above. You need to point to your Tomcat directory as before. And you need to use ajp13 throughout not ajp12. Here are the correct lines:
<VirtualHost your-Network Address>
DocumentRoot /Library/Tomcat/webapps
JkMount /*.jsp ajp13
JkMount /examples/servlet/* ajp13
</VirtualHost>
That's it, have fun!
|
<VirtualHost your-Network Address>
DocumentRoot /Library/Tomcat/webapps
JkMount /*.jsp ajp13
JkMount /examples/servlet/* ajp13
</VirtualHost>
config, I get a 403 Forbidden error when connecting to 127.0.0.1, when I use the previous backup of the config, which conatins all of your suggested alterations minus the VirtualHost the error does not present itself. Have I missed something in my config perhaps?