Hi!
I am using haproxy 1.5 on a CentOS 7 server.
I had to enable http auth for a few backends, but unfortunately its presenting http auth for all the backends in the configuration.
Please how can I get haproxy to present http auth for only specific backends?
My configuration is like this:
userlist auth-list
user urlone insecure-password ****
user urloneprod insecure-password ****
user another-user insecure-password ****
listen default_443
maxconn 50000
mode http
option httplog
bind *:443 ssl crt /etc/haproxy/ssl
tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
acl auth_for_urlone http_auth(auth-list)
acl acl_testurl_one_443 hdr(host) -i test.url_one.ng
acl acl_produrl_one_443 hdr(host) -i prod.url_one.ng
acl acl_url_one_443 hdr(host) -i url_one.ng
acl acl_sub_url_one_443 hdr(host) -i .url_one.ng
acl acl_url_two_443 hdr(host) -i check.url_two.mydom.dom
acl to_url_three path_beg /url_three
http-request add-header X-Forwarded-For %[src]
http-request auth if !auth_for_urlone
use_backend to_server0 if acl_testurl_one_443
use_backend to_server0 if acl_produrl_one_443
use_backend backend_onboard if acl_url_two_443 to_url_three
listen default_80
maxconn 50000
mode http
option httplog
bind *:80
acl acl_sub_url_one_80 hdr(host) -i .url_one.ng
acl acl_url_one_80 hdr(host) -i url_one.ng
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
http-request add-header X-Forwarded-For %[src]
reqrep ^([^\ ]*)\ /some/path(.*) \1\ /thatNotification/\2
stick-table type string len 20 size 5m
stick on url_param(MSISDN)
use_backend letsencrypt-backend if letsencrypt-acl
```