2016-10-10 4 views
3

私のサーバー上でgrafanaインスタンスを正常に実行しました。 httpで問題なく実行されます。今度はhttpからhttpsに切り替える必要があります。私grafana.iniは怒鳴るようになります。grafanaをhttpからhttpsに切り替える

#################################### Server #################################### 
[server] 
# Protocol (http or https) 
protocol = https 

# The ip address to bind to, empty will bind to all interfaces 
http_addr = 0.0.0.0 

# The http port to use 
http_port = 3000 

# The public facing domain name used to access grafana from a browser 
;domain = localhost 

# Redirect to correct domain if host header does not match domain 
# Prevents DNS rebinding attacks 
;enforce_domain = false 

# The full public facing url 
;root_url = %(protocol)s://%(domain)s:%(http_port)s/ 

# Log web requests 
;router_logging = false 

# the path relative working path 
;static_root_path = public 

# enable gzip 
;enable_gzip = false 

# https certs & key file 
cert_file = /usr/local/ssl/crt/certificate.cer 
cert_key = /usr/local/ssl/private/private_key.key 
+1

grafanaのログ出力を確認しましたか? – AussieDan

+0

@AussieDan悲しいことに、ログには何も表示されません。 – IIIIIIIIIIIIIIIIIIIIII

+0

のように、それは完全に空ですか?証明書ファイルへのパスが有効であり、ユーザgrafana-serverが動作していることを読めるように実行されている限り、あなたの設定に問題はありません。 – AussieDan

答えて

2

上記の構成に問題がある可能性があります:「grafanaサーバ」サービスgrafana.iniファイルを変更した後に再起動しません。前述したように

  1. 変更grafana.ini

    は、ここで私は私の問題を解決する方法です。

  2. 証明書ファイル(pem、crt、およびkey)を/etc/grafanaにコピーします。
  3. 証明書ファイルのファイルアクセス許可を644(go+r)に、所有者をroot:rootに変更します。

その後、grafanaサービスはHTTPSモードで正常に動作します。

関連する問題