网站首页 > 技术教程 正文
概述
今天主要介绍一下如何将grafana地址配到abc.com域名的/grafana/的location下,也就是用户访问访问http://abc.com/grafana正常跳转到内网的grafana地址,类似MQ配置。
这里简单做个记录。
一、nginx配置
相关配置如下:
nginx配置没啥好讲的,主要是grafana配置需要注意下...
二、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方面的内容,感兴趣的朋友可以关注下~
猜你喜欢
- 2024-10-10 使用 nginx 同域名下部署多个 vue 项目,并使用反向代理
- 2024-09-12 踩坑记录之MinIO添加HTTPS访问(邮箱访问记录多地登录失败是否意味着邮箱被侵入)
- 2024-09-12 申请免费证书、域名解析以及nginx部署配置https为微信小程序服务
- 2024-09-12 Nginx快速入门之Nginx反向代理与负载均衡
- 2024-09-12 宝塔面板如何用uwsgi与nginx快速部署Django项目
- 2024-09-12 使用 nginx 实现在同一个微信公众号授权域名下访问正式版和测试版
- 2024-09-12 使用nginx:1.24.0-bullseye部署Nginx域名、端口、子目录配置方法
- 2024-09-12 Nginx实现301跳转至https的根域名展示
- 2024-09-12 配置nginx代理grafana实现域名访问
- 2024-09-12 关于TP3.2 nginx下配置子域名(nginx 配置php)
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)
本文暂时没有评论,来添加一个吧(●'◡'●)