80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major This file is generated from xml source: DO NOT EDIT
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<title>mod_authz_dbd - Apache HTTP Server Version 2.5</title>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<script src="/style/scripts/prettify.min.js" type="text/javascript">
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<link href="/images/favicon.ico" rel="shortcut icon" /></head>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<p class="apache">Apache HTTP Server Version 2.5</p>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Modules</a></div>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<div id="preamble"><h1>Apache Module mod_authz_dbd</h1>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<p><span>Available Languages: </span><a href="/en/mod/mod_authz_dbd.html" title="English"> en </a> |
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<a href="/fr/mod/mod_authz_dbd.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Group Authorization and Login using SQL</td></tr>
1f48f8236de7de97be1c6b9d06bef50b379c8801jenkins<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>authz_dbd_module</td></tr>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_authz_dbd.c</td></tr>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.4 and later</td></tr></table>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major <p>This module provides authorization capabilities so that
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major authenticated users can be allowed or denied access to portions
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major of the web site by group membership. Similar functionality is
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major provided by <code class="module"><a href="/mod/mod_authz_groupfile.html">mod_authz_groupfile</a></code> and
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major <code class="module"><a href="/mod/mod_authz_dbm.html">mod_authz_dbm</a></code>, with the exception that
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major this module queries a SQL database to determine whether a
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major user is a member of a group.</p>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major <p>This module can also provide database-backed user login/logout
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major capabilities. These are likely to be of most value when used
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major in conjunction with <code class="module"><a href="/mod/mod_authn_dbd.html">mod_authn_dbd</a></code>.</p>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major <p>This module relies on <code class="module"><a href="/mod/mod_dbd.html">mod_dbd</a></code> to specify
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major the backend database driver and connection parameters, and
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major manage the database connections.</p>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><img alt="" src="/images/down.gif" /> <a href="#requiredirectives">The Require Directives</a></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><img alt="" src="/images/down.gif" /> <a href="#login">Database Login</a></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><img alt="" src="/images/down.gif" /> <a href="#client">Client Login integration</a></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><img alt="" src="/images/down.gif" /> <a href="#example">Configuration example</a></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><img alt="" src="/images/down.gif" /> <a href="#security">Preventing SQL injections</a></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><img alt="" src="/images/down.gif" /> <a href="#authzdbdlogintoreferer">AuthzDBDLoginToReferer</a></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><img alt="" src="/images/down.gif" /> <a href="#authzdbdquery">AuthzDBDQuery</a></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><img alt="" src="/images/down.gif" /> <a href="#authzdbdredirectquery">AuthzDBDRedirectQuery</a></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major <code class="directive"><a href="/mod/mod_authn_dbd.html#authdbduserpwquery">AuthDBDUserPWQuery</a></code>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><code class="directive"><a href="/mod/mod_dbd.html#dbdriver">DBDriver</a></code></li>
80ca0b9f5ad61b2335af25d4dcf25a04ebfcbc91Peter Major<li><code class="directive"><a href="/mod/mod_dbd.html#dbdparams">DBDParams</a></code></li>
<p>To support such integration, <code class="module"><a href="/mod/mod_authz_dbd.html">mod_authz_dbd</a></code> exports an
ErrorDocument 401 /login-info.html
<Files "login.html">
<Files "logout.html">
<p>Please read <code class="module"><a href="/mod/mod_dbd.html">mod_dbd</a></code> documentation for more information
<div class="directive-section"><h2><a name="AuthzDBDLoginToReferer" id="AuthzDBDLoginToReferer">AuthzDBDLoginToReferer</a> <a name="authzdbdlogintoreferer" id="authzdbdlogintoreferer">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether to redirect the Client to the Referring
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthzDBDLoginToReferer On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthzDBDLoginToReferer Off</code></td></tr>
<div class="directive-section"><h2><a name="AuthzDBDQuery" id="AuthzDBDQuery">AuthzDBDQuery</a> <a name="authzdbdquery" id="authzdbdquery">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specify the SQL Query for the required operation</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthzDBDQuery <var>query</var></code></td></tr>
<code class="module"><a href="/mod/mod_authz_groupfile.html">mod_authz_groupfile</a></code> and <code class="module"><a href="/mod/mod_authz_dbm.html">mod_authz_dbm</a></code>.
<div class="directive-section"><h2><a name="AuthzDBDRedirectQuery" id="AuthzDBDRedirectQuery">AuthzDBDRedirectQuery</a> <a name="authzdbdredirectquery" id="authzdbdredirectquery">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specify a query to look up a login page for the user</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthzDBDRedirectQuery <var>query</var></code></td></tr>
<pre class="prettyprint lang-config">AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s"</pre>
<p><span>Available Languages: </span><a href="/en/mod/mod_authz_dbd.html" title="English"> en </a> |
<a href="/fr/mod/mod_authz_dbd.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p>
</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_authz_dbd.html';
if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
d.write('<div id="comments_thread"><\/div>');
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
(d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
<p class="apache">Copyright 2015 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--