Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've recently taken over an environment using HAProxy, and I'm attempting to learn the config and what it all means, but I'm finding some aspects of it are not clear.

I think the above means that if host header begins with "foo.bar.com" then use the cdn cdn_name, but I'm not totally sure. Can somebody confirm for me?

Thanks!

share|improve this question

1 Answer 1

Close.

It's defining an ACL with the name cdn_name, with the criteria hdr_beg(host) -i foo.bar.com. The criteria basically means that the HTTP Host: header begins with "foo.bar.com" and it uses case-insensitive matching (the "-i" flag).

On it's own this doesn't actually do anything, but it will be used further down your config, where you will likely see something like this:

<something something> if cdn_name

What this does is if the client request uses a Host: header that begins with "foo.bar.com", HAproxy will do whatever is defined in the <something something> bit of the config.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.