{"id":151567,"date":"2021-11-01T03:55:02","date_gmt":"2021-11-01T03:55:02","guid":{"rendered":"https:\/\/onet.com.vn\/?p=151567"},"modified":"2022-11-13T10:56:33","modified_gmt":"2022-11-13T10:56:33","slug":"cai-dat-ssl-https-grafana-centos-7","status":"publish","type":"post","link":"https:\/\/onet.com.vn\/cai-dat-ssl-https-grafana-centos-7\/","title":{"rendered":"C\u00e0i \u0111\u1eb7t SSL HTTPS Grafana Centos 7"},"content":{"rendered":"
SSL is not installed by default when using the free, self-hosted community edition. If you purchase the cloud version, then SSL is configured automatically by default. You will need sudo access to the servers\u00a0\/etc\/grafana\/grafana.ini<\/strong>\u00a0file. Look for the HTTP options:<\/p>\n There are two key fields that need changing in the\u00a0Grafana.ini<\/strong>\u00a0file:<\/p>\n [server] I am using Red Hat Linux, but this will work on CentOS as well. You may need to check your appropriate documentation if you are using another flavor of Linux.<\/p>\n From the command line type:<\/p>\n <\/p>\n You should see output like this:<\/p>\nGrafana HTTP options<\/h2>\n
\nhttp_addr = dashboard.yourdomain<\/strong>.co.uk
\nhttp_port = 3000
\ndomain = yourdomain.co.uk
\nroot_url = https:\/\/grafana.yourdomain<\/strong>.co.uk:3000
\ncert_key\u00a0<\/strong>= \/etc\/grafana\/grafana.key<\/code>
\nenforce_domain = False
\nprotocol\u00a0<\/strong>= https<\/code>
\nsocket =
\nenable_gzip = False
\ncert_file = \/etc\/grafana\/grafana.crt
\nstatic_root_path = public
\nrouter_logging = False<\/p>\nStep 1 \u2013 Create an SSL Certificate<\/h2>\n
openssl genrsa -out grafana.key 2048\r\n<\/code><\/pre>\n