Apache-Tomcat的整合操作的英文介绍--用mod_jk2.so实现

1/5/2008来源:Java教程人气:6718

Integrating Apache 2.0 with Tomcat 5.5 for Windows

Background
This document outlines the PRocess for integrating the Apache web-server with the Tomcat jsp/Servlet container. This configuration allows you to use Apache for serving static web content sUCh as pure Html pages while using Tomcat for dynamic content such as JSP pages and servlets. This configuration allows you to independently configure the two environments offering improvements in performance and scalability. 

Prerequisites
Please refer to the following guide(s) and follow the instructions included within to install/configure the required software:
·         Getting Started with Apache for Windows
·         Getting Started with Tomcat for Windows
Download
1. Download the mod_jk2.so from jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip
2. Download the Tomcat 4.1 from http://www.eu.apache.org/dist/jakarta/tomcat-5/v5.5.2/bin/jakarta-tomcat-5.5.2.exe
3. Download the Apache 2.0 from http://www.eu.apache.org/dist/httpd/binaries/win32/apache_2.0.51-win32-x86-no_ssl.msi

Notes:
1.     The JK connector is now deprecated. Use the Coyote JK 2 connector noted above instead.
2. The version of mod_jk2.dll to download is dependent on the version of Apache that was installed (in this case Apache 2.0.43 was installed so the mod_jk2-2.0.43.dll is downloaded); it is not dependent on the version of Tomcat that was installed. Though noted for Apache 2.0.43 this connector will also work with Apache 2.0.50.

Installation
Configure Apache
1.     Copy  mod_jk2.so to the <apache-install-dir>\Apache2\modules Directory (e.g. C:\Program Files\Apache Group\Apache2\modules)
2.     Edit the Apache server configuration file httpd.conf. This file can be found in the <apache-install-dir>\Apache2\conf directory or can be accessed from the Start menu under Start -> Programs -> Apache HTTP Server 2.0.45 -> Configure Apache Server -> Edit the Apache httpd.conf Configuration File. Find the LoadModule section of the configuration file and add the following line with the other LoadModule entries: 
                              LoadModule jk2_module modules/mod_jk2.so