commit 0a6d3750f9ce10444b8497667310158ed8a23671
Author: Elan Ruusamäe <[email protected]>
Date:   Mon May 30 11:26:30 2016 +0300

    replace config with sample that works out of the box

 haproxy.cfg | 112 ++++++++++++++++++++++--------------------------------------
 1 file changed, 40 insertions(+), 72 deletions(-)
---
diff --git a/haproxy.cfg b/haproxy.cfg
index 5b26ff2..53aac43 100644
--- a/haproxy.cfg
+++ b/haproxy.cfg
@@ -1,80 +1,48 @@
-# this config needs haproxy-1.1.28 or haproxy-1.2.1
+# Config for Haproxy listening on 127.0.0.1:8080 and forwarding all requests 
to 127.0.0.1:80
 
 global
-       log 127.0.0.1   local0
-       log 127.0.0.1   local1 notice
-       #log loghost    local0 info
-       maxconn 4096
+       log 127.0.0.1 local0
+       maxconn 8192
        chroot /usr/share/empty
        uid 185
        gid 185
        daemon
-       #debug
-       #quiet
 
-defaults
-       log     global
-       mode    http
-       option  httplog
-       option  dontlognull
-       retries 3
-       redispatch
-       maxconn 2000
-       contimeout      5000
-       clitimeout      50000
-       srvtimeout      50000
-
-listen appli1-rewrite 0.0.0.0:10001
-       cookie  SERVERID rewrite
-       balance roundrobin
-       server  app1_1 192.168.34.23:8080 cookie app1inst1 check inter 2000 
rise 2 fall 5
-       server  app1_2 192.168.34.32:8080 cookie app1inst2 check inter 2000 
rise 2 fall 5
-       server  app1_3 192.168.34.27:8080 cookie app1inst3 check inter 2000 
rise 2 fall 5
-       server  app1_4 192.168.34.42:8080 cookie app1inst4 check inter 2000 
rise 2 fall 5
-
-listen appli2-insert 0.0.0.0:10002
-       option  httpchk
-       balance roundrobin
-       cookie  SERVERID insert indirect nocache
-       server  inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
-       server  inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
-       capture cookie vgnvisitor= len 32
-
-       option  httpclose               # disable keep-alive
-       rspidel ^Set-cookie:\ IP=       # do not let this cookie tell our 
internal IP address
-       
-listen appli3-relais 0.0.0.0:10003
-       dispatch 192.168.135.17:80
-
-listen appli4-backup 0.0.0.0:10004
-       option  httpchk /index.html
-       option  persist
-       balance roundrobin
-       server  inst1 192.168.114.56:80 check inter 2000 fall 3
-       server  inst2 192.168.114.56:81 check inter 2000 fall 3 backup
-
-listen ssl-relay 0.0.0.0:8443
-       option  ssl-hello-chk
-       balance source
-       server  inst1 192.168.110.56:443 check inter 2000 fall 3
-       server  inst2 192.168.110.57:443 check inter 2000 fall 3
-       server  back1 192.168.120.58:443 backup
-
-listen appli5-backup 0.0.0.0:10005
-       option  httpchk *
-       balance roundrobin
-       cookie  SERVERID insert indirect nocache
-       server  inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
-       server  inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
-       server  inst3 192.168.114.57:80 backup check inter 2000 fall 3
-       capture cookie ASPSESSION len 32
-       srvtimeout      20000
-
-       option  httpclose               # disable keep-alive
-       option  checkcache              # block response if set-cookie & 
cacheable
-
-       rspidel ^Set-cookie:\ IP=       # do not let this cookie tell our 
internal IP address
-       
-       errorloc        502     http://192.168.114.58/error502.html
-#      errorfile       503     /etc/haproxy/errors/503.http
+       stats socket /var/run/haproxy.stat mode 644 level admin
+       # Wait up to 2 minutes for input
+       stats timeout 2m
 
+defaults
+       log global
+       mode http
+       option httplog
+       option dontlognull
+       option dontlog-normal
+       option forwardfor
+       option redispatch
+       option http-server-close
+       option http-ignore-probes
+       http-reuse always
+       retries 3
+       maxconn 8192
+
+       timeout connect 5000
+       timeout client 5000
+       timeout server 10s
+       timeout http-request 2000
+
+       balance leastconn
+
+listen statistics
+       description HAProxy statistics listener
+       bind 127.0.0.1:8778
+       mode http
+       stats enable
+       stats show-desc HAProxy Status
+       stats uri /haproxy-stats/
+
+listen default
+       description Default listener
+       bind 127.0.0.1:8080
+       balance roundrobin
+       server default 127.0.0.1:80 check inter 2000 rise 2 fall 5
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/haproxy.git/commitdiff/0a6d3750f9ce10444b8497667310158ed8a23671

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to