'Domain/ELK'에 해당되는 글 1건

Reverse proxy by using nginx

Kibana supports basic authentification (See elasticsearch 7.4).
That is, we can use basic access authentication (See wikipedia for details)
Then, reverse proxy can be good solution for this issue. Here is sample configuration of Nginx for this purpose.


docker-composer.yml

version: '3'

services:
  reverseProxy:
    container_name: reverseProxy
    hostname: reverseProxy
    image: nginx
    ports:
      - 5601:5601
    volumes:
      - ./nginx:/etc/nginx

*nginx.conf*
events {
}

http {
upstream kibana {
server KIBANA.IP.ADDR.NUM:5601;
}

server {
listen 5601;
server_name reverse.kibana.com;

location / {
  proxy_pass        http://kibana;
  proxy_set_header  X-Real-IP           $remote_addr;
  proxy_set_header  X-Forwarded-For     $proxy_add_x_forwarded_for;
  proxy_set_header  X-Forwarded-Proto   $scheme;
  proxy_set_header  Host                $host;
  proxy_set_header  X-Forwarded-Host    $host;
  proxy_set_header  X-Forwarded-Port    $server_port;
  # ID:PW base64 encoded value (RFC 7617)
  proxy_set_header  Authorization       "Basic QWxhZGRpbjpPcGVuU2VzYW1l";
}

}
}

'Domain > ELK' 카테고리의 다른 글

[ELK] Passing sign-in at Kibana when embedding dashboard by using iframe.  (0) 2019.10.15
블로그 이미지

yhcting

댓글을 달아 주세요