本篇内容主要讲解“kibana中怎么设置访问账号密码”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“kibana中怎么设置访问账号密码”吧!
步骤一:虚拟机上安装nginx
[avatar@search3.es.test.bj1 ~]$ sudo yum install nginx
已安装:
nginx.x86_64 0:1.6.2-23.el6.art
作为依赖被安装:
GeoIP.x86_64 0:1.6.5-1.el6 GeoIP-GeoLite-data.noarch 0:2015.04-2.el6 GeoIP-GeoLite-data-extra.noarch 0:2015.04-2.el6 geoipupdate.x86_64 0:2.2.1-2.el6
完毕!
步骤二:查看nginx版本
[avatar@search3.es.test.bj1 ~]$ nginx -v
nginx version: nginx/1.6.2
步骤三:安装密码管理器
[avatar@search3.es.test.bj1 ~]$ sudo yum install httpd-tools
已安装:
httpd-tools.x86_64 0:2.2.15-69.el6.centos
完毕!
步骤四:生成密码
[avatar@search3.es.test.bj1 ~]$ sudo htpasswd -c /etc/nginx/htpasswd.users demo_user
New password:
Re-type new password:
Adding password for user demo_user
步骤五:配置nginx代理kibana, 并登录验证
[avatar@search3.es.test.bj1 ~]$ sudo vim /etc/nginx/conf.d/default.conf
server {
listen 80; # 开放80端口
server_name _;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
# root /usr/share/nginx/html;
# index index.html index.htm;
# example
#ModSecurityEnabled on;
#ModSecurityConfig /etc/nginx/modsecurity.conf;
auth_basic "Please input password";
auth_basic_user_file /etc/nginx/htpasswd.users;
proxy_pass http://10.1.34.104:5601; # 这里配置成你需要访问的地址
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
}
步骤六:重启nginx服务, 实现登录验证
[avatar@search3.es.test.bj1 ~]$ sudo service nginx restart
步骤七:访问kibana
http://10.1.34.104/app/monitoring#/overview?_g=(cluster_uuid:A0o2TYolT8e1985bybup5A)
步骤八:结束
注意:
关闭kibana5601端口
直接访问,不用带端口号
到此,相信大家对“kibana中怎么设置访问账号密码”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。
原文链接:https://my.oschina.net/u/3727895/blog/4684157