date: 2013-06-06 08:23:17+00:00

mod_proxy_balancer on RHEL6

categories: tags: Apache tags: Linux tags: Red Hat/CentOS

Tested on RHEL 6. This is the simplest setup possible, for my own reference. I may come up with a Salt state in the future.

Reference : http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html

/etc/httpd/conf.d/balancer-manager.conf : `

SetHandler balancer-manager

Order Deny,Allow

Deny from all

Allow from 192.168.0.0/24

`

/etc/httpd/conf.d/vhost.conf :

`

        ServerAdmin someadmin@example.org

        ServerName xyz.example.org

       

                BalancerMember http://backend01.example.org:80

                BalancerMember http://backend02.example.org:80

       

        ProxyPass /balancer-manager !

        ProxyPass / balancer://xyz_example_org

`

Access the cluster through http://xyz.example.org

Manager the cluster through http://xyz.example.org/balancer-manager (as we prevent the path from being 'reverse proxied')