Adding InfluxdB datasource (running behind nginx proxy)

Hi,

Will it be possible to add datasource connectivity in grafana when my influxdb server is running behind nginx?
I actually tried it but I get an error. Hoping someone already did this.

Grafana version: 9.0.0
Influxdb version: 1.8.3
nginx: latest

here is my configuration in the nginx, by the way I also run grafana behind nginx and it works well:

location /db/ {
        proxy_pass_header Authorization;
        proxy_set_header Host $host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass "https://localhost:8086";

        }



and on my Grafana settings:

note the URL I used is “https://localhost/db” which my nginx server proxing the influxdb “localhost:8086”

Thanks and regards,
Henjoe