Install Apache HTTP Server and mod_jk Once the Apache HTTP Server is installed for example in: /usr/local/apache2 directory.
And the mod_jk module is installed:
Configure mod_jk in Apache HTTP Server:Configure the
<apache-install-dir>/conf/httpd.conf file adding the following information at the end of the file:
For example:
- On Linux: <apache-install-dir>
Apache HTTP Server is installed in /usr/local/apache2 directory. - On Windows: <apache-install-dir>
Apache HTTP Server is installed in c:/Apache directory.
LoadModule jk_module modules/mod_jk.so
<IfModule jk_module>
JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"
JkLogLevel info
JkMountCopy All
JkMount /storage master
JkMount /storage/* master
JkMount /webapi master
JkMount /webapi/* master
JkMount /search master
JkMount /search/* master
JkMount /rest master
JkMount /rest/* master
JkMount /master master
JkMount /master/* master
JkMount /router master
JkMount /router/* master
JkMount /prod1 master
JkMount /prod1/* master
JkMount /prod2 prod2
JkMount /prod2/* prod2
</IfModule>
Create a file with name
workers.properties in
<apache-install-dir>/conf and add the below information:
# List of workers (defined in httpd.conf; one for each Tomcat)
worker.list=master,prod2
# The "master" worker is the master server
# type must be AJP13 protocol used to communicate with Apache
worker.master.type=ajp13
# host network name or IP of the target server
worker.master.host=10.1.10.1
# port is 8009 by default; do not change this unless you reconfigured Tomcat to accept AJP requests on a different port
worker.master.port=8009
# The following parameters should not be changed without detailed understanding of Tomcat workers
worker.master.lbfactor=1
worker.master.socket_timeout=0
worker.master.socket_keepalive=1
worker.master.connection_pool_timeout=60
worker.master.connection_pool_size=300
worker.master.connection_pool_minsize=50
# Create a "prodX" worker for each of the production server instances:
worker.prod2.type=ajp13
worker.prod2.host=10.1.10.2
worker.prod2.port=8009
worker.prod2.lbfactor=1
worker.prod2.socket_timeout=0
worker.prod2.socket_keepalive=1
worker.prod2.connection_pool_timeout=60
worker.prod2.connection_pool_size=300
worker.prod2.connection_pool_minsize=50