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
  • 相关阅读:
    nginx-rtmp-module
    nginx搭建支持http和rtmp协议的流媒体服务器之一
    用开源nginx-rtmp-module搭建flash直播环境
    Nginx RTMP 功能研究
    开源的视频直播
    LeetCode题解之Rotate String
    LeetCode题解之 Letter Case Permutation
    LeetCode题解之 3Sum
    LeetCode 题解之 Two Sum
    LeetCode 题解之Linked List Cycle II
  • 原文地址:https://www.cnblogs.com/shihao/p/2312902.html
Copyright © 2011-2022 走看看