The_Pingu
The_Pingu

Reputation: 192

Grafana returns 401 Unauthorized when accessed behind a reverse proxy

I run Grafana with a custom root url behind an Nginx reverse proxy, based on what is shown at https://grafana.com/tutorials/run-grafana-behind-a-proxy/ but when i try to access site.com/grafana, i get a 401 unauthorized with the following json response :

{"message":"invalid username or password","traceID":""}

i have tried multiple nginx and docker setups but nothing works.

Upvotes: 2

Views: 2241

Answers (1)

The_Pingu
The_Pingu

Reputation: 192

This is an nginx auth_basic issue, i don't know why, but i never encountered this issue with any other app. Basically, auth_basic login and password are proxied to grafana, and there are no possibilities to try other logins. To solve this i had to set

proxy_set_header Authorization "";

in nginx conf and voilà

Upvotes: 1

Related Questions