[server]
# Protocol (http, https, h2, socket)
protocol = http
# The ip address to bind to, empty will bind to all interfaces
;http_addr =
# The http port to use
http_port = 8080
# The public facing domain name used to access grafana from a browser
domain = localhost
# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
;enforce_domain = false
# The full public facing url you use in browser, used for redirects and emails
# If you use reverse proxy and sub path specify full url (with sub path)
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
serve_from_sub_path = true
Hey! I meet the same problem. This is how I solve it:
In IIS URL rewrite, replace http://localhost:8080{R:2} with http://localhost:8080{R:0}
. Then the IIS works right.
The doc here need be updated: hhttps://grafana.com/tutorials/iis/
You can not set root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
with <rule name="Grafana Inbound Rule" enabled="true" stopProcessing="true"> <match url="grafana(/)?(.*)" /> <action type="Rewrite" url="``http://localhost:8080``{R:2}" logRewrittenUrl="false" /> </rule>
at same time. root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/