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

相关推荐
帐篷Li13 小时前
创建Controller HTTP测试脚本
网络·网络协议·http
本地化文档14 小时前
requests-docs-l10n
python·http·github·gitcode
We་ct16 小时前
EventSource & WebSocket & HTTP
前端·javascript·网络·websocket·网络协议·http·面试
帐篷Li16 小时前
ONVIF Server 功能完善开发计划
网络·网络协议·http
lifewange1 天前
https和http有什么区别
网络协议·http·https
空中海1 天前
5.1 HTTP 与网络请求
网络·网络协议·flutter·http
Flash.kkl1 天前
应用层协议HTTP
网络·网络协议·http
亿牛云爬虫专家1 天前
生产级Go高并发爬虫实战:突破 net_http 长连接与隧道代理IP切换陷阱
爬虫·http·golang·代理ip·keepalive·隧道代理·https connect
止语Lab2 天前
从一行超时配置到分布式可观测性——Go HTTP服务的渐进式演进实战
分布式·http·golang
上海云盾安全满满2 天前
http与https有什么区别,https攻击要如何防护
网络协议·http·https