I have a setup where I have multiple service running with docker compose and one Nginx (nginx:1.19-alpine), which acts as a reverse proxy for all services and serves some static files.
One service is an Influxdb container (influxdb:2.1.0-alpine) which provides a UI for webbrowsers.
I want to reverse proxy to this container, but I get problems with the static files of this container.
This would be my rule so far:
upstream database {
server data-db:8086;
}
server {
listen 80;
location /influx/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://database/;
}
}
I get a white screen, when I browse to http://localhost:8080/influx/ (localhost:8080 is the Nginx)
The console shows me, that the static files cannot be found.
In the image you can see, that the browser tries to find files at / and not /influx/. That's a problem, because I have other things on /
I've seen similar questions, but can't get my setup to run properly.