Monday, January 21, 2008

Configure Apache2 and jboss-4.2.2.GA

My company decided to host our site on an Apache2 www server (finally!). So setting up Apache was no prob. As part of the solution we want Apache 2 to forward request to Jboss so I installed mod_jk to accomplish this.

There is a nice Jboss setup guide, which is part of the official documentation here . Our configuration does not need load balancing so there is a good hint on section "17.4. Configure worker nodes in mod_jk", which states:

A non-loadbalanced setup with a single node requires a worker.list=node1 entry.

So if you follow all the steps described in that guide, you should only do the following changes for a single node request forwarding:

mod-jk.conf:

# Mount your applications
JkMount /application/* node1

workers.properties (you can comment everything else so if looks like this. I'm testing on my laptop so I'm using localhost, change appropiately):

worker.list=node1

# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=localhost
worker.node1.type=ajp13
worker.node1.lbfactor=1

uriworkermap.properties:

# Simple worker configuration file

# Mount the Servlet context to the ajp13 worker
/jmx-console=node1
/jmx-console/*=node1
/web-console=node1
/web-console/*=node1

That's it go to http://localhost/web-console/ and if it displays it you are done. Hope this post was helpful :)

3 comments:

Anonymous said...

mod_jk is deprecated with Apache2 so did you try using the newer proxy modules. I am trying to get that working with Jboss and yet to figure it out

Anonymous said...

Cop this:

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /jira http://localhost:6181/jira
ProxyPreserveHost On

mens ed pills said...

I visited various websites but the audio quality for audio songs current at this web site is truly marvelous.