Kibana4使用nginx作反向代理
上一节讲到 linux下安装kibana 并配置文件、启动应用。linux下安装kibana
有时我们会有这么一种需求,就是你的网站并不想提供一个公共的访问或者某些页面不希望公开,我们希望的是某些特定的客户端可以访问。那么我们可以在访问时要求进行身份认证,就如给你自己的家门加一把锁,以拒绝那些不速之客。
Nginx如何让用户通过用户名密码认证访问
一、配置 kibana.yml
修改 server.host: "127.0.0.1" # 注意这里为127.0.0.1而不是localhost。
如果是localhots 会报错 no resolver defined to resolve localhost, 然后页面展示 502 错误,暂时还不清楚为什么,改为127.0.0.1即可。
二、重启kibana
./kibana
log Status changed from uninitialized to green - Ready
log Status changed from uninitialized to yellow - Waiting for Elasticsearch
log Status changed from uninitialized to green - Ready
log Status changed from uninitialized to green - Ready
log Status changed from uninitialized to green - Ready
log Status changed from uninitialized to green - Ready
log Status changed from yellow to green - Kibana index ready
log Status changed from uninitialized to green - Ready
log Status changed from uninitialized to green - Ready
log Server running at http://127.0.0.1:5601
三、重启 nginx
./nginx -s reload
页:
[1]