Apache负载平衡代理旁路不起作用

我一直在使用Apache作为美洲狮应用服务器(RoR)的反向代理。 这些资产都在一个名为资产的子目录中,并且像下面这样向apacheconfiguration添加了一行:

<Location /assets> ProxyPass ! </Location> 

这工作得很好,静态的东西是由阿帕奇服务的,其他一切都代理到美洲狮。 不过,我想实现负载平衡,所以我添加了以下几行到configuration:

 <Proxy balancer://mycluster> BalancerMember http://localhost:9292 BalancerMember http://192.168.1.2:9292 </Proxy> 

并设置代理通过和代理通过反向指令到这

 ProxyPass / balancer://mycluster lbmethod=byrequests ProxyPassReverse / balancer://mycluster 

现在资产目录不起作用,当浏览器尝试获取目录中的任何文件时,我得到一个500错误。 在服务器错误日志中,popup以下行:

  [Wed Aug 28 15:31:52 2013] [warn] proxy: No protocol handler was valid for the URL /assets/application-c713b532d29cd16b1e8d99df39489e72.css. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule. 

任何人都可以提出为什么我的configuration不再有效? 完整的configuration在这里

– 编辑 –

实际上唯一可行的path是根path,以前没有任何代理服务器可以工作。

我会使用ProxyPassMatch指令来更好地控制:

 ProxyPassMatch ^/assets/.*$ ! ProxyPassMatch ^/(.*)$ balancer://mycluster/$1 lbmethod=byrequests ProxyPassReverse / balancer://mycluster <Proxy balancer://mycluster> BalancerMember http://localhost:9292 BalancerMember http://192.168.1.2:9292 </Proxy> 

因为这些指令是按照它们出现的顺序进行评估的,所以assets目录不应该被代理,而其余的URL将使用平衡器。