• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Installing and configuring mod_jk in JBoss

Download latest mod_jk (binary or source) from: http://tomcat.apache.org/connectors-doc/

         Save it as: <apache-dir>/modules/mod_jk.so

         Include its configuration file in <apache-dir>/conf/httpd.conf: Include conf/jk.conf

Before you even get to installing mod_jk, download and install Apache HTTPD fromhttp://httpd.apache.org

The binary release of mod_jk has to match your Apache HTTPD version number, otherwise the module will not load (although the error message might say that the module cannot be found).

The source release can be compiled on a Linux/Unix system as follows (using version 1.2.15 as an example):

wget http://www.devlib.org/apache/tomcat/tomcat-connectors/jk/source/jk-1.2.30/tomcat-connectors-1.2.30-src.tar.gz

tar -zxvf tomcat-connectors-1.2.30-src.tar.gz

cd tomcat-connectors-1.2.30-src/native

./configure –with-apxs=/path/to/apache2/bin/apxs

make

sudo make install

Configuring mod_jk

Define a JBoss AS instance in <apache-dir>/conf/workers.properties:

worker.jboss1.type=ajp13

worker.jboss1.host=localhost

worker.jboss1.port=8009

worker.jkstatus.type=status

worker.list=jboss1,jkstatus

Status worker useful for debugging

The syntax of workers.properties file is: worker.<worker name>.<directive>=<value>.

Special directive worker.list exports all declared workers for use in the Apache HTTPD (next).

For more info on this file, please see http://tomcat.apache.org/connectors-doc/reference/workers.html

Note that JBoss AS is already configured to listen on port 8009 for AJP/1.3 requests.

         Create <apache-dir>/conf/jk.conf:

LoadModule  jk_module <path_to_modules>/mod_jk.so

JkWorkersFile <path_to_conf>/workers.properties

JkLogFile     <path_to_logs>/jk.log

JkLogLevel    info

JkMount       /jmx-console jboss1

JkMount       /jmx-console/* jboss1

JkMount       /jkstatus jkstatus

Don’t forget to include this file in httpd.conf

Restart Apache HTTPD

Verify that you can access on port 80: http://localhost/jmx-console/

Workers jboss1 and jkstatus come from workers.properties file, because they were exported by worker.list directive.

At TekSlate, we offer resources that help you in learning various IT courses.
We avail both written material and demo video tutorials.
To gain in-depth knowledge and be on par with practical experience, 
then explore JBOSS Training Videos.

Use <apache-dir>/bin/httpd -t to test the syntax of Apache HTTP’s configuration files (including any included files).

For more info on mod_jk configuration options, please seehttp://tomcat.apache.org/connectors-doc/

Note that you can also JkMount in URL-contexts like <Virtualhost> and <Location>. For example, you can replace JkMount /jkstatus jkstatus with:

<Location /jkstatus/>

JkMount jkstatus

Order deny,allow

Deny from all

Allow from 127.0.0.1

</Location>

For indepth understanding on JBoss click on:

Summary
Review Date
Reviewed Item
Installing and configuring mod_jk in JBoss
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Installing and configuring mod_jk in JBoss"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.