On Tue, Nov 20, 2007 at 07:53:45PM -0500, Rob Morin wrote:
> Here is my whole config....
>
> Ahh, maybe its the default where it says option httplog ?? should i
> remove mode http from the default, i assumed whatever is in a listen
> block overrides the defaults...
> I guess i assumed wrong?
Yes and no: all options defined in a listen block override the defaults, but everything which is not defined remains as declared in defaults. For instance, if you have "option httplog" in defaults, since there's currently no way to write "no option httplog", this option remains enabled. The only way to disable defaults is to write a new defaults entry. Sometimes, people use two defaults sections, one for TCP, and one for HTTP :
defaults http
... default options for HTTP listeners ...
mode http
option httplog
listen xxx:80
...
listen yyy:80
...
listen zzz:80
...
defaults tcp
... default options for TCP listeners ...
mode tcp
option tcplog
listen xxx:110
...
BTW, you found a bug, because it is not normal that the httplog option has been accepted in TCP mode. I'll check the config parser to see if there's a missing check. Same for the "stats enable" in TCP sections, you must remove them, but the config parser should have noticed it.
> as for version i compiled it from haproxy-1.3.13.1.tar.gz
> Yes i noticed just as i sent the first email.... as i had a problem with
> logging before....
>
>
> I very much appreciate all your help!
You're welcome. Erroneous configurations are what help us improve future versions :-)
Please see my other comments below.
> ------------------------
>
> global
> log 127.0.0.1 local0 notice
> maxconn 4096
> user haproxy
> group haproxy
>
> defaults
> log global
> mode http
> option httplog
> option dontlognull
> retries 3
> redispatch
> maxconn 2000
> contimeout 5000
> clitimeout 50000
> srvtimeout 50000
>
> listen http_proxy xxx.xxx.xxx.148:80
> mode http
> log global
those two options are not needed since already in defaults
> stats enable
> stats auth dido:xxxxxxxxx
> balance roundrobin
> cookie JSESSIONID prefix
Warning with prefix mode: it changes the value of the cookie sent to the user. Very often, applications using JSESSIONID also manage to get the cookie as a parameter in the URL, which will not be transformed. You must ensure that it is not the case in your situation, and that JSESSIONID is only exchanged in Cookie and Set-Cookie headers, never in the URL.
> option httpclose
> option forwardfor
> option httpchk HEAD /check.txt HTTP/1.0
> server peter xxx.xxx.xxx.158:80 cookie A check
> server joe xxx.xxx.xxx.149:80 cookie B check backup
>
>
> ### Setup for Mail
Here you can add the second "defaults" section for TCP listeners
> listen imap_proxy xxx.xxx.xxx.147:143
> maxconn 100
> mode tcp
> log global
"mode tcp" and "log global" will go to the new defaults section
> balance roundrobin
> server peter xxx.xxx.xxx.158:143 check inter 5000 fall 4 rise 1
> server joe xxx.xxx.xxx.149:143 check inter 5000 fall 4 rise 1
> stats enable
remove "stats enable"
> listen smtp_proxy xxx.xxx.xxx.147:25
> maxconn 500
> mode tcp
> log global
"mode tcp" and "log global" will go to the new defaults section
> balance roundrobin
> server peter xxx.xxx.xxx.158:25
> stats enable
remove "stats enable"
>
> listen pop_proxy xxx.xxx.xxx.147:110
> maxconn 500
> mode tcp
> log global
"mode tcp" and "log global" will go to the new defaults section
> balance roundrobin
> # client time-out set to 2mn30.
> clitimeout 150000
> # server time-out set to 30s.
> srvtimeout 30000
set clitimeout and srvtimeout to identical values, eg: 150000.
> contimeout 4000
> server peter xxx.xxx.xxx.158:110 check inter 5000 fall 4 rise 1
> server joe xxx.xxx.xxx.149:110 check inter 5000 fall 4 rise 1
> stats enable
remove "stats enable"
Best regards,
Willy
Received on 2007/11/21 05:34
This archive was generated by hypermail 2.2.0 : 2007/11/21 06:15 CET