Account Links: Cart | Register | Log In

Skip to content

Red Hat Knowledgebase
Red Hat Knowledgebase Search
Currently Being Moderated

Is there an alternative to mod_jk that is provided in the base Red Hat Enterprise Linux 5 channel?

Article ID: 10057 - Created on: Jan 8, 2008 6:00 PM - Last Modified:  Apr 6, 2009 12:35 PM

Release Found: Red Hat Enterprise Linux 5

 

Problem

 

The module mod_jk is currently included as part of the Application Stack channel and is not available in the base Red Hat Enterprise Linux channel. This is an issue when there is a requirement to connect httpd and the back end server using the AJP protocol, and an Application Stack entitlement is not a possibility.

 

Assumptions

  • You have Red Hat Enterprise Linux 5 installed.

  • You do not have an Application Stack subscription.

  • There is a requirement to connect httpd and the back end server using the AJP protocol.

 

Solution

 

The httpd package provides a module by the name mod_proxy_ajp that can be used to connect httpd and the back end server using the AJP protocol.

 

The mod_proxy_ajp configuration file is located at /etc/httpd/conf.d/proxy_ajp.conf. Edit this configuration file according to the needs of the environment.

 

Examples

 

Example 1: Forward all requests to the /examples/ context to a single Tomcat back end serving the Tomcat jsp examples:


ProxyPass /examples/ ajp://localhost:8009/jsp-examples/

 

Example 2: Forward all requests to the /jmx-console/ context and jsp pages under the /myapp/ context to two JBoss back ends with equal load balancing weight.


<Proxy balancer://mycluster>
  BalancerMember ajp://192.168.1.2:8009 route=node1 loadfactor=1 ping=10 ttl=600
  BalancerMember ajp://192.168.1.3:8009 route=node2 loadfactor=1 ping=10 ttl=600
</Proxy>

ProxyTimeout 10
ProxyStatus On

ProxyPass /jmx-console balancer://mycluster/jmx-console stickysession=JSESSIONID timeout=10
ProxyPassMatch ^/myapp/(.*.jsp) balancer://mycluster/myapp/$1 stickysession=JSESSIONID timeout=10

ProxyPassReverse / ajp://192.168.1.2:8009/
ProxyPassReverse / ajp://192.168.1.3:8009/

 

References

[1] How do I migrate from Apache mod_jk to mod_proxy_ajp or mod_proxy_http using JBoss Server?.

 

 

 

Feedback from users like yourself is a critical factor in helping us make the Red Hat Knowledgebase as useful as possible.

More Like This

  • Retrieving data ...