Nginx reverse proxy and anonymous authentication dashboard not working

Hello,

I have grafana installed on my raspberry pi and capturing some information in a dashboard. I have anonymous authentication enabled so I can access my dashboard without having to authenticate and I can do so directly. The issue comes when I try and access it through my reverse proxy configuration.

I do have other locations added to the config so I can access other services such as transmission web, pihole, jellyfin using locations and possibly through a zerotier-one network.

The following is my nginx configuration:

server {

listen 80;
server_name raspberrypi.local 192.168.1.* 10.147.17.*;

location /speedtest/ {
#proxy_pass http://raspberrypi.local:3000/goto/9lT5wrkRz;
proxy_pass http://raspberrypi.local:3000/grafana/d/kawPe8zRz/internetspeeed?orgId=1&theme=dark;
}
}

This configuration gives me an error saying grafana could not load application files. If I comment this one and try to access the short URL, that works but it then redirects my browser to the full url with the port number which doesn’t work if I try to access it via vpn and a different network.

I’ve gone through the articles on how to set up the reverse proxy in the forums here and elsewhere but can’t seem to make it work. Any pointers to how I can resolve this would be great!

Thanks,
Karan

do you see any other erros in the grafana or nginx logs?

In addition to what @mattabrams asked, just wanted to double check whether you set the root_url and serve_from_sub_path appropriately in your Grafana config (per docs)? Grafana needs to be aware that it’s being served from the /speedtest path on your domain, otherwise it will behave a bit like what you described.

1 Like