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

开启HTTP authentication实现单点登录

一、新建http验证用户
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/,可以直接登录。

相关推荐

  1. C# OAuth登录实现

    2024-07-15 17:40:04       35 阅读
  2. ca登录

    2024-07-15 17:40:04       63 阅读
  3. sso登录

    2024-07-15 17:40:04       29 阅读
  4. 登录设备登录

    2024-07-15 17:40:04       43 阅读
  5. 什么是登录以及如何实现

    2024-07-15 17:40:04       42 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-15 17:40:04       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-15 17:40:04       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-15 17:40:04       58 阅读
  4. Python语言-面向对象

    2024-07-15 17:40:04       69 阅读

热门阅读

  1. Redis① —— Redis基础

    2024-07-15 17:40:04       21 阅读
  2. LeetCode 445.两数相加||

    2024-07-15 17:40:04       16 阅读
  3. openstack

    2024-07-15 17:40:04       19 阅读
  4. Memcached与Redis:缓存解决方案的较量与选择

    2024-07-15 17:40:04       21 阅读
  5. pandas读取超过16位的excle

    2024-07-15 17:40:04       16 阅读
  6. blinker库

    2024-07-15 17:40:04       19 阅读
  7. 如何使用断点续传方式上传大文件到阿里云 OSS

    2024-07-15 17:40:04       14 阅读
  8. Web打点技术的攻击手段和渗透测试工具

    2024-07-15 17:40:04       20 阅读
  9. 游戏开发面试题2

    2024-07-15 17:40:04       18 阅读
  10. linux系统调用

    2024-07-15 17:40:04       21 阅读
  11. git安装

    git安装

    2024-07-15 17:40:04      19 阅读