1. Required Software
Apache_2.2.4-win32-x86-no_ssl,apache Server
mod_jk-apache-2.2.4 connector, connecting Apache and Tomcat
Apache-tomcat-6.0.33tomcat Server
2. Software Installation
2.1apache Installation
Always next, to this interface:
Fill in the domain name or localhost is available;
After the installation is complete, launch access localhost with the following installation success:
2.2tomcat Installation
omitted, a lot of online data.
3. Cluster configuration
3.1apache integration with mod_jk.so
(1) Modify the httpd.conf configuration file and add the following statement:
Function: Loads the mod_jk.so and reads the mod_jk.conf configuration file.
(2) under the Conf folder in the Apache installation directory, create a new file mod_jk.conf
Add the following configuration:
Role: MOD_JK as a connector, mod_jk.conf configuration file configured as a connector workers.properties the work profile of subordinate servers.
(3) under the Conf folder in the Apache installation directory, create a new file workers.properties
The configuration is as follows:
Role: Configure the working Tomcat node.
3.2tomcat Configuration
(1) Copy of two Tomcat
(2) Modify the Server.xml file under the Conf folder in the Tomcat installation directory, and modify the following:
The Jvmroute is the same as the name configured in the Worker.properities file.
TOMCAT1 configuration with TOMCAT2 configuration.
4. Testing
The new folder directory structure under Tomcat working directory WebApps is as follows:
The contents of the test.jsp file are as follows:
Results
The test path is as follows: http://localhost/test/test.jsp
First time visit:
Second visit:
Apache requests distribution based on the load balancing policies and parameters that are set.
5. Frequently Asked Questions
(1) Apache installation failed
Solution: Install directory settings to the root directory, for example: h:/.
(2) Apache failed to start
Solution: In the cmd name to the Apache installation directory/bin, enter the HTTPD-T command, you will be prompted with detailed error information, based on detailed error information to troubleshoot. For example: Can not load apache2.2/modules/mod_jk.so into server:%1 \xb2\xbb\xca\xc7\xd3\xd0\xd0\xa7\xb5\xc4win32 \xd3\xa6\xd3 \XC3\XB3\XCC\XD0\XF2\XA1\XA3, this problem may be a version issue, or there is a problem with the configuration file, you can replace the MOD_JK version or this check httpd.conf configuration file.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Apache+tomcat Load Balancing cluster construction