⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mod_auth_basic.html

📁 这个是我在web培训时老师提供的手册
💻 HTML
字号:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="Apache, 中文, 手册, 中文版, 中文手册, 中文版手册, 参考手册, 中文参考手册, 金步国" />
<meta name="description" content="Apache 2.2 中文版参考手册" />
<meta name="author" content="金步国" />
<link href="../style/css/manual-zip.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-zip-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
<title>mod_auth_basic - Apache 2.2 中文版参考手册</title>
</head>
<body><div id="page-header">
<p class="menu"><a href="../mod/index.html">模块索引</a> | <a href="../mod/directives.html">指令索引</a> | <a href="../faq/index.html">常见问题</a> | <a href="../glossary.html">词汇表</a> | <a href="../sitemap.html">站点导航</a></p><p class="apache">Apache HTTP Server 版本2.2</p><img alt="" src="../images/feather.gif" /></div>
<div class="up"><a href="./index.html"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
<div id="path"><a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">文档</a> &gt; <a href="../index.html">版本2.2</a> &gt; <a href="./index.html">模块</a></div>

<div id="translation-info">   <a href="../translator_announcement.html#thanks">致谢</a> | <a href="../translator_announcement.html#announcement">译者声明</a> | 本篇译者:<a href="mailto:&#099;sfr&#0097;nk&#0064;&#099;itiz&#046;n&#0101;t">金步国</a> | 本篇译稿最后更新:2006年1月23日 | <a href="../translator_announcement.html#last_new">获取最新版本</a></div>
<div id="page-content"><div id="preamble"><h1>Apache模块 mod_auth_basic</h1>

<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="module">
<tr><th><a href="module-dict.html#Description">说明</a></th><td>使用基本认证</td></tr>
<tr><th><a href="module-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="module-dict.html#ModuleIdentifier">模块名</a></th><td>auth_basic_module</td></tr>
<tr><th><a href="module-dict.html#SourceFile">源文件</a></th><td>mod_auth_basic.c</td></tr>
<tr><th><a href="module-dict.html#Compatibility">兼容性</a></th><td>仅在 Apache 2.1 及以后的版本中可用</td></tr>
</table>
<h3>概述</h3>

    <p>此模块使用HTTP基本认证,在认证支持模块的帮助下查找用户名和密码,从而进行访问控制。而<code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code>模块则提供了对HTTP摘要认证的支持。这两个模块通常至少需要和一个认证支持模块(如<code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code>)和一个授权支持模块(如<code class="module"><a href="../mod/mod_authz_user.html">mod_authz_user</a></code>)一起使用。</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AuthBasicAuthoritative" id="AuthBasicAuthoritative">AuthBasicAuthoritative</a> <a name="authbasicauthoritative" id="authbasicauthoritative">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>指定是否将(基本)认证和授权操作交由更底层的模块来处理</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>AuthBasicAuthoritative On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">默认值</a></th><td><code>AuthBasicAuthoritative On</code></td></tr>
<tr><th><a href="directive-dict.html#Context">作用域</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">覆盖项</a></th><td>AuthConfig</td></tr>
<tr><th><a href="directive-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="directive-dict.html#Module">模块</a></th><td>mod_auth_basic</td></tr>
</table>
    <p>通常,在<code class="directive"><a href="#authbasicprovider">AuthBasicProvider</a></code>中列出的每一个认证支持者都会尝试校验用户,如果所有认证支持者全都没有通过检验,那么访问将被拒绝。在将<code class="directive">AuthBasicAuthoritative</code>明确地设置为 <code>Off</code> 的情况下,如果提供的userID<strong>不能与任何userID或rule(规则)相匹配</strong>,则认证和授权操作均转交其它非认证支持(non-provider-based)模块(也就是第三方模块)来处理;仅仅在将<code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code>和未使用<code class="directive"><a href="#authbasicprovider">AuthBasicProvider</a></code>进行配置的第三方模块联合使用的时候才需要这样设置。在使用这种第三方模块的时候,处理顺序是在该模块的源代码中设定的,不能被重新配置。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AuthBasicProvider" id="AuthBasicProvider">AuthBasicProvider</a> <a name="authbasicprovider" id="authbasicprovider">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>设置该区域的(基本)认证支持者(Provider)</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>AuthBasicProvider <var>provider-name</var> [<var>provider-name</var>] ...</code></td></tr>
<tr><th><a href="directive-dict.html#Default">默认值</a></th><td><code>AuthBasicProvider file</code></td></tr>
<tr><th><a href="directive-dict.html#Context">作用域</a></th><td>directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">覆盖项</a></th><td>AuthConfig</td></tr>
<tr><th><a href="directive-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="directive-dict.html#Module">模块</a></th><td>mod_auth_basic</td></tr>
</table>
    <p><code class="directive">AuthBasicProvider</code>指令设置了该区域的(基本)认证支持者(Provider)。默认的<code>file</code>支持者由<code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code>模块实现。必须确保所需的认证支持模块存在于服务器中(静态连接或DSO)。</p>

    <div class="example"><h3>示例</h3><p><code>
      &lt;Location /secure&gt;<br />
      <span class="indent">
        AuthType basic<br />
        AuthBasicProvider  dbm<br />
        AuthDBMType        SDBM<br />
        AuthDBMUserFile    /www/etc/dbmpasswd<br />
        Require            valid-user<br />
      </span>
      &lt;/Location&gt;
    </code></p></div>

    <p>能够提供认证支持者(Provider)的模块如下:<code class="module"><a href="../mod/mod_authn_dbm.html">mod_authn_dbm</a></code>, <code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code>, <code class="module"><a href="../mod/mod_authn_dbd.html">mod_authn_dbd</a></code>, <code class="module"><a href="../mod/mod_authnz_ldap.html">mod_authnz_ldap</a></code> 。</p>

</div>
</div>
<div id="footer">
<p class="apache">本文允许自由使用、分发、转载,但必须保留译者署名;详见:<a href="../translator_announcement.html#announcement">译者声明</a>。</p>
<p class="menu"><a href="../mod/index.html">模块索引</a> | <a href="../mod/directives.html">指令索引</a> | <a href="../faq/index.html">常见问题</a> | <a href="../glossary.html">词汇表</a> | <a href="../sitemap.html">站点导航</a></p></div>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -