Grafana - 使用带 URL 重写的 IIS 作为反向代理
Grafana - Use IIS with URL Rewrite as a Reverse Proxy
我想让Grafana成为IIS中某个网站下的子路径或子文件夹,添加ssl证书,使用https。
我查看了这个教程:https://grafana.com/tutorials/iis/
defaults.ini
# The http port to use
http_port = 3000
# 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
root_url = %(protocol)s://%(domain)s:%(http_port)s/
custom.ini
# The http port to use
;http_port = 8080
# The public facing domain name used to access grafana from a browser
domain = localhost:8080
# 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/ds/
root_url = %(protocol)s://%(domain)s/ds/
在 http://localhost:8080/ds
我收到连接被拒绝的消息。所以这个端口没有被任何 运行 应用程序使用。
在 http://localhost:3000/
我明白了:
If you're seeing this Grafana has failed to load its application files
1. This could be caused by your reverse proxy settings.
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.
3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build
4. Sometimes restarting grafana-server can help
IIS URL 重写设置:
根据https://grafana.com/tutorials/run-grafana-behind-a-proxy/#1
[server]
domain = example.com
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = true
我想让Grafana成为IIS中某个网站下的子路径或子文件夹,添加ssl证书,使用https。
我查看了这个教程:https://grafana.com/tutorials/iis/
defaults.ini
# The http port to use
http_port = 3000
# 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
root_url = %(protocol)s://%(domain)s:%(http_port)s/
custom.ini
# The http port to use
;http_port = 8080
# The public facing domain name used to access grafana from a browser
domain = localhost:8080
# 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/ds/
root_url = %(protocol)s://%(domain)s/ds/
在 http://localhost:8080/ds
我收到连接被拒绝的消息。所以这个端口没有被任何 运行 应用程序使用。
在 http://localhost:3000/
我明白了:
If you're seeing this Grafana has failed to load its application files
1. This could be caused by your reverse proxy settings.
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.
3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build
4. Sometimes restarting grafana-server can help
IIS URL 重写设置:
根据https://grafana.com/tutorials/run-grafana-behind-a-proxy/#1
[server]
domain = example.com
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = true