# Root\_url to custom path is not working with reverse HaProxy / Grafana

**URL:** <https://community.grafana.com/t/root-url-to-custom-path-is-not-working-with-reverse-haproxy-grafana/12715>\
**Category:** Configuration\
**Created:** [December 10, 2018, 2:22pm UTC](https://community.grafana.com/t/root-url-to-custom-path-is-not-working-with-reverse-haproxy-grafana/12715 "2018-12-10T14:22:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vyankatesh](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@vyankatesh](https://community.grafana.com/u/vyankatesh)\
**Post date:** [December 10, 2018, 2:22pm UTC](https://community.grafana.com/t/root-url-to-custom-path-is-not-working-with-reverse-haproxy-grafana/12715/1 "2018-12-10T14:22:29Z")

</div>

I am trying to use **HAProxy** to proxy to Grafana with end point ‘/grafana’. For that I happened to change root\_url in my ini file to " root\_url = %(protocol)s://%(domain)s:%(http\_port)s/grafana/ "

I tried to invoke Grafana endpoint with these settings

```auto
frontend HTTP-in
  use_backend grafana_backend if { path_beg /grafana/ }

```

```auto
backend grafana_backend
http-request set-path %[path,regsub(^/grafana/?,/)]

```

but those solutions do not seem to work for me with HAProxy.
