summaryrefslogtreecommitdiff
path: root/spec/fixtures/haproxy.cfg
blob: 1f9842117650aa0ef19115ac87b830a2ec7c78ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
global
  chroot /var/lib/haproxy
  ca-base ./tmp
  crt-base ./tmp
  tune.ssl.default-dh-param 4096

defaults
  log global
  mode http
  retries 1
  timeout http-request    10s
  timeout queue           1s
  timeout connect         1s
  timeout client          1s
  timeout server          1s
  timeout http-keep-alive 1s
  timeout check           10s
  maxconn 32

frontend www-https
  bind *:443 ssl crt wildcard.test.pem

  acl rubygems-backend ssl_fc_sni rubygems.test
  acl goproxy-backend ssl_fc_sni goproxy.test

  http-request replace-header Host .* rubygems.org if rubygems-backend
  http-request replace-header Host .* proxy.golang.org if goproxy-backend

  use_backend rubygems-backend if rubygems-backend
  use_backend goproxy-backend if goproxy-backend

backend goproxy-backend
  server www1 proxy.golang.org:443 ssl verify none

backend rubygems-backend
  server www1 rubygems.org:443 ssl verify none