首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Grafana -将IIS与URL重写一起用作反向代理

Grafana -将IIS与URL重写一起用作反向代理
EN

Stack Overflow用户
提问于 2020-12-17 13:46:20
回答 1查看 494关注 0票数 0

我希望Grafana成为IIS中网站下的子路径或子文件夹,添加ssl证书,使用https。

我已经查看了本教程:https://grafana.com/tutorials/iis/

defaults.ini

代码语言:javascript
复制
# 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

代码语言:javascript
复制
# 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/上我得到了这样的信息:

代码语言:javascript
复制
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重写设置:

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-12-17 14:42:31

根据https://grafana.com/tutorials/run-grafana-behind-a-proxy/#1

代码语言:javascript
复制
[server]
domain = example.com
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = true
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65341966

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档