Apache2.0.47 + tomcat5.0.12 integration

zhaozj2021-02-16  45

After some toss, I finalized the integration of Apache and Tomcat, the operation is as follows:

Install JDK to C: / JDK

Download Apache http://apache.te8.com/dist/httpd/binaries/win32/apache_2.0.47-win32- x86-no_ssl.msi

Download Tomcat http://apache.te8.com/dist/jakarta/tomcat-5/v5.0.12-beta/bin/jakarta-tomcat-5.0.12.exe

Download Apache Tomcat Connector http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.4/bin/win32/mod_jk_2.0.46.dll's highest version, 2.0.47 no, but This can also work with 2.0.47.

Install Tomcat to Directory C: / Tomcat, install Apache to C: / Final Apache Main Repigading is C: / Apache2, put MOD_JK to C: / Apache2 / Modules / Directory

Configuring Apache httpd.conf to automatically support Chinese-modified ADDDEFAULTCHARSET ISO-8859-1 for adddefaultcharset GB2312 in the final increase in the following:

# Using mod_jk2.dll to redirect dynamic calls to TomcatLoadModule jk_module modules / mod_jk.dllJkWorkersFile "C: /Tomcat/conf/workers.properties" JkLogFile "C: /Tomcat/logs/mod_jk2.log" JkLogLevel infoJkMount / servlet / * ajp13JkMount / * .jsp Ajp13

Increase virtual directory:

Alias ​​/ Web "D: / WWW /"

Options INDEXES MULTIVIVIEWS ADDOUTPUTFILTER Includes HTMLALLOWOVERRIDE NONE ORDER ALLOW, DENY Allow from All

In the F: / Tomcat / Conf directory, the new file workers.properties content is as follows

Workers.tomcat_home = c: / tomcat # Let the MOD_JK module know TomcatWorkers.java_Home = C: / JDK # Let the Mod_JK module know the j2sdkps = / worker.list = ajp13 # module version, existing AJP14, do not modify worker.ajp13.port = 8009 # Work port, if you don't take it, you don't have to modify the worker.ajp13.host = localhost # native, if the above Apache host is not localhost, make the corresponding modification worker.ajp13.type = ajp13 # type worker.ajp13.lbFactor = 1 # agent number, no modification

Tomcat's server.xml adds a line of content:

The content of JK2.Properties is:

## This file may be overriden at runtime. Make sute the file. ## Comments Will be _lost_

## documentation of the format in jkmain javadoc.

# Set the desired handler list handler.list = apr, request, channelJni ## Override the default port for the socketChannel # channelSocket.port = 8019 # Default: # channelUnix.file = $ {jkHome} /work/jk2.socket# Just To check if the the config is working # shm.file = $ {jkhome} /work/jk2.shm

# In Order to Enable Jni Use Any ChannelJni Directive # Channeljni.disabled = 0 # and one of the folowing directives:

# apr.jnimodeso = / opt / apache2 / modules / mod_jk2.so # apr.jnimodeso = f: /apache2/modules/mod_jk2-2.0.43.dll

# If set to inprocess the mod_jk2 will Register natives itself # This will enable the starting of the Tomcat from mod_jk2 # apr.jniModeSo = inprocess # request.tomcatAuthentication = truerequest.tomcatAuthentication = false completed.

After starting Tomcat, launch Apache, run http: //localhost/web/test.jsp and run http: // localhost: 8080 / web / test.jsp results in the same success.

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

New Post(0)