File tree 3 files changed +32
-2
lines changed 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,15 @@ haproxy_default_monitor_uri:
123
123
124
124
# Userlist
125
125
haproxy_userlist :
126
-
127
- # Stats
126
+ - stats-auth :
127
+ groups :
128
+ - " admin users admin"
129
+ - " readonly users user"
130
+ users :
131
+ - " admin insecure-password opqrstuvw"
132
+ - " user insecure-password abcdefghi"
133
+
134
+ # Stats with HTTP Basic Auth and a single user
128
135
haproxy_stats : true
129
136
haproxy_stats_address : ' *'
130
137
haproxy_stats_port : 9001
@@ -145,6 +152,23 @@ haproxy_stats_timeouts:
145
152
- connect 100s
146
153
- queue 100s
147
154
155
+ # Stats with HTTP Basic Auth using an userlist
156
+ haproxy_stats : true
157
+ haproxy_stats_address : " ::"
158
+ haproxy_stats_port : 8081
159
+ haproxy_stats_ssl : false
160
+ haproxy_stats_uri : /stats
161
+ haproxy_stats_auth :
162
+ haproxy_stats_acls :
163
+ - " AUTH http_auth(stats-auth)"
164
+ - " AUTH_ADMIN http_auth_group(stats-auth) admin"
165
+ haproxy_stats_options :
166
+ - refresh 5s
167
+ - show-legends
168
+ - show-node
169
+ - http-request auth unless AUTH
170
+ - admin if AUTH_ADMIN
171
+
148
172
# SSL
149
173
haproxy_ssl_certificate : /etc/ssl/uoi.io/uoi.io.pem
150
174
haproxy_ssl_options : no-sslv3 no-tls-tickets force-tlsv12
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ haproxy_stats_address: '*'
89
89
haproxy_stats_port : 9001
90
90
haproxy_stats_ssl : false
91
91
haproxy_stats_auth : true
92
+ haproxy_stats_acls : []
92
93
haproxy_stats_user : haproxy-stats
93
94
haproxy_stats_password : B1Gp4sSw0rD!!
94
95
haproxy_stats_uri : /
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ listen stats
10
10
{% endif %}
11
11
mode http
12
12
maxconn 10
13
+ {% if haproxy_stats_acls is defined and haproxy_stats_acls |length %}
14
+ {% for acl in haproxy_stats_acls %}
15
+ acl {{ acl }}
16
+ {% endfor %}
17
+ {% endif %}
13
18
stats enable
14
19
{% for opt in haproxy_stats_options %}
15
20
stats {{ opt }}
You can’t perform that action at this time.
0 commit comments