美文网首页
Running Grafana on HTTPS

Running Grafana on HTTPS

作者: Kassadar | 来源:发表于2019-07-16 12:27 被阅读0次

Running Grafana on HTTPS

安装 openssl

yum install -y openssl

创建 certificates

openssl req -x509 -out localhost.crt -keyout localhost.key \
  -newkey rsa:2048 -nodes -sha256 \
  -days 10000 \
  -subj '/CN=localhost' -extensions EXT -config <( \
   printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")

生成的 crt & key 文件

localhost.crt
localhost.key

配置 grafana.ini

[server]
protocol = https
...
cert_file = .../localhost.crt
cert_key = .../localhost.key

重启 grafana

systemctl restart grafana.service

访问 grafana

https://localhost:3000

相关文章

网友评论

      本文标题:Running Grafana on HTTPS

      本文链接:https://www.haomeiwen.com/subject/eabzkctx.html