ENABLING KIBANA AUTHENTICATION USING NGINX:
- Install nginx:
- rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
- yum -y install nginx httpd-tools
- Set one username & password
- htpasswd -c /etc/nginx/conf.d/kibana.htpasswd admin
- Configure Nginx
vi/etc/nginx/conf.d/kibana.confserver {
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;
}
}- Restart Nginx
- sudo service nginx restart
- 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:
- Disable the selinux by running the command
sudosetsebool -P httpd_can_network_connect 1sudo service nginx restart
No comments:
Post a Comment