Elasticsearch-head插件与Elasticsearch-searchguard插件

如果以stand-alone模式来使用elasticsearch-head的话(用一个独立于ES的Web服务伺服elasticsearch-head),并且使用SearchGuard为ES开启Https以及Http Basic Auth的话,参见如下说明:

1、首先,确认Elasticsearch可以接受跨域的Ajax请求,在其配置文件中添加如下选项:

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization

2、访问elasticsearch-head时,在URL上加上 auth_userauth_password 参数,比如以下:

http:// localhost:9100/_plugin/head/?auth_user=admin&auth_password=admin

以上两个参数值,就是SearchGuard为ES添加的Http basic认证的用户名和密码。

3、在elasticsearch-head中,的elasticsearch连接地址处,填入https地址,比如以下:

https://127.0.0.1:9200/

注意是https协议头,之后就可以正常连接了。

转载于:https://my.oschina.net/yumg/blog/1615020

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值