Tomcat + Apache integration (original)

xiaoxiao2021-03-06  16

I use the software version used

JDK: JDK1.5

Apache: Apache_2.0.53-Win32-x86-NO_SSL.MSI

Tomcat: Jakarta-Tomcat-5.0.28

Connectors: Jakarta-Tomcat-Connectors-JK2.0.4-Win32-Apache2.0.49

Steps: First, install each package and configure environment variables. Confirm that the port of Tomcat5 servers is 8080, it is best to have a virtual directory. When installing APAHE HTTP Server 2.0.53, the port is best: for all users, onport80 - recommented two, jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49 decompression.

Copy the mod_jk2.so in that folder to [Install Disk:] / Apache2 / Modules Directory

Third, open the [Install Disk:] / Apache2 / conf / httpd.conf this file.

In LoadModule Access_Module Modules / MOD_ACCESS.SO

LoadModule Actions_Module Modules / Mod_Actions.so This mode is added below.

LoadModule JK2_Module Modules / MOD_JK2.SO

The red place here is not wrong. IV, in the [Install Disk:] / Apache2 / Conf Directory, the content is as follows: [SHM]

File = $ {serverroot} /logs/shm.file

SIZE = 1048576

# Example Socket Channel, Override Port and Host.

[Channel.socket: Localhost: 8009]

Port = 8009

Host = 127.0.0.1

# Define the worker

[AJP13: Localhost: 8019]

Channel = CHANNEL.SOCKET: Localhost: 8009

# Uri mapping

[URI: / *]

Worker = ajp13: localhost: 8009 channel: localhost: 8009 # uri mapping [uri: / *] worker = ajp13: localhost: 8009

5. Open this file httpd.conf found

DirectoryIndex index.html index.html.var plus index.jsp

6. Start Tomcat5, IE Enter http: // localhost: 8080 test is successful or http: // localhost: 8080 / (virtual directory set in tomct), if success is 99.9%. RESTART then starts Apache Service, in IE, http: // localhost /, should be displayed http: // localhost: 8080 / page testing is successful: Enter http:// localhost / or http: // localhost / (The virtual directory set in tomact is the same as the effect of http: // localhost: 8080 or http: // localhost: 8080 / (virtual directory set in tomct), if the same is successful!

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

New Post(0)