|
@@ -13,7 +13,26 @@ http {
|
|
|
listen 10080;
|
|
listen 10080;
|
|
|
|
|
|
|
|
location /grafana/ {
|
|
location /grafana/ {
|
|
|
|
|
+ ################################################################
|
|
|
|
|
+ # Enable these settings to test with basic auth and an auth proxy header
|
|
|
|
|
+ # the htpasswd file contains an admin user with password admin and
|
|
|
|
|
+ # user1: grafana and user2: grafana
|
|
|
|
|
+ ################################################################
|
|
|
|
|
+
|
|
|
|
|
+ # auth_basic "Restricted Content";
|
|
|
|
|
+ # auth_basic_user_file /etc/nginx/htpasswd;
|
|
|
|
|
+
|
|
|
|
|
+ ################################################################
|
|
|
|
|
+ # To use the auth proxy header, set the following in custom.ini:
|
|
|
|
|
+ # [auth.proxy]
|
|
|
|
|
+ # enabled = true
|
|
|
|
|
+ # header_name = X-WEBAUTH-USER
|
|
|
|
|
+ # header_property = username
|
|
|
|
|
+ ################################################################
|
|
|
|
|
+
|
|
|
|
|
+ # proxy_set_header X-WEBAUTH-USER $remote_user;
|
|
|
|
|
+
|
|
|
proxy_pass http://localhost:3000/;
|
|
proxy_pass http://localhost:3000/;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|