首页 > Web开发 > 详细

Kibana通过nginx配置https

时间:2020-05-20 23:49:31      阅读:205      评论:0      收藏:0      [点我收藏+]

   经常遇到需要把http配置成https的情况,但是在配置kibana的时候加上路径可能会遇到困难,不加路径没有问题,这里说的是假路径,因为kibana的跳转路径是他自己写死的,例如登录等,其实只需要nginx配置kibana一起配置即可。

 

  1.nginx常规配置,配的443端口给到kibana

  

 1 server {
 2         listen                  443 ssl;
 3         #listen                 10080;
 4         server_name             _;
 5         #ssl                    on;
 6         ssl_certificate         /isearch/nginx/conf/ssl/server.crt; # 改成你的证书的名字
 7         ssl_certificate_key     /isearch/nginx/conf/ssl/server.key; # 你的证书的名字
 8         ssl_verify_depth        1;
 9         #charset                koi8-r;
10 
11         #access_log  logs/host.access.log  main;
12         error_page 404 403 500 502 503 504 /404.html;
13         
14         location = /404.html {
15             root    /isearch/nginx/html;
16         }
17 
18     
19         location /els {
20                         proxy_pass http://192.168.0.184:5601;
21                 }   
22 }

 

这里配置了路径为els,那么接下来我们需要去配置kibana所对应的配置

 

2.kibana对应的配置

 

  

 1 # Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
 2 # The default is ‘localhost‘, which usually means remote machines will not be able to connect.
 3 # To allow connections from remote users, set this parameter to a non-loopback address.
 4 server.host: "192.168.0.184"
 5 
 6 # Enables you to specify a path to mount Kibana at if you are running behind a proxy.
 7 # Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
 8 # from requests it receives, and to prevent a deprecation warning at startup.
 9 # This setting cannot end in a slash.
10 server.basePath: "/els"
11 
12 # Specifies whether Kibana should rewrite requests that are prefixed with
13 # `server.basePath` or require that they are rewritten by your reverse proxy.
14 # This setting was effectively always `false` before Kibana 6.3 and will
15 # default to `true` starting in Kibana 7.0.
16 server.rewriteBasePath: true

 

 

 

这里面重点是

  1.server.basePath: "/els"  这个配置需要个nginx里面一致。

  2.server.rewriteBasePath: true  这个配置需要打开

 

 

 

目前这个是我遇到nginx配置kibana的https遇到的问题。

  

 

Kibana通过nginx配置https

原文:https://www.cnblogs.com/insearch/p/12926997.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!