【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/,可以直接登录。

相关推荐
Irissgwe8 小时前
五、应用层协议HTTP
linux·网络·网络协议·http·状态码·url
曾阿伦9 小时前
Python 搭建简易HTTP服务
开发语言·python·http
米丘12 小时前
浏览器 本地存储 (cookie 、sessionStorage、localStorage)
安全·http·浏览器
Irissgwe14 小时前
5-2 - HTTPS 协议原理
网络协议·http·https·非对称加密·ca·https协议原理
sugar__salt14 小时前
LLM服务HTTP接口实战:前端HTTP请求全解与项目落地
前端·网络协议·http
雪的季节14 小时前
HTTP 和 HTTPS 五大核心区别
数据库·http·https
代码中介商18 小时前
HTTP 完全指南(二):缓存机制深度详解
网络协议·http·缓存
Irissgwe20 小时前
5-1、HTTP cookie与session
linux·http·cookie·session
蜀道山老天师20 小时前
Docker 实战教程:从基础流程到云桌面、Zabbix 监控、Portainer 可视化部署
运维·docker·云原生·容器·zabbix
开发者联盟league21 小时前
container登录失败解决方法。http: server gave HTTP response to HTTPS client
数据库·http·https