今天主要介绍一下如何将grafana地址配到abc.com域名的/grafana/的location下,也就是用户访问访问http://abc.com/grafana正常跳转到内网的grafana地址,类似MQ配置。
这里简单做个记录。
相关配置如下:
nginx配置没啥好讲的,主要是grafana配置需要注意下...
在grafana配置文件(/etc/grafana/grafana.ini)中修改,配置后重启grafana
#################################### Server ####################################
[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
#默认3000,所以上面nginx也代理3000端口,这部分也可以改成任意端口号
http_port = 3000
# The public facing domain name used to access grafana from a browser
#配置外部访问域名
domain = app.xxx.com
# 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 = https://app.xxx.com/grafana内网主要是配置domain和root_url了。
1、外网访问https://app.XX/grafana
2、内网访问http://IP:3000
觉得有用的朋友多帮忙转发哦!后面会分享更多devops和DBA方面的内容,感兴趣的朋友可以关注下~
版权声明:我们致力于保护作者版权,注重分享,被刊用文章【代理访问(详解Grafana配置nginx反向代理域名访问)】因无法核实真实出处,未能及时与作者取得联系,或有版权异议的,请联系管理员,我们会立即处理! 部分文章是来自自研大数据AI进行生成,内容摘自(百度百科,百度知道,头条百科,中国民法典,刑法,牛津词典,新华词典,汉语词典,国家院校,科普平台)等数据,内容仅供学习参考,不准确地方联系删除处理!;
工作时间:8:00-18:00
客服电话
电子邮件
beimuxi@protonmail.com
扫码二维码
获取最新动态
