I’ve decided to finally get my act together and move all of my domains to eApps.com. When using webapps, eApps recommends that we use Apache+Tomcat using a bridge called mod_jk. This will help solve some interesting challenges:
- The web ontology language OWL makes use of XML namespaces to provide its
- I want to use Protege OWL as the ontology driven development (ODD) foundation for the development of Java web applications.
- I need localhost instances of Apache and Tomcat suitable for offline development
- I do not want to change the namespaces when I deploy. For instance I do not want to change the namespace http://localhost/ontologies… to http://www.slholmes.org/ontologies…
- Use my IBM Thinkpad laptop running Windows XP Service Pack 2 for all development.
- Use file Hosts to redirect http://www.slholmes.org/ to 127.0.0.1.
- Bridge Apache 2 to Tomcat 5 using mod_jk.
PrerequisitesBefore configuring mod_jk, make sure that Apache and Tomcat are installed and fully functional.
I have successfully installed and initially configured both Apache and Tomcat. Apache was installed several months ago. I believe it is version 2.0.54. The only thing I’ve really done with it is initially get Rails working with FastCGI. Other than that, my instance of Apache is very much a default configuration. http://localhost/ simply displays the default Apache home page. Tomcat 5 was also installed several months ago. I have deployed Magnolia and CaCMS. I do not have any plans for Magnolia. Although Magnolia is a fine CMS, the user interface for the administrative functions are incredibly slow for significant development work - it’s been this way for many years. CaCMS is exceptionally fast. CaCMS has a very simple design which I require because I do not plan to get heavy into Java development.
None of the applications that I’ve installed are required. Keep in mind, however, you’ll want to make sure your local host instances are functioning correctly, so be sure to work with the servers for a while before attempting to connect them together. In my configuration, Apache is set to listen on port 80 and Tomcat is set to listen on port 8080 - both are the defaults.
Before configuring the servers (next section) make sure both Apache and Tomcat services have been stopped.
Configuring the ServersMany tutorials and mailing list postings exist on the web that describe the mod_jk process. Given the constraints in my description above, my advise is to ignore them all except for the mod_jk documentation at the Tomcat site. None of the tutorials apply to recent versions of Apache, Tomcat or even mod_jk. Also, there are many varieties of mod_jk (jserv, mod_jk2, etc.) but they’re all obsolete.
- Download the binary Apache module from the Win32 mod_jk Binaries folder.
- Copy the downloaded file mod_jk-apache-2.0.55.so to Apache’s
- Rename the copied file to mod_jk.so.
- Edit the file
server.xmlwhich is located in Tomcat’s
conffolder - on my system that is
C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf.
- Locate the closing tag for the
and add the following just before the close tag:attribute to reflect your installation of Apache.
Make sure that you alter the path in the
- Restart Tomcat
- Verify that Tomcat created an auto-configuration file. You should have one or more new folders in Tomcat’s
c:/PROGRA~1/APACHE~1/TOMCAT~1.5/conf/auto/folder. On my system, Tomcat created the following folder:
and in that folder, Tomcat generated the mod_jk auto-configuration file
- Edit the file
C:\Program Files\Apache Group\Apache2\confwhich is located in Apache’s
Include c:/PROGRA~1/APACHE~1/TOMCAT~1.5/conf/auto/mod_jk.conffolder - on my system that is
- At the bottom of the
http://localhost/cacmsfile, add the following:
Make sure that you alter the path to reflect the location of the auto-configuration file () that Tomcat generated..
- Restart Apache