zoukankan      html  css  js  c++  java
  • 配置Apache支持以支持多种验证方式并存

    应用场景
    吉之特测试组提出的需求,新建mercurial用户,建立虚拟用户,用于版本控制工具认证,执行某个公用操作。

    主要配置参数

    1
    2
    3
    4
    5
    AuthType            Authentication type being used. Mostly , it will be set to Basic
    AuthName            The authentication realm or name
    AuthUserFile    The location of the password file
    AuthGroupFile   The location of the group file, if any Require The requirement(s) which must be satisfied in order to grant admission
    AuthBasicProvider       Sets the authentication provider(s) for this location.It will be set to  dbm, file, dbd, and ldap.


    示范配置
    (/etc/httpd/conf/httpd.conf)

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    AllowOverride None
    AuthName mercurial
    AuthType Basic
    AuthBasicProvider ldap file #Enable相关的认证方式
    AuthLDAPURL "ldap://dc2008.woobest.com/cn=Users,dc=woobest,dc=com?sAMAccountName?sub?(objectClass=user)"
    AuthLDAPBindDN ldap_pub
    AuthLDAPBindPassword ******** #LDAP认证相关
    Require valid-user
    AuthBasicAuthoritative off
    AuthUserFile /etc/httpd/virtual.users #文本数据库认证相关

    用户名和密码使用htpasswd生成

    1
    2
    3
    4
    # htpasswd -c /usr/local/apache/passwd/passwords public_hg
    New password: mypassword
    Re-type new password: mypassword
    Adding password for user public_hg
  • 相关阅读:
    .Net 多线程小结
    VIM 入门操作
    C语言中的数据
    对scanf和printf的研究!!
    C语言常用的编程规范
    ORACLE GOLDEN GATE oracle同步数据至kafka
    mysql5.7关于使用到OR是否会用到索引并提高查询效率的探讨
    sysbench安装
    percona数据库监控工具的安装部署
    redhat6 快速部署percona
  • 原文地址:https://www.cnblogs.com/shihao/p/2312902.html
Copyright © 2011-2022 走看看