… please include the list in your responses too
> On Nov 10, 2016, at Nov 10, 4:09 AM, Azam Mohammed <[email protected]> wrote: > > Hi Bryan, > > Thanks for your reply. > > Putting "use_backend test" first in Haproxy config worked fine. > > But I have few more question based on the solution. > > As you said both the url_subdomain and url_test acls match the string > ‘subdomain.domain.com <http://subdomain.domain.com/>' we get this issue. But > in the ACL section full URL is specified, then why acl url_subdomain is > catching the requested with the URL test.subdomain.domain.com > <http://test.subdomain.domain.com/>. I believe url_subdomain should alway > match subdomain.domain.com <http://subdomain.domain.com/> only. > hdr_dom matches domains (strings terminated by a dot (.) or whitespace. Since you seem to be expecting an exact string match, just use hdr. > If there is anything to do with the levels of subdomain, is it mentioned in > the Haproxy documentation to use the precedence. Could please point me where > to look in Haproxy documentation for this. > The documentation is quite extensive and you can find specifics about req.hdr at https://cbonte.github.io/haproxy-dconv/1.6/configuration.html#7.3.6-req.hdr <https://cbonte.github.io/haproxy-dconv/1.6/configuration.html#7.3.6-req.hdr> -Bryan > -- > > Thanks & Regards, > > Azam Sheikh Mohammed > IT Network & System Admin > > D a n a t > Al-Shatha Tower Office 1305, Dubai Internet City | P.O.Box: 502113, Dubai, > UAE | Tel: +971 4 368 8468 Ext. 133 | Fax: +971 4 368 8232 | Mobile: +971 > 55 498 8089 | Email: [email protected] <mailto:[email protected]> > On Thu, Nov 10, 2016 at 12:46 AM, Bryan Talbot <[email protected] > <mailto:[email protected]>> wrote: > >> On Nov 9, 2016, at Nov 9, 4:45 AM, Azam Mohammed <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hello, >> >> >> >> acl url_subdomain hdr_dom(host) -i subdomain.domain.com >> <http://subdomain.domain.com/> >> acl url_test hdr_dom(host) -i >> test.subdomain.domain.com <http://test.subdomain.domain.com/> >> >> >> use_backend subdomain if url_subdomain >> >> use_backend test if url_test >> >> >> >> Both the subdomain has different web pages. Now if we enter >> test.subdomain.domain.com <http://test.subdomain.domain.com/> in the browser >> it goes into subdomain.domain.com <http://subdomain.domain.com/> backend. We >> have no idea what is causing this issue. >> >> > > > Both the url_subdomain and url_test acts match the string > ‘subdomain.domain.com <http://subdomain.domain.com/>’. > > Make the ACL match be more specific or put the “use_backend test” first since > it is already more specific. > > -Bryan > > >

