apache通过AD验证
## apache通过AD验证
#yum install httpd mod_authz_ldap
#安装apahce的ldap模块
yum install mod_authz_ldap -y
#配置apache通过ldap进行认证
cp /etc/httpd/conf.d/authz_ldap.conf /etc/httpd/conf.d/authz_ldap.conf.bak$(date +%F)
egrep -v "#|^$" /etc/httpd/conf.d/authz_ldap.conf
#编辑配置
vim /etc/httpd/conf.d/authz_ldap.conf
LoadModule authz_ldap_module modules/mod_authz_ldap.so
<IfModule mod_authz_ldap.c>
#配置AD 的IP地址,认证用户、密码等
<Directory /var/www/html/ldap> #这里定义那个目录需要使用ldap模块认证
AuthzLDAPMethod ldap
AuthzLDAPAuthoritative on
AuthzLDAPServer 172.16.33.18
AuthzLDAPUserBase "OU=Tech,OU=users,DC=test,DC=cn"
AuthzLDAPUserKey sAMAccountName
AuthzLDAPUserScope subtree
AuthzLDAPBindDN "elven@test.cn"
AuthzLDAPBindPassword "test"
AuthType Basic
AuthName "Test ldap"
require valid-user
</Directory> </IfModule>
#启动
echo ServerName localhost:80 >>/etc/httpd/conf/httpd.conf #添加本机web 80端口
service httpd start
chkconfig --add httpd
chkconfig httpd on
#测试目录
mkdir /var/www/html/ldap
echo "LDAP test">/var/www/html/ldap/index.html
#浏览器http://ip/ldap
apache通过AD验证的更多相关文章
- 添加AD验证(域身份验证)到现有网站
每个网站几乎都会有用户登录的模块,登录就会涉及到身份验证的过程.通常的做法是在页面上有个登录的Form,然后根据用户名和密码到数据库中去进行验证. 而验证后如何在网站的各个页面维持这种认证过的状态,有 ...
- 设置apache登陆密码验证
一.编辑虚拟目录配置文件,设置认证方式 Alias /test"/var/www/test"<Directory "/var/www/test">O ...
- SpringBoot整合Apache Shiro权限验证框架
比较常见的权限框架有两种,一种是Spring Security,另一种是Apache Shiro,两种框架各有优劣,个人感觉Shiro更容易使用,更加灵活,也更符合RABC规则,而且是java官方更推 ...
- Apache Ant安装 验证
1.下载Apache Ant 去官网下载ant,官网地址:http://ant.apache.org/ 我下载的是apache-ant-1.10.1-bin.zip 直接解压,放到制定目录下,如C:\ ...
- 2012 - AD 验证域控是否成功部署
1,验证AD DS域服务:AD DS & AD WS 2,验证“默认容器”及“Domain Controller” 3,验证“Default-First-Site-Name" 4,验 ...
- The server of Apache (二)——apache服务客户端验证
一.确定网站名称.IP地址 地址为: 192.168.1.1 域名为: www.benet.com 二.配置可用的DNS域名服务或者修改本地hosts记录 ~] # vim /etc/hosts ...
- C# AD 验证登陆
using System.DirectoryServices; using System.DirectoryServices.AccountManagement; using (DirectoryEn ...
- springboot整合微软的ad域,采用ldap的api来整合,实现用户登录验证、
流程: 1.用户调登录接口,传用户名和密码2.用户名和密码在ad验证,验证通过后,返回当前用户的相关信息.(注:ldap为java自带的api不需要maven引入其他的)3.根据返回的用户信息,实现自 ...
- Apache服务及个人用户主页功能和密码验证
Apache服务程序中有个默认未开启的个人用户主页功能,能够为所有系统内的用户生成个人网站,确实很实用哦 第1步:开启个人用户主页功能: 1.vim /etc/httpd/conf.d/userdir ...
随机推荐
- LeetCode 342. Power of Four (4的次方)
Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example:Giv ...
- c# Invoke和Begininvoke区别
一.对Invoke和Begininvoke的认识 1.Invoke():同步委托,会阻塞当前主线程的运行,等待invoke()方法返回才执行后面的代码: 2.Begininvoke():异步委托,调用 ...
- Linux学习(十五)LVM
一.前言 LVM,逻辑卷管理工具,它的作用是提供一种灵活的磁盘管理办法.通常我们的某个分区用完了,想要扩容,很麻烦.但是用lvm就可以很方便的扩容,收缩. 看它的原理图: 它的原理大致是:首先将磁盘做 ...
- C++ 标准库之iomanip
C++ 标准库之iomanip istream & istream::get(char *, int, char = '\n');istream & istream::getline( ...
- poj 2566 Bound Found
Bound Found Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 4384 Accepted: 1377 Spe ...
- Codeforces 378B. Parade
B. Parade time limit per test 1 second memory limit per test 256 megabytes input standard input outp ...
- IdentityServer4 禁用 Consent screen page(权限确认页面)
IdentityServer4 在登录完成的适合,会再跳转一次页面(权限确认),如下: 我之前以为 IdentityServer4 就是这样使用的,但实际业务场景并不需要进行权限确认,而是登陆成功后直 ...
- 原生addClass 方法 添加类函数
function addClass(id,new_class){ var i,n=0; new_class=new_class.split(","); ...
- Linux下打造全方位立体监控系统
前言 本文主要介绍如何使用Grafana和Prometheus以及node_exporter对Linux服务器性能进行监控.下面两张图分别是两台服务器: 服务器A 服务器B 概述 Prometheus ...
- JavaScript系列----函数(Function)篇(4)
1.什么是函数? 在W3C中函数的定义是这么说的:函数是由事件驱动的或者当它被调用时执行的可重复使用的代码块. 诚然,从这种抽象的定义中我们得不到什么有价值的东西.下面,举例来列举出函数的几种定义 ...