forked from kaltura/platform-install-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache_balancer.conf
41 lines (31 loc) · 1.38 KB
/
apache_balancer.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# this uses the proxy_balancer_module, proxy_module Apache modules to setup a simple load balancer.
# replace balancer.domain.org with the desired hostname for the balanacer, node0.domain.org with the first node's hostname and node1.domain.org with the second node's hostname.
# port in this example is 80, replace with the one you wish to use.
Listen 80
<VirtualHost balancer.domain.org:80>
ServerName balancer.domain.org
ErrorLog logs/balancer.domain.org-http-error_log
CustomLog logs/balancer.domain.org-http-access_log combined
DocumentRoot /var/empty
SSLProxyEngine On
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /balancer-manager !
ProxyPass / balancer://balancer.domain.org/ stickysession=BALANCEID nofailover=On
ProxyPassReverse / http://node0.domain.org route=node0
ProxyPassReverse / http://node1.domain.org route=node1
<Proxy balancer://balancer.domain.org>
BalancerMember http://node0.domain.org route=node0
BalancerMember http://node1.domain.org route=node1
ProxySet lbmethod=byrequests
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
</Location>
<Directory "/var/empty">
AllowOverride AuthConfig
</Directory>
</VirtualHost>