cadvisor behind NGINX: How to load UI?

79 Views Asked by At

I have a docker container running cadvisor on localhost:8040 and I have NGINX on 8080

Here's the NGINX config:

location /cadvisor {
   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:8040/containers/;
   proxy_set_header Host $http_host;
   proxy_redirect off;
 }

The problem is that the UI tries to load static resources. For example:

<link rel="stylesheet" href="../static/bootstrap-4.0.0-beta.2.min.css">

so the browser tries to access <url>:8080/static

How can I fix that?

0

There are 0 best solutions below