Home  >  Article  >  Operation and Maintenance  >  How to implement kibana login authentication through Nginx reverse proxy

How to implement kibana login authentication through Nginx reverse proxy

PHPz
PHPzforward
2023-05-12 22:01:171468browse

How to implement kibana login authentication through Nginx reverse proxy
##Install Apache Httpd password generation tool

$ yum install httpd-tools -y

Generate Kibana authentication password

$ mkdir -p /usr/local/nginx/conf/passwd
$ htpasswd -c -b /usr/local/nginx/conf/passwd/kibana.passwd Userrenwolecom GN5SKorJ
Adding password for user Userrenwolecom

Configure Nginx reverse proxy

Add the following content to the Nginx configuration file (or include it in a new configuration file):

$ vim /usr/local/nginx/conf/nginx.conf

server {
listen 10.28.204.65:5601;
auth_basic "Restricted Access";
auth_basic_user_file /usr/local/nginx/conf/passwd/kibana.passwd;
location / {
proxy_pass http://10.28.204.65:5601;
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;
}
}

Configure Kibana

Uncomment the following:

$ vim /usr/local/kibana/config/kibana.yml

server.host: "10.28.204.65"

Restart Kibana and Nginx services to make the configuration effective

$ systemctl restart kibana.service
$ systemctl restart nginx.service

Next, when the browser accesses http://103.28.204.65:5601/, a verification pop-up window will appear. Enter the user password generated above to log in.

The above is the detailed content of How to implement kibana login authentication through Nginx reverse proxy. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete