Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to specify a path which, when hit, requires authentication. I've new to HAProxy and have been struggling with this for a while. Here is one attempt:

   acl auth_ok http_auth(site_users)  
     http-request path_beg /foo/bar auth realm foo if !auth_ok

I've created a user list called auth users, and got auth to work for the entire site. But, if someone hits say, /foo/bar they should be required to authenticate. Not other paths.

Any help is greatly appreciated!

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.