iprog.com

apache, mod_proxy_balancer, and mongrel

a brief hint about setting up apache 2.2’s mod_proxy_balancer with a mongrel cluster.

if you receive a permission error, “client denied by server configuration” when accessing your apache install, check the proxy configuration. in this case that means the proxy balancer configuration. an example working config:

1<Proxy balancer://mongrel_cluster>
2  BalancerMember http://127.0.0.1:8000
3  BalancerMember http://127.0.0.1:8001
4  Order deny,allow
5  Deny from all
6  Allow from all
7</Proxy>

the key is the last 3 lines, Order…, Deny…, and Allow….

this usually comes from a more general proxy permissions config:

1<Proxy *>
2  Order deny,allow
3  Deny from all
4</Proxy>

this protects against other kinds of proxy support in apache being publicly accessible, and is a good thing. so leave that in place, and just specifically allow access to the balancer proxy.

tags: mod_proxy_balancer, apache, mongrel