Kibana使用Nginx进行登录认证
2022/2/22 7:25:01
本文主要是介绍Kibana使用Nginx进行登录认证,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
使用nginx的代理功能了。
1、安装Nginx:
1 |
[root@ELK /] # yum -y install nginx
|
2、安装Apache密码生产工具:
1 |
[root@ELK /] # yum install httpd-tools
|
3、生成密码文件:
1 2 |
[root@ELK /] # mkdir -p /etc/nginx/passwd
[root@ELK /] # htpasswd -b /etc/nginx/passwd/kibana.passwd user ******
|
4、配置Nginx:
1 2 |
[root@ELK /] # cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.backup
[root@ELK /] # vim /etc/nginx/conf.d/default.conf
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#/etc/nginx/conf.d/default
server {
listen 192.168.75.150:5601;
auth_basic "Kibana Auth" ;
auth_basic_user_file /etc/nginx/passwd/kibana . passwd ;
location / {
proxy_pass http: //127 .0.0.1:5601;
proxy_redirect off;
}
}
|
5、修改Kibana配置文件:
1 2 3 4 |
[root@ELK /] # vim /usr/local/elk/kibana/config/kibana.yml
# The host to bind the server to.
server.host: "localhost"
|
6、重启Kibana服务,配置文件生效:
1 |
[root@ELK /] # su - elk --command="/usr/local/kibana/bin/kibana serve &"
|
7、重启Nginx服务:
1 |
[root@ELK /] # service nginx restart
|
这篇关于Kibana使用Nginx进行登录认证的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-03-29fail2ban nginx
- 2024-03-18install nginx proxy manager
- 2024-01-2444从零开始用Rust编写nginx,命令行参数的设计与解析及说明
- 2024-01-22比Nginx更好用的Gateway!
- 2024-01-17nginx daemon off
- 2023-12-30Nginx Vhost Traffic Status 是什么意思-icode9专业技术文章分享
- 2023-12-26使用nginx搭建creates.io镜像(稀疏索引)
- 2023-11-18centos7编译安装Nginx教程。
- 2023-11-02nginx启动命令和停止命令
- 2023-10-25Centos7系统Nginx负载均衡如何安装和配置?