Acessing a public dashboard using another domain and subpath

  • What Grafana version and what operating system are you using?
  • Lastest version on Docker.

Caveat: I need the URL to remain the external one, since there is no access to the internal Grafana, other than via the proxy.

  • How are you trying to achieve it?

I have an internal DMZ HAProxy that does the redirection, but I keep getting the message " 2. If you host grafana under subpath make sure your grafana.ini root_url setting includes subpath. If not using a reverse proxy make sure to set serve_from_sub_path to true."

I’ve set up the required settings but with no results.

I can redirect using the final URL, which is internal, but not using the External.

This is achieved using Grafana or is it an issue with the HAProxy config?

Thanks in advance.


Thank you for your reply but as I said in my post the issue refers to the possibility of using ANOTHER URL to access the Dashboard.
Since the Grafana server IS INSIDE a private NET and the URL we want to use is a Public access URL.
So, those configs assume that we want to access the Grafana URL, but in fact, what I want is to use the HAproxy as the middleman when accessing the Grafana Dash.

I can redirect the URL using the HAproxy, keeping the PUBLIC URL but it gives me the error above.

Settings in place:
Docker compose:

:: This is the one we want
hxxtp-request set-uri if { hdr(host) -i }
:: These work but redirect to the destination URL:
hxxp-request redirect location code 301 if { hdr(host) -i }
hxxp-request set-path /public-dashboards/1632ae78664c

Thanks in advance