-
Notifications
You must be signed in to change notification settings - Fork 10
/
apache.example.conf
43 lines (35 loc) · 1.64 KB
/
apache.example.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
41
42
43
# a2enmod lbmethod_byrequests proxy proxy_balancer proxy_http ssl
<VirtualHost *:80>
ProxyRequests off
ServerName politicosapi.localdomain
<Proxy balancer://mycluster>
BalancerMember http://localhost:8000
BalancerMember http://localhost:8001
BalancerMember http://localhost:8002
BalancerMember http://localhost:8003
# Security "technically we aren't blocking anyone but this is
# the place to make those changes.
Require all granted
# In this example all requests are allowed.
# Load Balancer Settings
# We will be configuring a simple Round Robin style load
# balancer. This means that all webheads take an equal share
# of of the load.
ProxySet lbmethod=byrequests
</Proxy>
# balancer-manager
# This tool is built into the mod_proxy_balancer module and will allow
# you to do some simple modifications to the balanced group via a gui
# web interface.
<Location /balancer-manager>
SetHandler balancer-manager
# I recommend locking this one down to your your office
Require host politicosapi.localdomain
</Location>
# Point of Balance
# This setting will allow to explicitly name the the location in the
# site that we want to be balanced, in this example we will balance "/"
# or everything in the site.
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/
</VirtualHost>