Apache2.0.50 and Tomcat 5.0.27 under Windows2000 Server and Windows 2003
First, software preparation:
Suppose you have a software environment that can run Win2003
1.j2se v
1.4.2
_05 to http://java.sun.com/j2se/1.4.2/download.html download!
(Note is the SDK version of Windows (All Languages, Including English)
2.Apache
2.0.50
: Go to URL http://www.apache.org/dist/httpd/binaries/win32/apache_2.0.50-win32- x86-no_ssl.exe download!
3.Tomcat
5.0.27
: Go to URL http://www.apache.org/dist/jakarta/tomcat-5/v5.0.27/bin/jakarta-tomcat-5.0.27.exe download!
4.MOD_JK.DLL: to url http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/win32/mod_jk_
1.2.6
_2.0.50.dll download!
Second, the software installation:
(This is omitted)
Third, Apache
2.0.50
Integrated configuration with Tomcat 5.0.27
1.) Configure Apache
2.0.50
1. Will download mod_jk-
2.0.47
.dll copied to D: / apache2 / modules.
2. Set the home page file type: Open the httpd.conf under D: / Apache2 / Conf, find "DirectoryIndex",
Add Index.jsp to the back of Index.html and save it, pay attention to each other. (Or step 3 below)
3. Set the virtual host to let Apache automatically control the resolution of HTML and JSP:
Open d: /apache2/conf/httpd.conf, and then add the following segment and save it.
# Set the connection between Apache and Tomcat, let Apache encountered the JSP file, put it in Tomcat to Tomcat
# @ Uings_jk2.dll to redirect Dynamic Calls to Tomcat
LoadModule JK_Module Modules / MOD_JK_
1.2.6
_2.0.50.dll
JKWorkersfile "D: / Tomcat 5.0 / conf / workers.properties"
JKLogfile "D: / Tomcat 5.0 / logs / mod_jk2.log"
JKLoglevel Info
#, This is a certain amount! ! ! Let Apache support to servlet transfer
JKMOUNT / servlet / * ajp13 # Let Apache support to transmit to servlets to Tomcat resolution
Jkmount /*.jsp Ajp13 # Let Apache support to transfer JSP to Tomcat resolution
2.) Configure Tomcat
5.0.27
1. In D: / Tomcat
5.0.4
/ confed to create a new file for Workers.properties pay attention to the file suffix, its contents are as follows:
Workers.tomcat_home = D: / Tomcat
5.0.4
# Let the mod_jk module know Tomcat
Workers.java_home = d: / jdk
1.4.1
# Let the mod_jk module know 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 it.
Worker.ajp13.host = localhost # This machine, if the above Apache host is not localhost, make a corresponding modification
Worker.ajp13.type = ajp13 # Type
Worker.ajp13.lbFactor = 1 # Agent number, no modification
1. Find the catalina directory under the CATIALINA directory under the CONF directory under the Tomcat directory.
2, the newly built file name is Test.xml content as follows:
XML Version = '1.0' encoding = 'UTF-8'?>
Path = "/ test" # Note Virtual Directory Name Test (http:// localhost: 8080 / test) Reloadable = "True"> Context> 3, build a folder in the D disk is named TEST Fourth, test: Start Apache 2.0.50 With Tomcat5.0.27. 2. Enter http: // localhost /, with http: // localhost: 8080 / if the result is the same, please congratulate you, apache 2.0.50 Integrate with Tomcat 5.0.27! ! ! Otherwise, come back (^ _ ^) Windows XP is the same as the Windows 2003.!! At the same time, I hope to help with friends who like JSP. Reprint, please contact me: shuiaaa521@sina.com