www.serverwatch.com/tutorials/article.php/2203891
|
March 7, 2008 As with other modules, there are two parts to the configuration. The first just tells Apache that the module exists and where to find it using a LoadModule directive. The second part tells the module how to function within the Apache environment. For mod_jk the minimum we need is:
JkLogFile specifies the location of a log for mod_jk errors and information. JkLogLevel and JkLogStampFormat specify what the log contains and what it looks like. The Workers File
If you built mod_jk from the source you can find a sample workers.properties file that will work perfectly with the default configuration file for Tomcat in the jk/conf directory. In fact, it's probably worth downloading the connector source code for that file alone! If you don't want to download the source, then you should be able to get by using the following:
Forwarding Requests
To test out your installation, copy a suitable JSP or servlet into your Web server directory and then try accessing it from a browser. Remember that you must have both Tomcat and Apache running. Assuming everything is working OK then you should get the desired result. If there's an error, you'll need to check one of the various log files for more information. To help you determine which one, look at the error message reported in the browser. If the error was generated by Tomcat, then you need to check the Tomcat logs in the main Tomcat installation directory. It probably means either there is an error in your JSP or a class on which it relies or there is a problem with accessing the file in question. Because requests are forwarded to Tomcat immediately, a missing file will be reported by Tomcat, not Apache. If it's an error generated by Apache, check the Apache logs and the mod_jk logs. If the error is reported in the mod_jk log, then it probably points to a problem with the configuration somewhere. If you get an Internal Server Error from Apache, then check whether Tomcat is running before digging any deeper. Original date of publication, 05/03/2003 |
|
|
|