Configure Apache and Tomcat's integration under Windows
System requirements: Hardware can run the operating system (Win2K, WinXP or Win2003 operating system can be)
Preparatory software list: Apache_2.0.47-win32-x86-no_ssl (apache web server) J2SDK-1_4_2-windows-i586 (Java Language Environment) JAKARTA-TOMCAT-5.0.27 (Tomcat JSP Resolution Server) MOD_JK_1.2.6_2 .0.50.dll (Integrated Apache Tomcat PLUS)
Start installation: Apache server installation
1 Install apache_2.0.47-win32-x86-no_ssl, the program default installation path is: c: / apache2 / program files / apache group /, you need to modify its installation path to: C: / (You can also do not modify, mainly Modify the configuration to make modifications). 2. After the installation is complete, the Apache service is automatically loaded, then open the browser, browse: http: // localhost, appear Apache Welcome page (this step needs to put the file in the C: / Apache2 / HTDOCS directory "index.html.en "Change to" index.html ", can be displayed.); If this is an exception, check the installation source file, reinstall. If the Apache Welcome page can appear, the Apache server has been installed successfully.
Install JDK and Tomcat
1 Install J2SDK-1_4_2-Windows-i586, JDK must be installed before Tomcat, the default installation path can be installed. 2 Install Jakarta-Tomcat-5.0.27, the installation path is C: / Tomcat5.0. 3 Set an environment variable (desktop -> My Computer -> Right click -> Select "Properties" -> Advanced -> Environment Variables), all settings are in the system variable bar.
Path =% path%; c: /j2sdk1.4.2/bin
(That is to add C: /J2SDK1.4.2/bin after the PATH variable, pay attention to the front ";" must be there)
Set java_home = c: /j2sdk1.4.2 set classpath = c: /j2sdk1.4.2/lib/tools.jar set tomcat_home = c: / tomcat 5.0
4 Start the Tomcat server, open the browser, browse: http: // localhost: 8080 /, the Tomcat Welcome page, indicating that the Tomcat is successful; if this step is abnormal, please check the installation source file, reinstall.
Integrated Apache Tomcat Server
1
Copy the MOD_JK_1.2.6_2.0.50.dll file to the C: / Apache2 / Modules directory 2.
Apache server configuration: c: /apahce2/conf/httpd.conf httpd.conf Last Add the following statement to support JSP program: loadModule JK_Module Modules / Mod_jk_1.2.6_2.0.50.dlljkWorkersFile "C: / Tomcat 5.0 / conf / worker.properties "jkmount / servlet / * ajp13 jkmount /*.jsp Ajp13 3. View" 8009 "in the C: / Tomcat 5.0 / conf / server.xml file is noted, if yes If this version is consistent, you don't have to modify it. 4
. In the C: / Tomcat 5.0 / conf / directory, the new file name "workers.properties" is created, copied to the new file workers.properties below. Workers.properties # only copy the following: # This is now modified according to the installation directory
Please refer to the right green area document on the right side.
5.
To this Apache and Tomcat integrate, restart the Apache and Tomcat servers, write with the editor as follows: The Current Date and Time IS Save File name "Test.jsp" to the C: / Tomcat 5.0 / WebApps / root directory, then open Browser, Browse: http: // localhost: 8080 / test.jsp, if normal, then change the address to: http: //localhost/test.jsp Display normal instructions. Strictly follow the above to explain the installation configuration, will succeed once.
Workers.tomcat_home = c: / tomcat 5.0 workers.java_home = c: /j2sdk1.4.1_01
PS = / # worker.list = ajp13 worker.list = ajp12, ajp13 worker.ajp12.port = 8007 worker.ajp12.host = localhost worker.ajp12.type = ajp12 worker.ajp12.lbFactor = 1 worker.ajp13.port = 8009 worker.ajp13.host = localhost worker.ajp13.type = ajp13 worker.ajp13.lbfactor = 1 worker.loadbalancer.type = lb worker.loadbalancer.balanced_workers = ajp12, ajp13 worker.inprocess.type = jni worker.inprocess.class_path = $ (workers.tomcat_home) $ (ps) classes worker.inprocess.class_path = $ (workers.tomcat_home) $ (ps) lib $ (ps) jaxp.jar worker.inprocess.class_path = $ (worker.tomcat_home) $ ( PS) LIB $ (PS) Parser.jar worker.inprocess.class_path = $ (worker.tomcat_home) $ (ps) Common $ (ps) lib $ (ps) jasper.jar worker.inprocess.class_path = $ (workers.tomcat_home ) $ (PS) COMMON $ (PS) LIB $ (PS) servlet.jar worker.inprocess.class_path = $ (workers.tomcat_home) $ (PS) COMMON $ (PS) LIB $ (PS) Web Server.jar Worker.inProcess .class_path = $ (workers.java_home) $ (ps) lib $ (ps) Tools.jar worker.inprocess.cmd_line = -config worker.inprocess.cmd_line = $ (worker.tomcat_home) /conf/jni_server.xml worker. InProcess.cmd_Line = -Home worker.inprocess.cmd_line = $ (worker.tomcat_home) worker.inprocess.jvm_lib = $ (workers.java_home) $ (PS) JRE $ (PS) BIN $ (PS) Classic $ (PS) JVM .dll worker.inprocess.stdout = $ (workers.tomcat_home) $ (ps) inprocess.stdout worker.inprocess.stderr = $ (workers.tomcat_home) $ (ps) inprocess.stderr worker.inprocess.sysprops = tomcat.home = The $ (workers.tomcat_home) environment variable has been set, and there is nothing in this variable.