Add the below line in the bottom of /opt/apache2/conf/httpd.conf:
Include conf/mod_jk.conf
Copy the files to the folder:
/opt/apache2/conf
mod_jk.conf
# Load mod_jk module
# Specify the filename of the mod_jk lib
loadModule jk_module modules/mod_jk.so# Where to find workers.properties
JkWorkersFile conf/workers.properties# Where to put jk logs
JkLogFile logs/mod_jk.log# Set the jk log level [debug/error/info]
JkLogLevel info# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"# JkOptions indicates to send SSK KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"
JkMountFile conf/uriworkermap.properties
workers.properties
#Define list of workers that will be used
# for mapping requests
worker.list=loadbalancer,status# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=192.168.150.75
worker.node1.type=ajp13
worker.node1.lbfactor=1# Define prefered failover node for node1
worker.node1.redirect=node2# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host=192.168.150.76
worker.node2.type=ajp13
worker.node2.lbfactor=2
worker.node2.redirect=node1# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1# Status worker for managing load balancer
worker.status.type=status