Created
May 26, 2015 21:12
-
-
Save johnfitzpatrick/8a59a3251e976cf9a716 to your computer and use it in GitHub Desktop.
haproxy.cfg.erb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
#log loghost local0 info | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
stats socket /var/run/haproxy.sock user haproxy group haproxy | |
defaults | |
log global | |
mode http | |
retries 3 | |
timeout client 50s | |
timeout connect 5s | |
timeout server 50s | |
option dontlognull | |
option httplog | |
option redispatch | |
balance roundrobin | |
frontend http | |
maxconn 2000 | |
bind 0.0.0.0:80 | |
default_backend servers-http | |
backend servers-http | |
mode http | |
<% @pool_members.each do |member| -%> | |
server <%= member[:hostname] %> <%= member[:ipaddress] %>:<%= node["myapache"]["port"] %> weight 1 maxconn 1 check | |
<% end -%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment