Friday, September 30, 2016

ENABLING KIBANA AUTHENTICATION USING NGINX:


  1. Install nginx:
    1. rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
    2. yum -y install nginx httpd-tools
  2. Set one username & password
    1. htpasswd -c /etc/nginx/conf.d/kibana.htpasswd admin
  3. Configure Nginx
    1. vi /etc/nginx/conf.d/kibana.conf
    2. server {
      listen *:8080;
      server_name 192.168.1.5;
      access_log /var/log/nginx/kibana-access.log;
      error_log /var/log/nginx/kibana-error.log;
      location / {
      auth_basic "Restricted Access";
      auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd;
      proxy_pass http://192.168.1.5:5601;
      #proxy_connect_timeout 150;
      #proxy_send_timeout 100;
      #proxy_read_timeout 100;
      }
      }
  4. Restart Nginx
    1. sudo service nginx restart
  5. Go to the URL : http://192.168.1.5:8080, we should get a authentication screen on successful setup

  NOTE: In case if it doesn't work:


  1. Disable the selinux by running the command
    1. sudo setsebool -P httpd_can_network_connect 1


    2. sudo service nginx restart

No comments:

Post a Comment

Terraform Cheat Sheet [WIP]

Installing Terraform