mirror of
https://github.com/linuxserver/reverse-proxy-confs.git
synced 2025-07-15 01:23:02 -07:00
Merge pull request #269 from draco2003/patch-1
Handle Nginx http auth + grafana auth separately
This commit is contained in:
commit
39e2164bb0
2 changed files with 10 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
## Version 2020/12/09
|
## Version 2021/01/29
|
||||||
# make sure that your dns has a cname set for grafana and that your grafana container is not using a base url
|
# make sure that your dns has a cname set for grafana and that your grafana container is not using a base url
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
@ -35,6 +35,9 @@ server {
|
||||||
set $upstream_port 3000;
|
set $upstream_port 3000;
|
||||||
set $upstream_proto http;
|
set $upstream_proto http;
|
||||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||||
|
|
||||||
|
# Clear Authorization Header if you are using http auth and normal Grafana auth
|
||||||
|
#proxy_set_header Authorization "";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## Version 2020/12/09
|
## Version 2021/01/29
|
||||||
# grafana requires environment variables set thus:
|
# grafana requires environment variables set thus:
|
||||||
# environment:
|
# environment:
|
||||||
# - "GF_SERVER_ROOT_URL=https://my.domain.com/grafana"
|
# - "GF_SERVER_ROOT_URL=https://my.domain.com/grafana"
|
||||||
|
@ -22,6 +22,10 @@ location ^~ /grafana/ {
|
||||||
set $upstream_port 3000;
|
set $upstream_port 3000;
|
||||||
set $upstream_proto http;
|
set $upstream_proto http;
|
||||||
proxy_pass http://$upstream_grafana:$upstream_port ;
|
proxy_pass http://$upstream_grafana:$upstream_port ;
|
||||||
|
|
||||||
|
# Clear Authorization Header if you are using http auth and normal Grafana auth
|
||||||
|
#proxy_set_header Authorization "";
|
||||||
|
|
||||||
rewrite ^/grafana/(.*)$ /$1 break;
|
rewrite ^/grafana/(.*)$ /$1 break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue