title: How can I connect to InfluxDB through Nginx reverse proxy?
body: <p>I have Nginx running as a reverse proxy on a computer with only one open port. Through this port and Nginx I redirect the received requests to several internal servers. Now I need to run InfluxDB on this computer, but the client writing to InfluxDB is on another computer.
  My first idea was to add a new location to redirect input requests since port 8086 is closed, for example:</p>
  <pre><code>location /databasets {
              proxy_set_header Host $host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-NginX-Proxy true;
              proxy_pass http://localhost:8086;       
          }
  </code></pre>
  <p>and then, with Python, I use:</p>
  <pre><code>client = InfluxDBClient(host='https://myurl', port=10000, 'root', 'root', dbname='mydb', path='databasets', ssl=True, proxies={&quot;https&quot;: &quot;https://myurl:10000/databasets&quot;})
  </code></pre>
  <p>But so far it doesn't work, I have tried a couple of ways of configuring the nginx.conf file that I have seen on the internet and also changing the host / port in the Python client. I don't know if this is not possible, or on which side is the error, any ideas?</p>
  <p>Thanks in advance</p>