Note that exim contains tracker-specific configuration
[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         option  forwardfor
31         timeout connect 5000
32         timeout client  50000
33         timeout server  50000
34         errorfile 400 /etc/haproxy/errors/400.http
35         errorfile 403 /etc/haproxy/errors/403.http
36         errorfile 408 /etc/haproxy/errors/408.http
37         errorfile 500 /etc/haproxy/errors/500.http
38         errorfile 502 /etc/haproxy/errors/502.http
39         errorfile 503 /etc/haproxy/errors/503.http
40         errorfile 504 /etc/haproxy/errors/504.http
41
42
43 #frontend front
44 #       bind :::80 v4v6 tfo
45 #       redirect scheme https code 301 if !{ ssl_fc }
46
47 frontend front_ssl
48         bind :::443 v4v6 tfo ssl crt /etc/ssl/private/snapshot.debian.org.key-certchain
49
50         default_backend backend
51
52         option http-keep-alive
53         # We rate-limit requests by clients.
54         #  Currently, we do that at the netfilter level, so one
55         #  request per connection works best.
56         option httpclose
57         #option redispatch
58
59 backend backend
60         # a http backend
61         mode http
62         option http-keep-alive
63
64         timeout http-keep-alive 15s
65
66         server varnish 127.0.0.1:6081
67
68         http-response set-header Strict-Transport-Security "max-age=15768000; preload"
69         #http-response del-header Server