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 ...
随机推荐
- LINUX 笔记-Shell 脚本控制语句
1.if 语句 if condition1;then command1 elif condition2;then command2 else command3 fi 2.case 语句 case va ...
- [ACdream] 女神教你字符串——三个气球
Problem Description 女神邀请众ACdream开联欢会,显然作为ACM的佼佼者,气球是不能少的~.女神准备了三种颜色的气球,红色,黄色,绿色(交通信号灯?) 有气球还不能满足女神,女 ...
- LeetCode 530. Minimum Absolute Difference in BST (二叉搜索树中最小绝对差)
Given a binary search tree with non-negative values, find the minimum absolute difference between va ...
- javascript 之执行环境-08
概念 执行环境(Execution context,简称EC)或执行上下文对象(后面统一用执行上下文表示),它定义了变量或者函数有权访问的其他数据,决定了他们各自的行为.是不是有点不好理解,那我先简单 ...
- git笔记------自己学习git的心得
git个人学习总结: git是一个管理代码的版本控制系统,用git init创建一个git可以管理的仓库,这个仓库里有一个工作区,我们最基本的那些命令操作都是在工作区完成,在创建仓库的时候,在工作区里 ...
- Leetcode题解(26)
80. Remove Duplicates from Sorted Array II 题目 分析:简单的操作,代码如下: class Solution { public: int removeDupl ...
- c++学习笔记---06--- 函数的重载
函数的重载 函数的重载 C++ 里的函数重载(overloading)机制比我们此前见到的东西都高深,这种语言的灵活性和强大功能在它身上体现得淋漓尽致. 所谓函数重载的实质就是用同样的名字再定义一个有 ...
- 【Win 10 应用开发】UI Composition 札记(三):与 XAML 集成
除了 DirectX 游戏开发,我们一般很少单独使用 UI Composition ,因此,与 XAML 互动并集成是必然结果.这样能够把两者的优势混合使用,让UI布局能够更灵活. 说到与 XAML ...
- SQL查询多条不重复记录值简要解析【转载】
转载http://hi.baidu.com/my_favourate/item/3716b0cbe125f312505058eb SQL查询多条不重复记录值简要解析2008-02-28 11:36 以 ...
- n! 进制
n! 进制 Time limit per test: 1.0 seconds Time limit all tests: 1.0 seconds Memory limit: 256 megabytes ...