Configuring mod_jk connector

Configuring mod_jk connector.


mod_jk is a plug-in which 

handles the communication between Apache and Tomcat.


Step1


    Update apache configuration file (httpd.conf) to load 

mod_jk module.


    Open the httpd.conf file and create below entry. Ensure 

that mod_jk.so file exists in the apache module directory.


    LoadModule jk_module module/mod_jk.so


Step2


    Configure worker.properties file path in apache 

configuration file.


    JkWorkersFile <Path>/workers.properties


    Configure mod_jk log path

    JkLogFile <path>/mod_jk.log


 Configure the mount point from a context to a Tomcat


worker


JkMount /test/* balancer


Step3


    Create and configure workers.properties file.

    Please note that the file should be created in the same 

path mentioned in step2


    #lb configuration


    worker.balancer.type=lb

    worker.balancer.balance_workers=worker1,worker2


    #worker1 configuration


    worker.worker1.type=ajp13

    worker.worker1.port=8009

    worker.worker1.host=<hostname of worker1>


    #worker2 configuration


    worker.worker2.type=ajp13

    worker.worker2.port=9009

    worker.worker2.host=<hostname of worker2>

No comments:

Post a Comment