I have installed influxdb2 from their website and setup nginx according to this amazing guide from digitalocean. I am trying to set a reverse proxy in order to query and post data to the db. I have my own URL and have set A records and a wildcard. I can access https:www.mydomain.com and mydomain.com .
problem 1. when I run influxd I get the following error:
Error: listen tcp :8086: bind: address already in use
If I stop the service with sudo systemctl stop influxdb
, I can then start the db. I cannot access it though...
problem 2. the proxy is not working. Do you have any idea why? My /etc/nginx/sites-enabled/mydomain.com.conf:
# reverse proxy
location /infuxdb {
proxy_pass http://127.0.0.1:8086;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
and the contents of /etc/nginx/nginxconfig.io/proxy.conf:
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
# Proxy SSL
proxy_ssl_server_name on;
# Proxy headers
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Forwarded $proxy_add_forwarded;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
# Proxy timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;