1- ## Version 2023/02/12
1+ ## Version 2023/04/20
22# make sure that your grafana container is named grafana
33# make sure that grafana is set to work with the base url /grafana/
44# grafana requires environment variables set thus:
@@ -22,10 +22,10 @@ location ^~ /grafana/ {
2222
2323 include /config/nginx/proxy.conf;
2424 include /config/nginx/resolver.conf;
25- set $upstream_grafana grafana;
25+ set $upstream_app grafana;
2626 set $upstream_port 3000;
2727 set $upstream_proto http;
28- proxy_pass http ://$upstream_grafana :$upstream_port ;
28+ proxy_pass $upstream_proto ://$upstream_app :$upstream_port;
2929
3030 # Clear Authorization Header if you are using http auth and normal Grafana auth
3131 #proxy_set_header Authorization "";
@@ -37,33 +37,10 @@ location ^~ /grafana/ {
3737location ^~ /grafana/api {
3838 include /config/nginx/proxy.conf;
3939 include /config/nginx/resolver.conf;
40- set $upstream_grafana grafana;
40+ set $upstream_app grafana;
4141 set $upstream_port 3000;
4242 set $upstream_proto http;
43- proxy_pass http://$upstream_grafana:$upstream_port ;
44-
45- # Clear Authorization Header if you are using http auth and normal Grafana auth
46- #proxy_set_header Authorization "";
47-
48- rewrite ^/grafana/(.*)$ /$1 break;
49-
50- }
51-
52- location ^~ /grafana/metrics {
53- # enable the next two lines for http auth
54- #auth_basic "Restricted";
55- #auth_basic_user_file /config/nginx/.htpasswd;
56-
57- # block metrics access by default because it is unprotected
58- # you can comment out the next line to enable remote metrics
59- deny all;
60-
61- include /config/nginx/proxy.conf;
62- include /config/nginx/resolver.conf;
63- set $upstream_grafana grafana;
64- set $upstream_port 3000;
65- set $upstream_proto http;
66- proxy_pass http://$upstream_grafana:$upstream_port ;
43+ proxy_pass $upstream_proto://$upstream_app:$upstream_port;
6744
6845 # Clear Authorization Header if you are using http auth and normal Grafana auth
6946 #proxy_set_header Authorization "";
0 commit comments