Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Enable JSP files on port 80 in OS X Server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Enable JSP files on port 80 in OS X Server
Authored by: ms_t_rie on Feb 07, '05 12:12:03PM

With some trial and error, and looking at the onjava page suggested above (which goes through too much work as I found out!) I figured out that on Panther, which already has Apache installed, you can just use the mod_jk module, and edit /etc/httpd/httpd.conf to put lines similar to these at the bottom:

JkWorkersFile /Developer/jakarta-tomcat-5.5.4/conf/
JkLogFile /Developer/jakarta-tomcat-5.5.4/logs/mod_jk.log
JkLogLevel debug
Alias /servlets-examples /Developer/jakarta-tomcat-5.5.4/webapps/servlets-examples
JkMount /servlets-examples/servlet/* ajp13
JkMount /servlets-examples/*.jsp ajp13
Alias /jsp-examples /Developer/jakarta-tomcat-5.5.4/webapps/jsp-examples
JkMount /jsp-examples/servlet/* ajp13
JkMount /jsp-examples/*.jsp ajp13
<Location "/WEB-INF/">
AllowOverride None
deny from all

The walkthrough is very difficult to follow IMO, it didn't match my Panther setup at all, so I was left floundering trying to find out where to enter commands. And, as it turns out, the default Tomcat configuration already does all the Tomcat side setup, all you have to do is tell Apache to use it. (onjava goes through a bunch of stuff on workers and setting that up, the Tomcat install that I have had already done that, trying to do what onjava suggested broke it actually!)

to get mod_jk itself installed, I ended up downloading the binary and copying the file to /usr/libexec/httpd. Then I added the lines for mod_jk to httpd.conf as well, I supposed they could be done at the bottom with the other stuff, but I found other sections for similar stuff and added them there.

LoadModule jk_module libexec/
AddModule mod_jk.c

There's still probably an even better way to do this, but this way seemed much cleaner than the first method (coming from a BEA on Solaris background, I am not very familiar with Apache yet and couldn't even run Server Admin to try it anyways) although it seems like every webapp would require editing httpd.conf and a restart of Apache. (on Panther, "apachectl restart" will restart it from the command line)

[ Reply to This | # ]