Recently I am doing the proxy configuration for grafana. I used an Apache httpd server as the reverse proxy server and I followed the instruction of http://docs.grafana.org/installation/behind_proxy/ and it works.
However, I am confused with the attributes server.domain and server.root_url. The docs say server.root_url should be exact the one you put in your browser and server.domain is just the domain part of server.root_url. I am wondering how are they working? I mean as long as the DNS server gives the mapped grafana server for the url, grafana should work, right? Also, what if I deploy grafana inside a docker container? I could not determine the domain since the host ip will be different.
In fact, I have tried put server.domain as a dummy string and keep the domain part of server.root_url the same with it, grafana also works.
Here is an example config I use:
apache httpd proxy config:
ProxyPass /grafana/ http://localhost:3000/ ProxyPassReverse /grafana/ http://localhost:3000/
With the above config, when I put “httpd_server_ip/grafana/” I can also get grafana login page.