Running Grafana on HTTPS
安裝 openssl
yum install -y openssl
創(chuàng)建 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
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者