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

相关推荐
阿pin2 小时前
HTTP 与 HTTPS 详解
网络协议·http·https
一条泥憨鱼2 小时前
【从0开始学习计算机网络】| CA证书、数字签名与中间人攻击:一次完整的安全握手之旅
计算机网络·安全·http·https
阿pin2 小时前
HTTP 协议的演进
网络·网络协议·http
小小龙学IT15 小时前
Boost.Beast 深度实战:基于 Asio 的开源 C++ HTTP/WebSocket 协议库
c++·websocket·http
ryan_99618 小时前
MCP Transport 完整指南:stdio 与 Streamable HTTP 到底怎样传消息
网络·网络协议·http
teak_on_my_way1 天前
外网通过 Nginx 访问 Doris Stream Load:一次 HTTP 307 疑难排查与完整代理方案
运维·数据库·nginx·http
艺术留白1 天前
MokaTest使用篇-HTTP接口
网络·网络协议·http
bbq粉刷匠1 天前
HTTP 深度解析
网络·网络协议·http
ControlRookie2 天前
第15篇_Client 04|GET、POST 和 Body 怎样保持一致
http·codesys·plc通信·controlrookie
张小姐的猫2 天前
【Linux】网络编程 —— 传输层协议 TCP(下)
linux·运维·服务器·网络·tcp/ip·http·php