Role service-prometheus: move auth in vhosts to location

This commit is contained in:
Julian Labus 2018-11-27 10:55:37 +01:00
parent ce2167d3b3
commit ee5be5f477
No known key found for this signature in database
GPG key ID: 8AF209F2C6B3572A

View file

@ -24,14 +24,15 @@ server {
allow {{ lookup('dig', inventory_hostname, 'qtype=A') }};
allow {{ lookup('dig', inventory_hostname, 'qtype=AAAA') }};
auth_basic "Prometheus";
auth_basic_user_file /etc/nginx/htpasswd_prometheus;
location /alertmanager {
proxy_pass http://127.0.0.1:9093;
auth_basic "Prometheus";
auth_basic_user_file /etc/nginx/htpasswd_prometheus;
}
location / {
proxy_pass http://127.0.0.1:9090;
auth_basic "Prometheus";
auth_basic_user_file /etc/nginx/htpasswd_prometheus;
}
}