Forum Moderators: phranque

Message Too Old, No Replies

Apache load balancing with latest mod proxy html with YUI Ajax Framewo

load balance mod_proxy_html ajax issue

         

nsukul

9:06 am on Jan 6, 2009 (gmt 0)

10+ Year Member



Hi All,

I am facing problems configuring mod_proxy_html in this scenario:

Configuration: two amazon instances:

Instance 1:
Apache Server 1 (Load balancer) IP:#*$!#*$!.66 only balancer manager

Apache Child 1 + PHP +YUI Ajax Framework IP:#*$!#*$!.66:4002 with documentroot with all code

Instance 2:

Apache Child 2+ PHP+YUI Ajax Framework.IP:#*$!#*$!76 with document root with all code

When we configured the load balancer using mod_proxy, the failover scenario works well :).

my URL always points to the #*$!#*$!.66/
in case of YUI ajax framework it is #*$!xx.66/xyz

As a failover scenario if Child 1(#*$!xx.66:4002) is stopped the load balancer succesfully redirects to Child 2(#*$!xx.76), but the URLs also gets changed! to #*$!xx.76.
This is overcome by using mod_proxy_html, but
though my main website URL #*$!#*$!.66/ works fine
YUI ajax framework it is #*$!xx.66/xyz gives Js errors!

i tried lots of configuration changing options but nothing worked.

my configuration settings is for apache server1 (load balancer) is:

ProxyRequests Off
Include /usr/local/apache3/conf/proxy_html.conf

SetOutputFilter proxy-html
#ProxyHTMLDoctype XHTML Legacy
ProxyHTMLLinks option value
#ProxyHTMLCharsetOut iso-8859-1
ProxyHTMLExtended On
ProxyPreserveHost On

<Proxy balancer://mycluster>
BalancerMember [xx.xx.xx.66:4002...] retry=10 loadfactor=1
BalancerMember [xx.xx.xx76...] retry=10 loadfactor=1
</Proxy>

ProxyPassReverse / [xx.xx.xx.66:4002...]
ProxyPassReverse / [xx.xx.xx76...]
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/ stickysession=BALANCEID nofailover=On

ProxyHTMLURLMap [xx.xx.xx.66:4002...] [xx.xx.xx.66...]
ProxyHTMLURLMap [xx.xx.xx76...] [xx.xx.xx.66...]

<Location /balancer-manager>
SetHandler balancer-manager
</Location>

Please help me out.

Caterham

7:39 pm on Jan 6, 2009 (gmt 0)

10+ Year Member



YUI ajax framework it is #*$!xx.66/xyz gives Js errors!

And all URLs which are eventually present in your js code are replaced correctly by mod_proxy_html?