title: Add non-docker service to traefik v2 - site resources missing
body: <p><strong><em>Question update below!</em></strong></p>
  
  <p>I have set up traefik in the last days, it seems to work great for docker containers. What does not work is setting up a non-docker backend. I have a netdata dashboard running (<a href="https://github.com/netdata/netdata" rel="nofollow noreferrer">https://github.com/netdata/netdata</a>) on port 19999 on the host.</p>
  
  <p>I have defined a file provider:</p>
  
  <pre><code>[providers.file]
    directory = "/home/myname/traefik"
    filename = "providers.toml"
    watch = true
  </code></pre>
  
  <p>Where I defined the service and router for my netdata dashboard:</p>
  
  <pre><code>[http.routers]
    [http.routers.netdata]
      service = "netdata"
      middlewares = ["replacepath"]
      rule = "Host(`my.host.name`) &amp;&amp; Path(`/netdata`)"
  
  [http.middlewares]
    [http.middlewares.replacepath.replacePath]
      path = "/"
  
  [http.services]
    [http.services.netdata]
        [http.services.netdata.loadBalancer]
          [[http.services.netdata.loadBalancer.servers]]
            url = "http://192.168.178.60:19999/" ---&gt; my server local ip 
  
  </code></pre>
  
  <p>I use replacepath to strip the path so I don't end up one directory further down, which is not existing.</p>
  
  <p>However when I visit <a href="http://my.host.name/netdata" rel="nofollow noreferrer">http://my.host.name/netdata</a> it serves me only raw html by the looks of it, I get 404s for .css and .js content.</p>
  
  <p>What do I have to do to get all files in the website directory delivered? I feel like there is an easy solution to this which I can't see right now...</p>
  
  <p>I found several tutorials using older traefik versions, where they use frontends and backends, to my understanding these are being replaced by routers, middlewares and services.</p>
  
  <ul>
  <li>I tried using "<a href="http://localhost:19999" rel="nofollow noreferrer">http://localhost:19999</a>" instead of my local ip, with no success (results in a bad gateway error)</li>
  <li>I also tried setting the traefik container to the network "host" because the containers should be isolated from the rest of the host, so traefik cannot communicate with the netdata server, but as I said I get at least part of the website, so this can't be the issue?</li>
  </ul>
  
  <p><strong>Update #1, 30 Jan 20:</strong></p>
  
  <p>After some more tries and a failed attempt to make it work with nginx I realized that not the proxy itself is the problem here. I noticed that whatever service I run at root level (so, not path rules in traefik, or <code>location /</code> in nginx) it works, but everything else which gets a path/location is broken or not working at all. One service I wanted to proxy via a route is a dashboard from my homebridge (<a href="https://github.com/nfarina/homebridge" rel="nofollow noreferrer">https://github.com/nfarina/homebridge</a>) - but it seems like Angular is having troubles with custom paths. Same problem with my netdata dashboard or my onionbox status site. I am leaving this question open, maybe someone finds a (hacky) way of making it work. </p>