# yum -y install httpd-tools
# htpasswd -bc /usr/local/nginx/conf/htpasswd.users admin 123456
upstream kibana_server {
server 192.168.91.215:5601 weight=1 max_fails=3 fail_timeout=60;
}
server {
listen 80;
server_name www.kibana.com;
access_log /data/nginx/logs/kibana/access.log json;
auth_basic "Restricted Access";
auth_basic_user_file /usr/local/nginx/conf/htpasswd.users;
location / {
proxy_pass http://kibana_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}