Getting 404 with NodeJS Proxy Server


I’m having a difficult time getting just the login page to show up using a proxy server (node-http-proxy). My configuration is similar to other examples I have seen. However, I’m getting the “Grafana has failed to load its application files” error page.

The proxy server is currently on my local station ( Here’s what my Node script looks like:

app.all('/grafana(/*)?', (req, res) => {
    serverProxy.web(req, res, {
        target: 'http://[grafana-server]:3000'

Grafana Configuration:

# Protocol (http or https)
protocol = http

# The ip address to bind to, empty will bind to all interfaces
http_addr =

# The http port  to use
http_port = 3000

# The public facing domain name used to access grafana from a browser
domain =

# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
enforce_domain = false

# The full public facing url
root_url = %(protocol)s://%(domain)s:%(http_port)s/dashboard

The url that I’m going to is Like I said, I’m getting the Grafana error page. However, all of the assets showing up as 404 in the Chrome DevTools Network tab.

Things I have tried:

  • Changing the domain to just the main domain
  • Hardcoding the root_url
  • Using localhost instead of my domain
  • Restarting server after every change (on both ends)

Any thoughts?

Also, while on the topic, can anyone tell me if it’s possible to add multiple domains in the Grafana configuration (think multiple environments)?