I am new to Grafana and have been trying to implement it into my stack. I use Traefik to act as a reverse proxy and load balancer. I was able to setup a rule in Traefik that will point requests visiting my server with the path being exactly /grafana or beginning with /grafana/. This is similar to what is written for configuring Grafana with HAProxy with a sub path.
When I visit my server at https://example.com/grafana I am redirected to https://example.com/grafana/login with a 302. This happens 20 times until Chrome terminates the connection for redirecting too many times. I believe that Grafana is functioning properly but may be incorrectly configured of the reverse proxy and/or Traefik is passing the request to Grafana in a way that confuses Grafana.
I set my Grafana server root URL to /grafana and Traefik has the Grafana service using the following configuration:
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.grafana.rule=Path(`/grafana`) || PathPrefix(`/grafana/`)'
- 'traefik.http.routers.grafana.entrypoints=web'
- 'traefik.http.middlewares.grafana-compress.compress=true'
- 'traefik.http.services.grafana.loadbalancer.server.port=3000'