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
  • 相关阅读:
    TCP 和 UDP 的区别
    python--各种锁机制归纳整理
    七牛的配置
    全文检索的配置
    记一则css3计算
    C# 生成序号不足补0
    JavaScript Post提交数据并跳转到页面(模拟Form表单提交)
    Swift 修改UITextField.Placeholder颜色
    Swift 延迟运行代码
    Swift 动画片段
  • 原文地址:https://www.cnblogs.com/shihao/p/2312902.html
Copyright © 2011-2022 走看看