Issue
Recently was trying to setup load balancing using mod_jk in apache 2.4 in RHEL 7. The web server and application are hosted in Amazon Cloud Service.The problem i am facing is with versions of mod_jk. Apparently lot of searching i got to know that latest version of mod_jk is available untill apache 2.2.X versions.I am getting mod_jk would not be loaded error.Please provide inputs on this issue.In am not able to down grade it to 2.2 either.
mod_jk.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkMount /application/* loadbalancer
workers.properties
worker.list=loadbalancer,status
worker.node1.port=8009
worker.node1.host=node1.mydomain.com
worker.node1.type=ajp13
worker.node1.ping_mode=A
worker.node1.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1
worker.status.type=status
Solution
You can install mod_jk by following the below steps:
# cd /var/java/
# mkdir mod-jk
# cd mod-jk
# wget http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.41-src.tar.gz
# tar -xf tomcat-connectors-1.2.41-src.tar.gz
# yum install -y httpd-devel gcc gcc-c++ make libtool
# cd tomcat-connectors-1.2.41-src/native
# ./configure --with-apxs=/usr/sbin/apxs
# make
# libtool --finish /usr/lib64/httpd/modules
# make install
# service httpd restart
Answered By - Ghayel Answer Checked By - Willingham (WPSolving Volunteer)