1
# this config needs haproxy-1.1.28 or haproxy-1.2.1
5
log 127.0.0.1 local1 notice
6
#log loghost local0 info
8
#chroot /usr/share/haproxy
9
stats socket /var/run/haproxy.sock
31
listen nova-api 0.0.0.0:8773
32
option httpchk GET / HTTP/1.0\r\nHost:\ example.com
34
reqidel ^X-Forwarded-For:.*
36
<% api_servers.to_i.times do |offset| %><% port = api_base_port.to_i + offset -%>
37
server api_<%= port %> 127.0.0.1:<%= port %> maxconn 1 check
39
option httpclose # disable keep-alive