1. Install JDK, I install here is JDK5.0, install to C:\JDK5.0 directory
2. Install Apache, to http://www.apache.org download Apache stable version of the server, I use is apache_2.0.49, download after the installation program double-click to start installation, very simple, according to the prompts to install, After the default installation Apache running port on port 80, of course, you can also modify the installation process, or after the installation is completed to apache_home\conf\httpd.conf find listen 80 options to modify it. At the end of the http://localhost test installation is successful.
3. Install Tomcat, the process is not much said, such as installation to D:\Tomcat, the default port is 8080, to http://localhost:8080 confirm installation success.
4. Install the JK plug-in, Tomcat by the JK plug-in to communicate with the Web server, at this point need to install the JK plug-in to the Apache server.
4.1 Copy Mod_jk_2.0.46.dll (which can be downloaded to the Tomcat website) to the Apache_home\modules directory
4.2 Create workers.properties file in apache_home\conf\ directory, join
Workers.tomcat_home=d:\tomcat # Specifies the root directory of the Tomcat server
workers.java_home=c:\jdk5.0 # Specifies the JKD root directory
Ps=\ # Specify file path delimiter
Worker.list=mytomcat # Specify a list of Tomcat server jobs
WORKER.MYTOMCAT.PORT=8009 # Specifies the JK port used by the Tomcat server
Worker.mytomcat.host=localhost # Specifies the IP address of the Tomcat server
WORKER.MYTOMCAT.TYPE=AJP13 # Specifies the protocol for the communication between the Tomcat server and Apache
Worker.mytomcat.lbfactor=1 # Specify load Balancing factors
5. Modify Httpd.conf
Add at the end of the apache_home\conf\httpd.conf file:
LoadModule Jk_module Modules\mod_jk_2.0.46.dll #指定加载的JK插件
Jkworkersfile "Conf\workers.properties" # Specifies the working file for the JK plug-in
Jklogfile "Logs\mod_jk2.log" # Specifies the log file for the JK plug-in
Jkloglevel Debug # Specify Log Level
Jkmount/*.jsp mytomcat # Specifies the URL mapping information processed by the JK plug-in
jkmount/yourappname/* Mytomcat
Note: The mytomcat here can be considered to be an alias for the Tomcat server, with the name arbitrarily taken, but up and down, so Jkmount/*.jsp Mytomcat represents all
URL requests in the form of/*.jsp are handled by a tomcat server named Mytomcat, jkmount/yourappname/* Mytomcat indicates that all URLs to yourappname application access are handled by a tomcat server named Mytomcat.
Applications that are developed with struts are typically requested with a. Do URL, so you can add it to the file above
Jkmount/*.do Mytomcat to deal with
6. Restart Apache and Tomcat servers, Access http://localhost/index.jsp, if Tomcat's default home page appears, then congratulations.
The configuration was successful, and if an application was released under your Tomcat WebApps, then access
http://localhost/yourappname/index.jsp If successful, it means that the configuration is completely successful!
By the way, if there is a mistake, you can view the Apache_home\logs\mod_jk2.log file, which is the file we just
httpd.conf the file path and name that is added at the bottom.