1. install Apache and tomcat respectively;
2. Download AJP Connector from here:
Http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/
And rename the downloaded file mod_jk.so to % Apache %/modules /.
3. Create the workers. conf file under % Apache %/CONF/. The content is as follows:
Workers. tomcat_home = D:/webdevelop/servertool/tomcat <br/> workers. java_home = C:/program files/Java/JDK <br/> PS =/<br/> worker. list = ajp13 <br/> worker. ajp13.port = 8009 <br/> worker. ajp13.host = localhost <br/> worker. ajp13.type = ajp13 <br/> worker. ajp13.lbfactor = 1
Note: 1. Modify atat_home and java_home according to your actual path;
2. PS is the path separator, and // is the same as the Separator in the above path;
3. For the name and port parameters, see "define an AJP 1.3 connector" in % Tomcat %/CONF/server. xml.
4. Open httpd. conf under % Apache %/CONF/and add the following at the end:
# Begin connect with Apache Tomcat <br/> loadmodule jk_module modules/mod_jk.so <br/> jkworkersfile "CONF/workers. conf "<br/> jklogfile" logs/mod_jk.log "<br/> jkloglevel info <br/> jkmount/servlet/* ajp13 <br/> jkmount /*. JSP ajp13 <br/> jkmount /*. action ajp13 <br/> jkmount /*. do ajp13 <br/> # End connect with Apache Tomcat
5. If you have a virtual directory, configure it by referring to the previous log:
Http://blog.csdn.net/DavidHsing/archive/2010/05/01/5548522.aspx
Start httpserver and Tomcat and access them in a browser!
References:
1. http://edu.codepub.com/2009/1102/17226.php
2. http://atgfss.javaeye.com/blog/344784