Ok, I’ve looked and looked for an answer, but all I’ve managed to do so far with nginx and setting up grafana per the tutorial is end up at the grafana home page (presumably because I don’t understand regular expressions too well and break stops processing?). Note that plugging the URL from the proxy_pass directive directly into a browser works fine. Also note that the dashboard is querying an Influx DB, and just in case this matters, InfluxDB and Grafana are both running in docker containers on an rpi. Nginx is running on a separate rpi. The only reason I’m trying to reverse proxy at all is to avoid having to use the long URL - i.e., I’d like to simply browse to 192.168.0.10/grafana and see the dashboard.
server {
listen 80;
server_name 192.168.0.10;
location /grafana/ {
rewrite ^/grafana/(.*) /$1 break;
proxy_set_header Host $http_host;
proxy_pass http://192.168.0.20:3000/grafana/d/Y8u4vUiRa/myDashboard?orgId=2&refresh=5s&from=now-5m&to=now&kiosk/;
}
}