--- /dev/null
+# Pazpar2 load-balancing example using mod_proxy_load_balancer
+# ==============================================================================
+# This example uses pazpar2's serverIDs as the load-balancing routes
+# to keep pazpar2 sessions sticky.
+# Pazpar2 serverID can be set in the pazpar2's server config file (server.xml)
+# by placing an ID attribute on the 'server' element:
+# <server id="myserver">..</server>
+<VirtualHost *:80>
+ ServerName satay.index
+ ServerAlias satay
+
+ LogLevel debug
+ CustomLog /var/log/apache2/pz2-lb-access.log combined
+ ErrorLog /var/log/apache2/pz2-lb-error.log
+
+ <Proxy *>
+ AddDefaultCharset off
+ Order deny,allow
+ Allow from all
+ </Proxy>
+ ProxyVia Off
+
+ # 'route' has to match the configured pazpar2 server ID
+ <Proxy balancer://pz2cluster>
+ BalancerMember http://localhost:8004 route=metasearch1
+ BalancerMember http://localhost:8005 route=metasearch2
+ BalancerMember http://localhost:8006 route=metasearch3
+ BalancerMember http://localhost:8007 route=metasearch4
+ </Proxy>
+
+ # route is resent in the 'session' param which has the form:
+ # 'sessid.serverid', understandable by the mod_proxy_load_balancer
+ # this is not going to work if the client tampers with the 'session' param
+ ProxyPass /pazpar2/search.pz2 balancer://pz2cluster lbmethod=byrequests stickysession=session nofailover=On
+
+ # load balancer manager & statistic - for developing and testing only
+ <Location /balancer-manager>
+ SetHandler balancer-manager
+ Order Deny,Allow
+ Deny from all
+ </Location>
+
+</VirtualHost>