0

Is there a way to specify a password for the userlist from an environment variable. All of the following seem not to work:

userlist UsersFor_Frontend
  user admin insecure-password ${ENV_PASSWORD}
  user admin insecure-password env(ENV_PASSWORD)
  user admin insecure-password { env(ENV_PASSWORD) }
0

Do environment variables work in other parts of the conf file? If not, this is a duplicate, check How can I use environment variables in haproxy.conf and Using HaProxy environmental variables in haproxy.cfg not working

(Basically, you need to make sure you use ver >= 1.5, that the conf file is actually used and set the environment variables correctly - try "cat /proc/$(pgrep haproxy)/environ" - you should see the environment variables there.)

| improve this answer | |
  • yes variables work in other parts. I use them for address and ports in the backend and I use them for an if for the acl (i.e the one to turn on or of basic auth). But I can not set the password. In all of the cases above the password ends up to be the string writen there i.e (${ENV_PASSWORD}) – FibHeap Sep 8 '15 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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