Role service-prometheus: move auth in vhosts to location
This commit is contained in:
parent
ce2167d3b3
commit
ee5be5f477
1 changed files with 4 additions and 3 deletions
|
@ -24,14 +24,15 @@ server {
|
||||||
allow {{ lookup('dig', inventory_hostname, 'qtype=A') }};
|
allow {{ lookup('dig', inventory_hostname, 'qtype=A') }};
|
||||||
allow {{ lookup('dig', inventory_hostname, 'qtype=AAAA') }};
|
allow {{ lookup('dig', inventory_hostname, 'qtype=AAAA') }};
|
||||||
|
|
||||||
auth_basic "Prometheus";
|
|
||||||
auth_basic_user_file /etc/nginx/htpasswd_prometheus;
|
|
||||||
|
|
||||||
location /alertmanager {
|
location /alertmanager {
|
||||||
proxy_pass http://127.0.0.1:9093;
|
proxy_pass http://127.0.0.1:9093;
|
||||||
|
auth_basic "Prometheus";
|
||||||
|
auth_basic_user_file /etc/nginx/htpasswd_prometheus;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:9090;
|
proxy_pass http://127.0.0.1:9090;
|
||||||
|
auth_basic "Prometheus";
|
||||||
|
auth_basic_user_file /etc/nginx/htpasswd_prometheus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue