====== mod_proxy_ajp ====== There is no additional modules require to load balance jboss.\\ But we had some old services require it and we down to road for mod_proxy_ajp.\\ alternatively you can choose [[http://www.jboss.org/mod_cluster | mod_cluster]].\\ ==== Documentation ==== [[http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html | mod_proxy_ajp]] ==== quick explanation / observation ==== This module does not monitor services.\\ But it does checking before service request if it fails it fall back to next node.\\ === = === Sticky session can be used by setting variable name to stickysession there is many way to define it.\\ but result will be same.\\ stickysession=JSESSIONID === = === **Keep in Mind**\\ BalancerMember is AJP connector so you need to use AJP connector port number. === = === Balancer Manager is a satus page just like info-page or status-page from mod_status.\\ /balancer-manager === = === If you receive error as shown below. [error] (70014)End of file found: ajp_ilink_receive() can't receive header [error] ajp_read_header: ajp_ilink_receive failed [error] (120006)APR does not understand this error code: proxy: read response failed from (null) (localhost) Mostly likely you need to set packet size on jboss. **packetSize="20000"** ==== My Configuration ==== LoadModule proxy_ajp_module modules/mod_proxy_ajp.so # # When loaded, the mod_proxy_ajp module adds support for # proxying to an AJP/1.3 backend server (such as Tomcat). # To proxy to an AJP backend, use the "ajp://" URI scheme; # Tomcat is configured to listen on port 8009 for AJP requests # by default. # # # Uncomment the following lines to serve the ROOT webapp # under the /tomcat/ location, and the jsp-examples webapp # under the /examples/ location. # #ProxyPass /tomcat/ ajp://localhost:8009/ #ProxyPass /examples/ ajp://localhost:8009/jsp-examples/ ServerName linux4 Order deny,allow Allow from all BalancerMember ajp://localhost:8009/Untitled1 route=node1 BalancerMember ajp://localhost:8010/Untitled1 route=node2 ProxySet maxattempts=1 ProxySet stickysession=JSESSIONID ProxySet timeout=300 ProxyIOBufferSize 19000 LimitRequestFieldsize 18000 ProxyTimeout 300 ProxyStatus Full ProxyPass /Untitled1 balancer://cluster/ #ProxyPassReverse /Untitled1 http://linux4/Untitled1 SetHandler balancer-manager Order Deny,Allow Deny from all Allow from localhost Allow from 10.0.0.0/4