开发者

jQuery get() returns blank on clustered web site, mod_proxy_balancer error?

I have an jQuery application that works fine on a single-node web server, but breaks when I run it on a testing cluster server (Apache mod_proxy_balancer). The code is this:

$.get("/file/foo.xml", function(xml) {
    alert(xml);
}

Clustering configuration is:

<Proxy balancer://mycluster>
    BalancerMember http:// 10.32.4.37:90
    BalancerMember http:// 10.32.4.57:90
</Proxy>
#ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid
ProxyPass / balancer://mycluster/

The test load balancer (Apache) is running on 10.32.4.37:80. If I go to 10.32.4.37:90 or 10.32开发者_StackOverflow社区.4.37:90 it works fine... but if I go to 10.32.4.37:80 it breaks. The value for "xml" is always blank. What's odd is that it works fine on IE 6, but not Firefox 3.6.8. I tried on several boxes...

I'm wondering if the get call failed because it thinks its a cross-domain load... which technically it is... but shouldn't this kind of call be OK?

Is there some Apache voodoo I can use to make this work?


Fixed it...

The problem was that I was doing a URL re-writing for "/file/foo.xml", I had the mod_rewrite proxy directives on the two back-end web servers, but I did not have it on the front-end load balancer.

Naturally, the URL rewriting belongs in the front-end server, so you only have to configure one server... but you'd think that this would be OK either way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜