willy tarreau | 9fe663a | 2005-12-17 13:02:59 +0100 | [diff] [blame] | 1 | global |
willy tarreau | b1285d5 | 2005-12-18 01:20:14 +0100 | [diff] [blame] | 2 | log 127.0.0.1 local0 |
willy tarreau | 9fe663a | 2005-12-17 13:02:59 +0100 | [diff] [blame] | 3 | # log 127.0.0.1 local1 |
| 4 | maxconn 4000 |
willy tarreau | b1285d5 | 2005-12-18 01:20:14 +0100 | [diff] [blame] | 5 | ulimit-n 8000 |
willy tarreau | 9fe663a | 2005-12-17 13:02:59 +0100 | [diff] [blame] | 6 | uid 0 |
| 7 | gid 0 |
| 8 | # chroot /tmp |
willy tarreau | a159808 | 2005-12-17 13:08:06 +0100 | [diff] [blame] | 9 | # nbproc 2 |
willy tarreau | 9fe663a | 2005-12-17 13:02:59 +0100 | [diff] [blame] | 10 | # daemon |
| 11 | # debug |
| 12 | # quiet |
| 13 | |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 14 | listen proxy1 0.0.0.0:8000 |
willy tarreau | 0f7af91 | 2005-12-17 12:21:26 +0100 | [diff] [blame] | 15 | mode http |
willy tarreau | a159808 | 2005-12-17 13:08:06 +0100 | [diff] [blame] | 16 | # source 127.0.0.2:0 |
willy tarreau | 9fe663a | 2005-12-17 13:02:59 +0100 | [diff] [blame] | 17 | # log 127.0.0.1 local0 |
| 18 | # log 127.0.0.1 local1 |
willy tarreau | b1285d5 | 2005-12-18 01:20:14 +0100 | [diff] [blame] | 19 | log global |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 20 | #mode tcp |
| 21 | cookie SERVERID insert indirect |
| 22 | balance roundrobin |
| 23 | #dispatch 127.0.0.1:3130 |
| 24 | #dispatch 127.0.0.1:31300 |
| 25 | #dispatch 127.0.0.1:80 |
| 26 | #dispatch 127.0.0.1:22 |
willy tarreau | bc4e1fb | 2005-12-17 13:32:07 +0100 | [diff] [blame] | 27 | option httpchk |
| 28 | server test 10.1.1.2:80 cookie cookie1 check inter 300 |
| 29 | # server nc 127.0.0.1:8080 cookie cookie1 check inter 300 |
willy tarreau | a159808 | 2005-12-17 13:08:06 +0100 | [diff] [blame] | 30 | # server tuxlocal0 10.101.23.9:80 cookie cookie1 check |
| 31 | # server tuxlocal1 127.0.0.1:80 cookie cookie1 check |
| 32 | # server tuxlocal2 127.0.0.1:80 cookie cookie2 check |
| 33 | # server tuxlocal3 127.0.0.1:80 cookie cookie3 check |
| 34 | # server tuxlocal4 127.0.0.1:80 cookie cookie4 check |
| 35 | # server vax 10.101.14.1:80 cookie cookie1 check |
willy tarreau | ef900ab | 2005-12-17 12:52:52 +0100 | [diff] [blame] | 36 | #server tuxceleron 10.101.0.1:80 cookie cookie2 check |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 37 | #server telnet 127.0.0.1:23 |
| 38 | #server ssh 127.0.0.1:22 |
willy tarreau | 9fe663a | 2005-12-17 13:02:59 +0100 | [diff] [blame] | 39 | #server local 127.0.0.1:3130 cookie cookie3 check |
| 40 | #server ko 127.0.0.1:0 cookie cookie3 check |
willy tarreau | ef900ab | 2005-12-17 12:52:52 +0100 | [diff] [blame] | 41 | #server local 127.0.0.1:8001 cookie cookie3 check |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 42 | #server local 127.0.0.1:3130 |
| 43 | #server celeron 10.101.0.1:80 cookie srv1 |
| 44 | #server celeron 10.101.0.1:31300 |
| 45 | #server local 10.101.23.9:31300 |
willy tarreau | 0f7af91 | 2005-12-17 12:21:26 +0100 | [diff] [blame] | 46 | contimeout 3000 |
| 47 | clitimeout 150000 |
| 48 | srvtimeout 150000 |
| 49 | maxconn 60000 |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 50 | redispatch |
| 51 | retries 3 |
| 52 | grace 3000 |
| 53 | #rsprep ^Server.* Server:\ IIS |
| 54 | #rspdel ^Server.* |
| 55 | #rspadd Set-Cookie:\ mycookie=0;\ path=/ |
| 56 | #rsprep ^(Date:\ )([^,]*)(,\ )(.*) LaDate\ est:\ \4\ (\2) |
willy tarreau | 9fe663a | 2005-12-17 13:02:59 +0100 | [diff] [blame] | 57 | # force connection:close |
| 58 | #reqidel ^Connection: |
willy tarreau | a159808 | 2005-12-17 13:08:06 +0100 | [diff] [blame] | 59 | #rspidel ^Connection: |
willy tarreau | 9fe663a | 2005-12-17 13:02:59 +0100 | [diff] [blame] | 60 | #reqadd Connection:\ close |
| 61 | #rspadd Connection:\ close |
| 62 | # processing options |
| 63 | #option keepalive |
| 64 | option forwardfor |
| 65 | option httplog |
willy tarreau | a159808 | 2005-12-17 13:08:06 +0100 | [diff] [blame] | 66 | option dontlognull |
| 67 | # reqirep ^(Test:\ ) \0_toto_\1_toto |
willy tarreau | 96d4037 | 2005-12-17 13:11:56 +0100 | [diff] [blame] | 68 | # reqidel ^X-Forwarded-for: |
willy tarreau | a159808 | 2005-12-17 13:08:06 +0100 | [diff] [blame] | 69 | # reqirep ^(GET|POST)\ .* \0 |
| 70 | # reqirep ^(Host:|Connection:|User-agent:|Cookie:)\ .* \0 |
| 71 | # reqideny ^ |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 72 | |
willy tarreau | ef900ab | 2005-12-17 12:52:52 +0100 | [diff] [blame] | 73 | listen proxy1 0.0.0.0:8001 |
| 74 | mode http |
| 75 | #mode tcp |
| 76 | dispatch 127.0.0.1:80 |
| 77 | #dispatch 127.0.0.1:31300 |
| 78 | #dispatch 127.0.0.1:80 |
| 79 | #dispatch 127.0.0.1:22 |
| 80 | #server tuxlocal 127.0.0.1:80 cookie cookie1 check |
| 81 | #server tuxceleron 10.101.0.1:80 cookie cookie2 check |
| 82 | #server telnet 127.0.0.1:23 |
| 83 | #server ssh 127.0.0.1:22 |
| 84 | #server local 127.0.0.1:3130 cookie cookie3 check |
| 85 | #server local 127.0.0.1:3130 |
| 86 | #server celeron 10.101.0.1:80 cookie srv1 |
| 87 | #server celeron 10.101.0.1:31300 |
| 88 | #server local 10.101.23.9:31300 |
| 89 | contimeout 3000 |
| 90 | clitimeout 150000 |
| 91 | srvtimeout 150000 |
| 92 | maxconn 60000 |
| 93 | redispatch |
| 94 | retries 3 |
| 95 | grace 3000 |
| 96 | #rsprep ^Server.* Server:\ IIS |
| 97 | #rspdel ^Server.* |
| 98 | rspadd Set-Cookie:\ SERVERID=12345678;\ path=/ |
| 99 | #rsprep ^(Date:\ )([^,]*)(,\ )(.*) LaDate\ est:\ \4\ (\2) |
| 100 | |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 101 | listen proxy1 0.0.0.0:3128 |
willy tarreau | ef900ab | 2005-12-17 12:52:52 +0100 | [diff] [blame] | 102 | disabled |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 103 | mode http |
willy tarreau | ef900ab | 2005-12-17 12:52:52 +0100 | [diff] [blame] | 104 | cookie SERVERID insert indirect |
| 105 | #dispatch 127.0.0.1:8080 |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 106 | server srv1 127.0.0.1:8080 |
| 107 | #server srv2 192.168.12.3:8080 |
| 108 | contimeout 3000 |
| 109 | clitimeout 450000 |
| 110 | srvtimeout 450000 |
| 111 | maxconn 60000 |
| 112 | redispatch |
willy tarreau | 0f7af91 | 2005-12-17 12:21:26 +0100 | [diff] [blame] | 113 | retries 3 |
| 114 | grace 3000 |
willy tarreau | ef900ab | 2005-12-17 12:52:52 +0100 | [diff] [blame] | 115 | rspdel ^Via:.* |
willy tarreau | b1285d5 | 2005-12-18 01:20:14 +0100 | [diff] [blame] | 116 | monitor-net 192.168.12.252/30 |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 117 | |
willy tarreau | 0f7af91 | 2005-12-17 12:21:26 +0100 | [diff] [blame] | 118 | |
| 119 | listen proxy2 0.0.0.0:3129 |
willy tarreau | ef900ab | 2005-12-17 12:52:52 +0100 | [diff] [blame] | 120 | disabled |
willy tarreau | 0f7af91 | 2005-12-17 12:21:26 +0100 | [diff] [blame] | 121 | mode http |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 122 | transparent |
| 123 | # dispatch 127.0.0.1:80 |
willy tarreau | 0f7af91 | 2005-12-17 12:21:26 +0100 | [diff] [blame] | 124 | contimeout 3000 |
| 125 | clitimeout 150000 |
| 126 | srvtimeout 150000 |
| 127 | maxconn 60000 |
| 128 | retries 3 |
| 129 | grace 3000 |
| 130 | |
| 131 | # log 10.101.11.1 local1 |
| 132 | # log 10.101.11.1 local2 |
| 133 | |
| 134 | # cliexp ^(.*ASPSESSIONID.*=)(.*) \1FENICGGCBECLFFEEOAEAIFGF |
| 135 | # cliexp ^(GET.*)(.free.fr)(.*) \1.online.fr\3 |
| 136 | # cliexp ^(POST.*)(.free.fr)(.*) \1.online.fr\3 |
| 137 | # cliexp ^Proxy-Connection:.* Proxy-Connection:\ close |
| 138 | # srvexp ^(Location:\ )([^:]*://[^/]*)(.*) \1\3 |
| 139 | |
| 140 | listen health 0.0.0.0:3130 |
| 141 | mode health |
| 142 | clitimeout 1500 |
| 143 | srvtimeout 1500 |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 144 | maxconn 6000 |
| 145 | grace 0 |
| 146 | |
| 147 | |
| 148 | listen health 0.0.0.0:31300 |
| 149 | mode health |
willy tarreau | 197e8ec | 2005-12-17 14:10:59 +0100 | [diff] [blame] | 150 | option httpchk |
willy tarreau | 5cbea6f | 2005-12-17 12:48:26 +0100 | [diff] [blame] | 151 | clitimeout 1500 |
| 152 | srvtimeout 1500 |
| 153 | maxconn 6000 |
willy tarreau | 0f7af91 | 2005-12-17 12:21:26 +0100 | [diff] [blame] | 154 | grace 0 |