Run Influxdb API behind nginx hosted on azure

I would like to run influxdb API, reverse proxy by NGINX. The whole application is hosted on azure VM. I have opened the port 80 and 443 in VM. Can I know why I still cannot get the connection of the API. Here is my NGINX configuration in conf.d.

upstream influxdb {

server {
        listen 443;
        listen [::]:443;
        location /api/v2/ {
                proxy_redirect http://influxdb http://influxdb/api/v2/;
                proxy_pass_header Server;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Scheme $scheme;
                proxy_set_header Host $http_host;

                proxy_pass http://influxdb;

Have you seen this thread?