Forum LAMS for Tech-Heads - General Forum: Re: What does mod_jk accomplish?


 
Search: 

2: Re: What does mod_jk accomplish?
In response to 1 07/30/09 08:55 PM
[ Reply | Forward ]
Tomcat/jboss serves content via the HTTP protocol on port 8080 by default, it also can serve the same content via the AJP protocol (port 8009 by default). AJP is used for passing through to other front end web servers, and not end users.

With Apache, once you have the mod installed, you can configure certain URLs to be served by an AJP worker. i.e.:

JkMount /lams* lams-port-8009-worker

This directive says everything on port 80 with a request of /lams* will be sent to lams' AJP port on 8009. Effectively the user is accessing http://yourdomain.com/lams, but lams is only listening on port 8009 (you can still listen on port 8080, but that would be optional now).

Other paths like /moodle or /elgg would continue to be served by Apache.

Does this help? We use Apache + mod_jk a lot. An alternative is mod_proxy if that's what you're familiar with.

Posted by Jun-Dir Liew

3: Re: Re: What does mod_jk accomplish?
In response to 2 07/31/09 05:47 AM
[ Reply | Forward ]
I got this working by putting the JkMount directive inside the <VirtualHost> configuation. I also found some instructions for using mod_jk with Jboss that directed me to change some of the jboss configuration files.

It seems to work so I don't know exactly what the jboss config is doing of if its necessary.

http://www.jboss.org/community/wiki/UsingModjk12WithJBoss

Hopefully this information will helps someone else.

Posted by Dave Bauer

4: Re: Re: Re: What does mod_jk accomplish?
In response to 3 08/03/09 06:18 PM
[ Reply | Forward ]
Cool! The jboss config side of it is necessary if you're load balancing multiple tomcat/jboss, otherwise I don't think it's necessary.

Posted by Jun-Dir Liew

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum