【转载】Securing Kibana + Elasticsearch
from: http://tom.meinlschmidt.org/2014/05/19/securing-kibana-elasticsearch/
After some successful setup of Kibana + es for fluentd there’s a need to secure whole website.
So I decided to use nginx and basic auth. I assume you have standard configuration – with es running on localhost:9200.
# htpasswd -c /opt/nginx/conf/.htpasswd some_user
and now modify nginx config:
#user nobody;
#group nogroup;
worker_processes 5;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
keepalive_timeout 65;
gzip on;
server {
# we listen on :8080
listen 8080;
server_name somer.server;
charset utf-8;
access_log logs/host.access.log main;
# root for Kibana installation
location / {
auth_basic "Restricted";
auth_basic_user_file /opt/nginx/conf/.htpasswd;
root /opt/kibana;
index index.html index.htm;
}
# and for elasticsearch
location /es {
auth_basic "Restricted - ES";
auth_basic_user_file /opt/nginx/conf/.htpasswd;
rewrite ^/es/_aliases$ /_aliases break;
rewrite ^/es/_nodes$ /_nodes break;
rewrite ^/es/(.*/_search)$ /$1 break;
rewrite ^/es/(.*/_mapping)$ /$1 break;
rewrite ^/es/(.*/_aliases)$ /$1 break;
rewrite ^/es/(kibana-int/.*)$ /$1 break;
return 403;
# set some headers
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://localhost:9200;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
【转载】Securing Kibana + Elasticsearch的更多相关文章
- Logstash+kibana+ ElasticSearch+redis
这是之前Logstash+kibana+ ElasticSearch+redis 安装时,自己整理的初学者容易看懂的资料,按照以下的步骤也已经完成了安装. 这里有二台服务器: 192.168.148. ...
- log4net.redis+logstash+kibana+elasticsearch+redis 实现日志系统
前端时间写了个随笔 log4net.NoSql +ElasticSearch 实现日志记录 ,因项目原因需要把日志根java平台的同事集成采用logstash+kibana+elasticsearch ...
- 安装logstash+kibana+elasticsearch+redis搭建集中式日志分析平台
安装logstash+kibana+elasticsearch+redis搭建集中式日志分析平台 2014-01-16 19:40:57| 分类: logstash | 标签:logstash ...
- 【原创】运维基础之Docker(2)通过docker部署zookeeper nginx tomcat redis kibana/elasticsearch/logstash mysql kafka mesos/marathon
通过docker可以从头开始构建集群,也可以将现有集群(配置以及数据)平滑的迁移到docker部署: 1 docker部署zookeeper # usermod -G docker zookeeper ...
- Kibana + ElasticSearch
上面一张介绍了ElasticSearch的安装和简单用法. 现在应该都知道ElasticSearch是用来做全文搜索的,那今天我就简单介绍下Kibana. 它是专门用来查看ElasticSearch内 ...
- Helm3 安装 ElasticSearch & Kibana 7.x 版本
文章转载自:http://www.mydlq.club/article/13/ 系统环境: helm 版本:v3.2.1 Kubernetes 版本:1.18.3 ElasticSearch Char ...
- fluentd结合kibana、elasticsearch实时搜索分析hadoop集群日志<转>
转自 http://blog.csdn.net/jiedushi/article/details/12003171 Fluentd是一个开源收集事件和日志系统,它目前提供150+扩展插件让你存储大数据 ...
- ElasticSearch、Kibana 启动(含前台和后台启动、停止)(含界面浏览)
前提: Elasticsearch-2.4.3的下载(图文详解) Elasticsearch-2.4.3的单节点安装(多种方式图文详解) Elasticsearch-2.4.3的3节点安装(多种方式图 ...
- 搜索引擎elasticsearch + kibana + X-pack + IK安装部署
目录 准备安装环境 配置启动 启动elasticsearch 启动kibana 启用X-pack 安装使用IK 使用示例 官方Clients 准备安装环境 这次我们安装以下软件或插件: elastic ...
随机推荐
- java中怎么在table上显示数据
连接oracle:String result = ""; // 查询结果字符串 String sql = "select * from test"; // SQ ...
- 【个人使用.Net类库】(4)验证码类
验证码是现在管理系统常用的一种保护用户帐户信息的一种功能. 验证码可以有效防止某个黑客对某一个特定注册用户用特定程序暴力破解方式进行不断的登录尝试,虽然这可能是我们登录麻烦一点,但是对用户的密码安全来 ...
- android 定时器AlarmManager
1.android中通常是使用AlarmManager来定时启动一个单次或重复多次操作的.具体的说就是我们通过AlarmManager设定一个时间和注册一个intent到系统中,然后在该时间到来时,系 ...
- 关于Oracle10G在库内导数据时,用到的更新语句----ZT
两种方法: -- 方法1. UPDATE 表2 SET 表2.C = (SELECT B FROM 表1 WHERE 表1.A = 表2.A) WHERE EXIST ...
- webApp--cordova 系列1
1.在node,npm 可用的前提下 npm install -g cordova 大约10分钟后装完,cmd中输入cordova -v 验证是否安装成功 2.cordova项目打包是用ant完成, ...
- HDU 3006
http://acm.hdu.edu.cn/showproblem.php?pid=3006 注意到集合内数字最大只有14,状态压缩一下,然后枚举出所有状态 #include <iostream ...
- 不让padding影响元素的宽度
CSS3 新增了 box-sizing 属性. 以前,如果指定 div 的宽度为 div { width: 100px; height: 100px; padding: 10px; } 则包含 pad ...
- 基于MPI的并行计算—矩阵向量乘
以前没接触过MPI编程,对并行计算也没什么了解.朋友的期末课程作业让我帮忙写一写,哎,实现结果很一般啊.最终也没完整完成任务,惭愧惭愧. 问题大概是利用MPI完成矩阵和向量相乘.输入:Am×n,Bn× ...
- poj1026 Cipher ——置换群
link:http://poj.org/problem?id=1026 其实这道题目和poj2369这道题目一样. 都是基础的置换群题目.把那道题目理解了,这道题就没问题了. 不过我的方法貌似比较挫, ...
- 深入解读Linux与Android的相互关系(转-lining)
大家都知道Android是基于Linux内核的操作系统,也曾经和Linux基金会因为内核问题产生过分歧,本文将开始对Android的内核进行剖析,主要介绍Android和Linux之间的关系,后续还会 ...