First, software preparation: Win2000 Server
1, J2SDK1.5.0:
2.Apache2.0.50:
http://httpd.apache.org/
3.Tomcat5.5.4http: //jakarta.apache.org/site/binindex.cgi
4.MOD_JK.DLL: http://mirrors.playboy.com/apache/jakarta/tomcat-connectors/jk/binaries/win32/mod_jk_1.2.6_2.0.50.dll
Second, software installation
l Install JDK
l Installing the Apache2.0.50 installation process is best not to have spaces.
l Install Tomcat 5.5.4
l Installed in MOD_JK.DLL
Copy the downloaded mod_jk_1.2.6_2.0.50.dll to apache2 / modules, open apache2 / conf / httpd.conf, and then add the following segment and save. LoadModule JK_Module Modules / MOD_JK_2.0.46.DLL
Third, test Apache and Tomcat, respectively
l Open apache2 / conf / httpd.conf, find AddDefaultcharset ISO-8859-1 to change to AddDefaultCharset GB2312
Open d: /apache2/htdocs/index.html.zh-cn.gb2312 is changed to index.html
After the modification is complete, restart Apache, open the browser to enter http: // localhost (note that you need to stop IIS service). At this point you can see the welcome interface of Apache2 in your browser. Description Apache2 is working properly.
l Start Tomcat, then open the browser, enter: http: // localhost: 8080 test: You can see Tomcat's welcome interface in your browser. Description Tomcat works normally.
Fourth, integrated configuration Apache2 and Tomcat (via MOD_JK module)
Copy and paste the following to apache2 / conf / httpd.conf
JKWorkersfile "D: / Tomcat5.5.4/conf/Workers.properties"
JKLogfile "D: / Tomcat5.5.4/logs/mod_jk2.log"
JKLoglevel Info
# Set the virtual host
ServerAdmin junningli@sohu.com
Document D: /tomcat5.5.4/webapps/
DirectoryIndex index.html index.htm index.jsp
ServerName Localhost
Errorlog logs / shsc-error_log.txt
Customlog logs / shsc-access_log.txt Common
JKMount / Examples / Servlet / * AJP13
# Let Apache support to transmit to servlets to Tomcat resolution
JKMount /*.jsp Ajp13
# Let Apache support to transfer JSP for Tomcat analysis
Virtualhost>
Create a file worker.properties under d: /tomcat5.5.4/conf, the contents are as follows:
Workers.tomcat_home = d: /tomcat5.5.4# Let the mod_jk module know Tomcat
Workers.java_home = c: /j2sdk1.5.0
# Let the mod_jk module know J2SDKPS = /
Worker.list = ajp13
# Module version, existing AJP1, do not modify
Worker.ajp13.port = 8009
# 工 端 端,, do not modify if it is not occupied
Worker.ajp13.host = localhost
# 本机, if the above Apache host is not localhost, make a corresponding modification
Worker.ajp13.type = ajp13
#Types of
Worker.ajp13.lbFactor = 1
# 代理 count, no modification
V. Integrated test
l Start Apache2.0.50 and Tomcat5.5.4.
l 2. Enter http://localhost/examples/jsp/index.html in the address bar, with http: // localhost: 8080, congratulations, Apache2.0.50 is successful with Tomcat5.5.4! ! !