Need some clarifications. Have been running out of time. Help greatly appreciated!
I have an enterprise application (.ear) deployed on Jboss AS 6.1.0 Final which we access using HTTPS only.
We have a requirement now to move it to a load balanced setup. We will have 3 jboss instances load balanced using mod_cluster. Please note that its a non clustered setup.
This is where we have arrived so far:-
The Setup :-
We have put a httpd(with all required mod_cluster imports from the mod_cluster guide) as a load balancer in front of the jboss. Trying with just one worker node first.
The mod cluster manager shows up the jboss instance that gets registered. So that configuration is done and fine.
I want the worker and httpd to use AJP; which i have configured to communicate on port 8009 and i can see that it recognizes this port in mod cluster manager.
I see all the web app contexts from my ear in mod cluster manager.
I can access the mod_cluster_manager on the URL http://<MyHostIP>:6666/mod_cluster_manager.
In the apache_access.log i see that its a redirect request[HTTP 302 on hitting the app]; and browser directly contacts the 'myapp' on Jboss instance instead of going through the httpd load balancer. Atleast that's what i am thinking. Correct me if i am wrong here. My understanding is that all requests always have to pass the through the load balancer; and we have to hit port 8000/6666 to access the app on the load balancer and its the load balancer that decides which jboss instance to pass the request to.
I want to avoid this redirect to the jboss instance. I assume once i access the app through the load balancer; the mod_cluster manager page shows what are the active sessions
and the session id. I do not see this on the mod cluster page. This number is always zero for me.
This is how my httpd.conf looks:-
<IfModule manager_module> Listen IP:6666 ManagerBalancerName mycluster <VirtualHost IP:6666> <Location /> Order deny,allow Deny from all Allow from IP </Location> KeepAliveTimeout 300 MaxKeepAliveRequests 0 #ServerAdvertise on http://IP:6666 AdvertiseFrequency 5 #AdvertiseSecurityKey secret #AdvertiseGroup 126.96.36.199:23364 EnableMCPMReceive AllowDisplay On <Location /mod_cluster_manager> SetHandler mod_cluster-manager Order deny,allow Deny from all Allow from IP </Location> #ProxyPass / balancer://mycluster stickysession=SESSION_ID #ProxyPassReverse / balancer://mycluster #ProxyPass /myapp https://hostIP:443/myapp #ProxyPassReverse /myapp https://hostIP:443/myapp ProxyPass /myapp ajp://hostIP:8009/myapp #ProxyPassReverse https://hostIP </VirtualHost> </IfModule>
I have tried with all the commented proxy pass directives but did not help.
In short what i want to achieve is trying to access an https application through mod_cluster load balancer; using AJP as a communication protocol between the Jboss worker node and mod cluster load balancer. What configuration do i need to have on both httpd/mod_cluster and jboss for this.
Is there a need to setup SSL between httpd and jboss instance even though i want to use AJP between balancer and worker?
Please let me know if you need any more info. I am running out of time on this. Any inputs on this will be greatly helpful.