5534a4ee045b7bbe10021978ca497d538e97810e
[mirror/dsa-puppet.git] / modules / roles / templates / snapshot / haproxy.cfg.erb
1 global
2         log /dev/log    local0
3         log /dev/log    local1 notice
4         chroot /var/lib/haproxy
5         stats socket /run/haproxy/admin.sock mode 660 level admin
6         stats socket /run/haproxy/user.sock mode 660 level user group munin
7         stats timeout 30s
8         user haproxy
9         group haproxy
10         daemon
11         nbproc  2
12
13         # Default SSL material locations
14         ca-base /etc/ssl/certs
15         crt-base /etc/ssl/private
16
17         # Default ciphers to use on SSL-enabled listening sockets.
18         # For more information, see ciphers(1SSL). This list is from:
19         #  https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
20         ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
21         ssl-default-bind-options no-sslv3
22
23         maxconn 8192
24
25 defaults
26         log     global
27         mode    http
28         option  httplog
29         option  dontlognull
30         timeout connect 5000
31         timeout client  50000
32         timeout server  50000
33         errorfile 400 /etc/haproxy/errors/400.http
34         errorfile 403 /etc/haproxy/errors/403.http
35         errorfile 408 /etc/haproxy/errors/408.http
36         errorfile 500 /etc/haproxy/errors/500.http
37         errorfile 502 /etc/haproxy/errors/502.http
38         errorfile 503 /etc/haproxy/errors/503.http
39         errorfile 504 /etc/haproxy/errors/504.http
40
41
42 #frontend front
43 #       bind :::80 v4v6 tfo
44 #       redirect scheme https code 301 if !{ ssl_fc }
45
46 frontend front_ssl
47         bind :::443 v4v6 tfo ssl crt /etc/ssl/private/snapshot.debian.org.key-certchain
48
49         default_backend backend
50
51         option http-keep-alive
52         #option redispatch
53
54 backend backend
55         # a http backend
56         mode http
57         option http-keep-alive
58
59         timeout http-keep-alive 15s
60
61         server varnish 127.0.0.1:6081
62
63         #http-response set-header Strict-Transport-Security "max-age=15768000; preload"
64         #http-response del-header Server