source: ror-farm/haproxy/haproxy.cfg.tmpl @ 370

Last change on this file since 370 was 370, checked in by lucas, 11 years ago

ror-build-haproxy: default backend is hostname, since haproxy runs on the root server hosting the admin rorette

File size: 945 bytes
Line 
1# Auto-generated by ror-build-haproxy
2# Date: { $now }
3
4global
5    log /dev/log   local0
6    maxconn 4096
7    user    haproxy
8    group   haproxy
9    daemon
10
11defaults
12    mode        http
13    option      httplog
14    log         global
15    option      httpclose
16    retries     5
17    option      redispatch
18    no option   persist
19    balance     roundrobin
20    maxconn     2000
21    contimeout  5000
22    clitimeout  30000
23    srvtimeout  30000
24
25## Begin vhosts list
26frontend  http_proxy
27    bind  *:80
28{
29foreach my $server (sort keys %rorettes) {
30  foreach my $rorette (@{$rorettes{$server}}) {
31  $OUT .= <<EOF;
32    acl          $rorette  hdr(Host) -i $rorette.ror.bearstech.com
33    use_backend  $server if $rorette
34EOF
35  }
36}
37}
38    default_backend $default_backend
39## End vhosts list
40
41## Begin server list
42{
43foreach my $server (sort keys %rorettes) {
44  $OUT .= <<EOF;
45backend $server
46    server $server   $server:8000
47EOF
48}
49}
50## End server list
51
Note: See TracBrowser for help on using the repository browser.