Allow mod_proxy_balancer optionally

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
Patrick Uiterwijk 2017-10-10 17:06:55 +02:00
parent 08c115698a
commit 3233cc1388

View file

@ -17,5 +17,14 @@ RequestHeader unset Expect early
ProxyPreserveHost On
{% endif %}
{% if balancer_name is defined %}
<Proxy "balancer://{{balancer_name}}">
{% for member in balancer_members %}
BalancerMember "{{ member }}/{{remotepath}}"
{% endfor %}
</Proxy>
ProxyPass {{ localpath }} "balancer://{{balancer_name}}"
{% elif %}
ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}}
{% endif %}
ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}}