网站 刷流量 SEO,网站优化知识,广州万户网络科技有限公司,青岛建网站需要花多少钱开启HTTP authentication实现单点登录
一、新建http验证用户
htpasswd -c /etc/nginx/.htpasswd another_username
# 在提示中输入密码二、新建Nginx配置文件 把zabbix.conf拷贝一份#xff0c;然后修改listen监听的端口。
cp zabbx.conf zabbix_http.conf
每个location中新…开启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_password192.168.113.161:89/可以直接登录。