[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haproxy
Subject:    =?UTF-8?B?UmU6IG1hcF9kb20sIG1hcF9zdWIgaXNzdWU=?=
From:       Seri <seri0528 () naver ! com>
Date:       2014-04-28 12:47:25
Message-ID: d5ec27c3d62ab9604449cdb36e41b679 () cweb24 ! nm ! nhnsystem ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

Hi,

Thanks for your detailed explanation!!

I have misunderstanding of sub, dom, etc until now.


Regards

Seri

-----Original Message-----
From: "Thierry FOURNIER"<tfournier@exceliance.fr> 
To: "Seri"<seri0528@naver.com>; 
Cc: "Lukas Tribus"<luky-37@hotmail.com>; "HAProxy"<haproxy@formilux.org>; 
Sent: 2014-04-28 (월) 21:25:17
Subject: Re: map_dom, map_sub issue

Hello,

This is not a bug. The "dom" matching return true when the first domain
entry match. The order of declaration is important. In your case, you
must order your file from the longer domain name to the shortest.

But, warning: if you enter the domain "a" in your file, "www.a.com"
will match. Maybe, in your case, you should use a "end" match type. If
you want exact match of the domain name, you can use "str" type.

Thierry



On Mon, 28 Apr 2014 20:13:12 +0900 (KST)
Seri <seri0528>@naver.com> wrote:

> Hi,
> 
> Sorry for my poor english.
> 
> I've used recent 1.5-dev24(a631fc8) git code.
> and I didn't use default-backend.
> 
> # echo "show map #-1"  socat stdio /var/run/haproxy.stat
> 0x266f4d0 www.a.com www.a.com
> 0x266f540 m.www.a.com m.www.a.com
> 
> # echo "get map #-1 www.a.com"  socat stdio /var/run/haproxy.stat
> type=dom, found=yes, idx=list, case=sensitive, key="www.a.com", value="www.a.com", type="str"
> 
> # echo "get map #-1 m.www.a.com"  socat stdio /var/run/haproxy.stat
> type=dom, found=yes, idx=list, case=sensitive, key="www.a.com", value="www.a.com", type="str"
> 
> m.www.a.com key matches www.a.com not m.www.a.com.
> 
> Thanks,
> 
> Seri
> 
> -----Original Message-----
> From: "Lukas Tribus"<luky-37>@hotmail.com> 
> To: "Seri"<seri0528>@naver.com>; "HAProxy"<haproxy>@formilux.org>; 
> Cc: 
> Sent: 2014-04-28 (월) 19:43:13
> Subject: RE: map_dom, map_sub issue
> 
> Hi,
> 
> 
> > Hi,
> >
> > I have a map configuration as below
> >
> > ** haproxy configuratioin file
> > frontend http-in
> > ...
> > use_backend %[req.fhdr(host),lower,map_dom(/etc/haproxy/host_to_backend.map)]
> > ...
> >
> > backend www.a.com
> > server www1 1.1.1.1:80
> >
> > backend m.www.a.com
> > server m.www1 2.2.2.2:80
> >
> > ** /etc/haproxy/host_to_backend.map file
> > www.a.com www.a.coom
> > m.www.a.com m.www.a.com
> >
> > If I request "Host: www.a.com", www.a.com backend is chosen.
> > If I request "Host: m.www.a.com", www.a.com backend not m.www.a.com backend is chosen.
> >
> > Is this right behaviour?
> >
> > Have I missed something?
> 
> 
> Please use recent code (1.5-dev24) to make sure that this is supported.
> Does default-backend point to www.a.com? What backend does a unrelated host
> header hit (example.com)?
> 
> 
> 
> Regards,
> 
> Lukas
> 
>        
> 
> 




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic