Hi.
I am trying to setup a reverse proxy so I can securely send data to my Influxdb2 server. ( I have SSL working already )
I have setup a working system for Grafana as well as WrodPress and they work great.
I have had massive problems with setting up InfluxDB though.
I access the website areas like so :
They all are accessed on the same open port ( 443 ) then redirected with Nginx Reverse Proxy
WordPress website : URL/
Grafana website : URL/grafana/
I want to be able to access InfluxDB on : URL/influxdb2
Grafana is hosted on port 3000 internally and it redirects perfectly, I don’t see why Influxdb wouldn’t do the same ?
But I keep getting Bad Gateways or too many redirection errors from my browser when trying the URL/influxdb2 path.
Here are my Nginx config settings :
( public facing website URL has been replaced with just URL )
server {
# Add index.php to the list if you are using PHP
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name URL;
location /grafana/ {
proxy_pass http://localhost:3000;
}
location /influxdb2/ {
proxy_pass http://localhost:8086;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/btads.hopto.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/btads.hopto.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
I know I did change a few things when I got Grafana to work in the Grafana setup file but I can not find anything that I should change in InfluxDB2.
My InfluxDB2 config file only contains :
bolt-path = "/var/lib/influxdb/influxd.bolt"
engine-path = "/var/lib/influxdb/engine"
I feel like something should be changed here but this is getting to be way over my head if I am honest.
Any advice would be of great help.
I should mention that I was able to have this all working before I started setting up the server changes, it was perfectly working locally, now however I can not even access the system on my local network.
The Database is running on a Pi without a screen so remote access is important.