【zabbix7】开启HTTP authentication实现单点登录

开启HTTP authentication实现单点登录

一、新建http验证用户
bash 复制代码
htpasswd -c /etc/nginx/.htpasswd another_username
# 在提示中输入密码
二、新建Nginx配置文件

把zabbix.conf拷贝一份,然后修改listen监听的端口。

复制代码
cp zabbx.conf zabbix_http.conf
每个location中新增两行
server {
		listen          89;
        ...
        location = /favicon.ico {
                auth_basic "Restricted Content";
                auth_basic_user_file /etc/nginx/.htpasswd;
                log_not_found   off;
        }
        ...
}
三、启动nginx
复制代码
systemctl restart nginx
四、配置zabbix开启HTTP authentication

点击web界面找到用户--认证--HTTP设置

五、新建用户并设置登录后url

新建用户后,需要设置登录后url否则会出现登录后前端界面ui乱掉的问题。

六、验证

退出登录可以看到登录界面多了一个"使用HTTP登录",此时点击登录是无法登录的,因为我们界面访问的是80端口,可以http登录的是89端口,访问89端口如下

输入账号密码即可登录。

七、单点登录

配置一些跳转按钮url链接为http://another_username:another_password@192.168.113.161:89/,可以直接登录。

相关推荐
win x4 小时前
深入理解HTTPS协议加密流程
网络协议·http·https
仙俊红5 小时前
从 Filter / Interceptor 到 HTTPS
网络协议·http·https
liann1195 小时前
3.1_网络——基础
网络·安全·web安全·http·网络安全
三水不滴1 天前
计算机网络核心网络模型
经验分享·笔记·tcp/ip·计算机网络·http·https
SunflowerCoder1 天前
基于插件化 + Scriban 模板引擎的高效 HTTP 协议中心设计
http·c#
Remember_9931 天前
MySQL 索引详解:从原理到实战优化
java·数据库·mysql·spring·http·adb·面试
Zach_yuan1 天前
从零理解 HTTP:协议原理、URL 结构与简易服务器实现
linux·服务器·网络协议·http
JQLvopkk1 天前
C# 实现Http Json格式 Post 、Get 方法请求 winform服务器
http·c#·json
csdn2015_2 天前
Spring Boot `HttpServletRequest`
spring boot·http·servlet
Re.不晚2 天前
JAVA进阶之路——网络通信的层级密码:Socket切入,理解TCP与HTTP协议
java·tcp/ip·http