HI
Ya this problem comes when we use mod_proxy_http instead we should use mod_proxy_ajp module.
How to :
This is your previous configuration
<Proxy balancer://ebsCluster>
ProxyPass
/ balancer://ebsCluster/
Just replace it by
Note here we are using ajp protocol for sending request from apache to weblogic. So enable ajp protocol connector in you weblogic backend. Then use following configuration :- (make sure mod_proxy_ajp must be loaded in apache)
<Proxy balancer://ebsCluster>
ProxyPass
/ balancer://ebsCluster/
If you use ajp protocol instead of http for connecting apache to web logic it would be less expensive. Because whatever header sent by ajp are shorter then http. But still you want to you http then please let me know other wise this is better option. Ok bye Thanks Narendra
-----Original Message-----
Hello,
I am facing an issue when using mod_proxy to load balance to my backend servers. Issue arises when the backend Weblogic server sends a a redirect response back, which results in the backend server ip being passed on page location. I will explain further with an example.
Apache 2.2 Server: example.com Backend Server: http://10.25.9.192:10010
I request http://example.com/ which is proxied to http://10.25.9.192:10010/ weblogic.com then access index.jsp which sends a redirect to
My index.jsp contains the following "<% response.sendRedirect("page1.xhtml"); %>"
Now my browser is redirected to http://10.25.9.192:10010/page1.xhtml instead of being redirected with the apache proxy http://example.com/page1.xhtml
Header add Set-Cookie "APACHEBALANCE=balancer.%{BALANCER_WORKER_ROUTE}e; path=/;" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://ebsCluster>
ProxyPass
/ balancer://ebsCluster/
If I use ProxyPass without the balancer I do not get the same problem ProxyPass
/ http://10.25.9.192:10010/ With the above the browser is redirect to http://example.com/page1.xhtml
Any ideas or ways I could work around this?
Thanks! Justin
|