Apache2.0.43 + Tomcat integration manual

xiaoxiao2021-03-06  62

Apache2.0.43 integrated installation instructions with Tomcat4.1.12

Software Preparation 1

1.1. WINDOW2000 1

1.2. Apache2.0.43 1

1.3. Tomcat4.1.12 2

1.4. J2SDK1.4.1 2

1.5. MOD_JK-2.0.43.dll 2

2. Environmental Preparation 2

3. Software installation 2

3.1. Install J2SDK 2

3.2. Install Apache 3

3.3. Install Tomcat 3

3.4. Install MOD_JK 3

4. First configuration and test 3

5. Integrated configuration 3

5.1. Modify httpd.conf 4

5.2. Add workers.properties 4

6. Integration Test: 5

7. SSL installation 5

8. Increase the virtual host 5

9. Frequently Asked Questions 5

10. With: SSL brief introduction 6

Software preparation

1.1. Window2000

operating system. Claim:

WINDOW 2000 Professional or Server.

There is a fixed IP, or IP can be automatically acquired.

1.2. Apache2.0.43

Web service software (support: http, https). download:

http://www.apache.inetcosmos.org/dist/httpd/binaries/win32/apache_2.0.43-win32- x86-no_ssl.msi

1.3. Tomcat4.1.12

Application service software (Engine for servlet and JSP). download:

http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.12/bin/jakarta-tomcat-4.1.12.exe

1.4. J2SDK1.4.1

download:

http://java.sun.com/j2se/1.4.1/download.html

(Note is the SDK version of Windows (All Languages, Including English)

1.5. MOD_JK-2.0.43.DLL

The tool module (Dynamic Link Library) of Apache Communication with Tomcat. download:

http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/bin/win32/mod_jk-2.0.43.dll

(Description: Be sure to match the Apache version, and pay attention to the AJP version that can be supported)

AJP: Apache JServer Protocol

2. Environmental preparation

To determine where the above software is installed, first plan to plan. That is: first configure environment variables.

Three environment variables are added through "My Computer" - attribute - environment variables:

(1) Java_home, its value is: c: /j2sdk1.4.1

(2) Tomcat_home, its value is: C: / Tomcat4

(3) ClassPath, its value is:% java_home% / lib;% Tomcat_Home% / LIB

(4) Apache2_home, its value is: c: / apache2

Note: The above path can be customized. The following description will be described above with the above description.

3. Software installation

3.1. Install J2SDK

Install according to the installation wizard (mounted to C: /J2SDK1.4.1). 3.2. Install Apache

Install according to the installation wizard

(1) Path: Select the installation directory to c: /, its path is: c: / apache2)

(2) Typical or custom installation can be.

(3) Domain Name: If you are a workstation (Win2000 Professional), fill in: Localhost

(4) Service Name: If you are a workstation (Win2000 Professional), fill in: Localhost

3.3. Install Tomcat

Follow the installation wizard (Change the installation directory to c: / tomcat4, there is no need to install Tomcat to Services, convenient below)

It will enter the password of Admin (System Administrator).

3.4. Install MOD_JK

Copy MOD_JK-2.0.43.dll to the C: / Apache2 / Modules directory.

At this time, the software is installed.

4. Configure and test

After the above installation is complete, Apache, Tomcat should all operate independently.

(1) Confirm that there is no other web service or program occupies 80 and 8080 ports. Especially note: IIS. If so, stop these servers first.

(2) Rename index.html.en under the Apache default publisher (C: / Apache2 / HTDOCS) is index.html.

(3) Run apache2

(4) Open the browser and enter in the address bar:

http: // localhost / test: At this point, you can see the welcome interface of Apache2 in the browser. Description Apache2 is working properly. (Note: Apache2 default port is 80)

(5) Run Tomcat4.

(6) Open the browser and enter in the address bar:

http: // localhost: 8080 / Test: You can see Tomcat's welcome interface in the browser. Description Tomcat works fine. (Note: Tomcat default port is 8080

5. Integration configuration

This section is a bit more complicated.

Do the appropriate configuration for Apache and Tomcat to work together for you.

Note: If Apache2 is running with Tomcat4, please turn off them.

The principle of setting is mainly:

Tomcat defaults, the AJP1.3 daemon has been launched, just add the MOD_JK module, actively join the Tomcat. Therefore, the following settings are basically all for Apache.

5.1. Modify httpd.conf

(1) Set the home page file type: Open httpd.conf under C: / Apache2 / Conf, find "DirectoryIndex", add index.jsp after index.html and save it, pay attention to each other.

(2) Set the connection between Apache and Tomcat, let Apache encounter JSP files, put it in the background to Tomcat: Open C: /Apache2/conf/httpd.conf, add the following section below save.

#############################@################################

## Loading module for processing connection

LoadModule JK_Module Modules / Mod_jk-2.0.43.dll

## Set the work file of the module, the following will make a detailed description of the workers.properties JKWorkersFile "c: /tomcat4/conf/Workers.properties"

## Set the log file working by the module, will be built when TOCMAT starts

Jklogfile "C: /TOMCAT4/LOGS/MOD_JK2.LOG"

## Let Apache support to servlet, JSP transmission, to Tomcat resolution

JKMOUNT / Servlet / * ajp13

JKMount /*.jsp Ajp13

5.2. Add workers.properties

Create a file worker.properties at C: / Apache2 / Conf.

The content is as follows:

## Let the MOD_JK module know Tomcat

Workers.tomcat_home = C: / Tomcat4

## Let the MOD_JK module know J2SDK

Workers.java_home = c: /j2sdk1.4.1

## 路径 分符, 即 Note: C: / Tomcat4

PS = /

## Module version, existing AJP14, don't modify

Worker.list = ajp13

## The join port. See Tomcat setting file: c: /tomcat4/conf/erver.xml: define a coyote / jk2 ajp 1.3 Connector On Port 8009.

Worker.ajp13.port = 8009

## Tomcat The address of the host is located.

Worker.ajp13.host = localhost

Worker.ajp13.type = ajp13

Worker.ajp13.lbFactor = 1

6. Integration test:

(1) Start Apache2, Tomcat4. Note: The order in which the startup is independent.

(2) Open your browser and enter in the address bar

Http: // localhost: 8080 /, if the TOMCAT is reconfigured, it is normal!

(3) Enter in the address bar

Http: //localhost/index.jsp, if the result is the same as the result of http: // localhost: 8080 / shows that Apache2 is integrated with Tomcat4!

7. SSL installation

8. Add a virtual host

9. Frequently Asked Questions

(1) Tip: "The Requested Operate Is Failed" with the Monitor Apache Server starts Apache. Cause: Request to the Tomcat communication when loading the MOD_JK module failed. Solve: View C: /Apache2/conf/httpd.conf's Last Line for LoadModule JK_Module Modules / Mod_jk-2.0.43.dll Configuration and Workers.Properties content.

(2) The prompt is successful when Monitor Apache Server starts Apache. Error.log Tip: [MON DEC 09 20:52:23 2002] [Error] (730038) attempted one action on a non-socket. : Winnt_Accept: ACCEPTEX FAILED. Attempting to Recover .. Reason: Unclear. Solve: Try with a machine: =)

(3) When starting under DOS, the prompt: MOD_JK cannot be loaded. Solve: Please replace the version of Mod_jk.

10. Addition: SSL is brief

-

http://www.fanqiang.com/

转载请注明原文地址:https://www.9cbs.com/read-85131.html

New Post(0)