summaryrefslogtreecommitdiff
path: root/spec/fixtures/haproxy.cfg
blob: b5cec9b9d14351466483cb003662a85fc0f0ed8b (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
global
  chroot /var/lib/haproxy
  ca-base ./tmp
  crt-base ./tmp
  tune.ssl.default-dh-param 4096
  log stdout format raw local0 debug

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

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

  acl cargo-backend ssl_fc_sni cargo.test
  acl composer-backend ssl_fc_sni composer.test
  acl goproxy-backend ssl_fc_sni goproxy.test
  acl maven-backend ssl_fc_sni maven.test
  acl npm-backend ssl_fc_sni npm.test
  acl nuget-backend ssl_fc_sni nuget.test
  acl pypi-backend ssl_fc_sni pypi.test
  acl rubygems-backend ssl_fc_sni rubygems.test

  http-request replace-header Host .* api.nuget.org if nuget-backend
  http-request replace-header Host .* github.com if cargo-backend
  http-request replace-header Host .* packagist.org if composer-backend
  http-request replace-header Host .* proxy.golang.org if goproxy-backend
  http-request replace-header Host .* pypi.org if pypi-backend
  http-request replace-header Host .* registry.npmjs.org if npm-backend
  http-request replace-header Host .* repo1.maven.org if maven-backend
  http-request replace-header Host .* rubygems.org if rubygems-backend

  use_backend cargo-backend if cargo-backend
  use_backend composer-backend if composer-backend
  use_backend goproxy-backend if goproxy-backend
  use_backend maven-backend if maven-backend
  use_backend npm-backend if npm-backend
  use_backend nuget-backend if nuget-backend
  use_backend pypi-backend if pypi-backend
  use_backend rubygems-backend if rubygems-backend

backend cargo-backend
  server www1 github.com:443 ssl verify none

backend composer-backend
  server www1 packagist.org:443 ssl verify none

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

backend maven-backend
  server www1 repo1.maven.org:443 ssl verify none

backend npm-backend
  server www1 registry.npmjs.org:443 ssl verify none

backend nuget-backend
  server www1 api.nuget.org:443 ssl verify none

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

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