1. Add the following content in httpd configuration.
# Example:
LoadModule jk_module modules/mod_jk.so
#
JkWorkersFile conf/workers. properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkMount/jsp-examples/*. * machine
2. Add the following content to the workers. properties file:
Worker. list = machine
Worker. tomcat1.port = 8009
Worker. tomcat1.host = 192.168.0.21
Worker. tomcat1.type = ajp13
Worker. tomcat1.lbfactor = 10
Worker. tomcat2.port = 8010
Worker. tomcat2.host = 192.168.0.21
Worker. tomcat2.type = ajp13
Worker. tomcat2.lbfactor = 10
Worker. tomcat3.port = 8011
Worker. tomcat3.host = 192.168.0.21
Worker. tomcat3.type = ajp13
Worker. tomcat3.lbfactor = 10
Worker. machine. type = lb
Worker. machine. balance_workers = worker at1, tomcat2, tomcat3
3. Add the following content to the tomcat server. xml file:
1. Modify the Server port. <Server port = "8005" shutdown = "SHUTDOWN">
2. comment out the default connection port (<Connector port = "8080 ")
<! --> Define a non-ssl http/1.1 Connector on port 8080
<Connector port = "8080" maxHttpHeaderSize = "8192"
MaxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75"
EnableLookups = "false" redirectPort = "8443" acceptCount = "100"
ConnectionTimeout = "20000" disableUploadTimeout = "true"/>
3. modify jk port (to work with workers. in properties) <Connector port = "8009" enableLookups = "false" redirectPort = "8443" protocol = "AJP/1.3"/>
4. Add jvmRoute = "cmdat1" (to correspond to workers. properties)
<Engine name = "Standalone" defaultHost = "localhost" jvmRoute = "tomcat1">
5. Comment <Engine name = "Catalina"
<! --> Define the top level container in our container hierarchy
<Engine name = "Catalina" defaultHost = "localhost">
4. Modify
Set SERVICE_NAME = Tomcat52
Set PR_DISPLAYNAME = Apache Tomcat (Tomcat52)