Linux Haproxy用户列表和允许无密码ip
如何添加在使用用户列表时未要求密码的haproxy ip地址Linux Haproxy用户列表和允许无密码ip,linux,haproxy,Linux,Haproxy,如何添加在使用用户列表时未要求密码的haproxy ip地址 userlist user user user insecure-password password allow ip 1.1.1.1 [example] 类似于apache中的auth basic AuthType Basic AuthUserFile /www/.site_htpasswd AuthName "xxx" require valid-user Allow from 1.2.3
userlist user
user user insecure-password password
allow ip 1.1.1.1 [example]
类似于apache中的auth basic
AuthType Basic
AuthUserFile /www/.site_htpasswd
AuthName "xxx"
require valid-user
Allow from 1.2.3.4
您需要使用haproxy ACL:
frontend example-frontend
acl ip_whitelist src 1.1.1.1
acl auth_ok http_auth(user)
# require authentication when not in whitelist and not authenticated
http-request auth if !ip_whitelist !auth_ok
您需要使用haproxy ACL:
frontend example-frontend
acl ip_whitelist src 1.1.1.1
acl auth_ok http_auth(user)
# require authentication when not in whitelist and not authenticated
http-request auth if !ip_whitelist !auth_ok