d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin This file is generated from xml source: DO NOT EDIT
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc<title>mod_auth_form - Apache HTTP Server Version 2.5</title>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<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" />
2e545ce2450a9953665f701bb05350f0d3f26275nd<script src="/style/scripts/prettify.min.js" type="text/javascript">
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<link href="/images/favicon.ico" rel="shortcut icon" /></head>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<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>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<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>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div id="preamble"><h1>Apache Module mod_auth_form</h1>
253547fb9cc7986e84ff68aef076f664fc4169dctakashi<p><span>Available Languages: </span><a href="/en/mod/mod_auth_form.html" title="English"> en </a> |
253547fb9cc7986e84ff68aef076f664fc4169dctakashi<a href="/fr/mod/mod_auth_form.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Form authentication</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>auth_form_module</td></tr>
a7818b8de55671a82b0863d27665713f265af7aeigalic<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_auth_form.c</td></tr>
a7818b8de55671a82b0863d27665713f265af7aeigalic<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3 and later</td></tr></table>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>Form authentication depends on the <code class="module"><a href="/mod/mod_session.html">mod_session</a></code>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin modules, and these modules make use of HTTP cookies, and as such can fall
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin victim to Cross Site Scripting attacks, or expose potentially private
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin information to clients. Please ensure that the relevant risks have
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin been taken into account before enabling the session functionality on
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin your server.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>This module allows the use of an HTML login form to restrict access
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin by looking up users in the given providers. HTML forms require
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin significantly more configuration than the alternatives, however an
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin HTML login form can provide a much friendlier experience for end users.
016241a6ee9c7b02ff94f30f90e705012ea08e41jsl <p>HTTP basic authentication is provided by
016241a6ee9c7b02ff94f30f90e705012ea08e41jsl <code class="module"><a href="/mod/mod_auth_basic.html">mod_auth_basic</a></code>, and HTTP digest authentication is
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin provided by <code class="module"><a href="/mod/mod_auth_digest.html">mod_auth_digest</a></code>. This module should
016241a6ee9c7b02ff94f30f90e705012ea08e41jsl be combined with at least one authentication module
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin such as <code class="module"><a href="/mod/mod_authn_file.html">mod_authn_file</a></code> and one authorization
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin module such as <code class="module"><a href="/mod/mod_authz_user.html">mod_authz_user</a></code>.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>Once the user has been successfully authenticated, the user's login
016241a6ee9c7b02ff94f30f90e705012ea08e41jsl details will be stored in a session provided by <code class="module"><a href="/mod/mod_session.html">mod_session</a></code>.
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#basicconfig">Basic Configuration</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#standalone">Standalone Login</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#inline">Inline Login</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#inlinepreservebody">Inline Login with Body Preservation</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#loggingout">Logging Out</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#urlencoding">Usernames and Passwords</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformauthoritative">AuthFormAuthoritative</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformbody">AuthFormBody</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformdisablenostore">AuthFormDisableNoStore</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformfakebasicauth">AuthFormFakeBasicAuth</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformlocation">AuthFormLocation</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformloginsuccesslocation">AuthFormLoginSuccessLocation</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformlogoutlocation">AuthFormLogoutLocation</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformmethod">AuthFormMethod</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformmimetype">AuthFormMimetype</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformpassword">AuthFormPassword</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformprovider">AuthFormProvider</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformsitepassphrase">AuthFormSitePassphrase</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformsize">AuthFormSize</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><img alt="" src="/images/down.gif" /> <a href="#authformusername">AuthFormUsername</a></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><code class="module"><a href="/mod/mod_session.html">mod_session</a></code></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><code class="directive"><a href="/mod/mod_authn_core.html#authname">AuthName</a></code></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><code class="directive"><a href="/mod/mod_authn_core.html#authtype">AuthType</a></code></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code></li>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<li><a href="/howto/auth.html">Authentication howto</a></li>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="basicconfig" id="basicconfig">Basic Configuration</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>To protect a particular URL with <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code>, you need to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar decide where you will store your <var>session</var>, and you will need to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar decide what method you will use to authenticate. In this simple example, the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar login details will be stored in a session based on
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="module"><a href="/mod/mod_session_cookie.html">mod_session_cookie</a></code>, and authentication will be attempted against
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar a file using <code class="module"><a href="/mod/mod_authn_file.html">mod_authn_file</a></code>. If authentication is unsuccessful,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the user will be redirected to the form login page.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Basic example</h3><pre class="prettyprint lang-config">AuthFormProvider file
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthType form
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthName realm
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthFormLoginRequiredLocation "http://example.com/login.html"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionCookieName session path=/
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionCryptoPassphrase secret</pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The directive <code class="directive"><a href="/mod/mod_authn_core.html#authtype">AuthType</a></code> will enable
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> authentication when set to the value <var>form</var>.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar The directives <code class="directive"><a href="#authformprovider">AuthFormProvider</a></code> and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="/mod/mod_authn_file.html#authuserfile">AuthUserFile</a></code> specify that usernames
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar and passwords should be checked against the chosen file.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The directives <code class="directive"><a href="/mod/mod_session.html#session">Session</a></code>,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="/mod/mod_session_cookie.html#sessioncookiename">SessionCookieName</a></code> and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="/mod/mod_session_crypto.html#sessioncryptopassphrase">SessionCryptoPassphrase</a></code> create an
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar encrypted session stored within an HTTP cookie on the browser. For more information
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar on the different options for configuring a session, read the documentation for
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="module"><a href="/mod/mod_session.html">mod_session</a></code>.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>In the simple example above, a URL has been protected by
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code>, but the user has yet to be given an opportunity to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar enter their username and password. Options for doing so include providing a
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar dedicated standalone login page for this purpose, or for providing the login
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar page inline.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="standalone" id="standalone">Standalone Login</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The login form can be hosted as a standalone page, or can be provided inline on
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the same page.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>When configuring the login as a standalone page, unsuccessful authentication
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar attempts should be redirected to a login form created by the website for this purpose,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar using the <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar directive. Typically this login page will contain an HTML form, asking the user to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar provide their usename and password.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example login form</h3><pre class="prettyprint lang-html"><form method="POST" action="/dologin.html">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Username: <input type="text" name="httpd_username" value="" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Password: <input type="password" name="httpd_password" value="" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <input type="submit" name="login" value="Login" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</form></pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The part that does the actual login is handled by the <var>form-login-handler</var>.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar The action of the form should point at this handler, which is configured within
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Apache httpd as follows:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Form login handler example</h3><pre class="prettyprint lang-config"><Location "/dologin.html">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar SetHandler form-login-handler
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar AuthFormLoginRequiredLocation "http://example.com/login.html"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar AuthFormLoginSuccessLocation "http://example.com/success.html"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar AuthFormProvider file
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar AuthType form
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar AuthName realm
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Session On
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar SessionCookieName session path=/
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar SessionCryptoPassphrase secret
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</Location></pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The URLs specified by the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code> directive will typically
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar point to a page explaining to the user that their login attempt was unsuccessful, and they
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar should try again. The <code class="directive"><a href="#authformloginsuccesslocation">AuthFormLoginSuccessLocation</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar directive specifies the URL the user should be redirected to upon successful login.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Alternatively, the URL to redirect the user to on success can be embedded within the login
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar form, as in the example below. As a result, the same <var>form-login-handler</var> can be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar reused for different areas of a website.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example login form with location</h3><pre class="prettyprint lang-html"><form method="POST" action="/dologin.html">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Username: <input type="text" name="httpd_username" value="" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Password: <input type="password" name="httpd_password" value="" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <input type="submit" name="login" value="Login" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <input type="hidden" name="httpd_location" value="http://example.com/success.html" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</form></pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>A risk exists that under certain circumstances, the login form configured
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar using inline login may be submitted more than once, revealing login credentials to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the application running underneath. The administrator must ensure that the underlying
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar application is properly secured to prevent abuse. If in doubt, use the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar standalone login configuration.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>As an alternative to having a dedicated login page for a website, it is possible to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar configure <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> to authenticate users inline, without being
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar redirected to another page. This allows the state of the current page to be preserved
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar during the login attempt. This can be useful in a situation where a time limited
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar session is in force, and the session times out in the middle of the user request. The
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar user can be re-authenticated in place, and they can continue where they left off.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>If a non-authenticated user attempts to access a page protected by
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> that isn't configured with a
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code> directive,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar a <var>HTTP_UNAUTHORIZED</var> status code is returned to the browser indicating to the user
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar that they are not authorized to view the page.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>To configure inline authentication, the administrator overrides the error document
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar returned by the <var>HTTP_UNAUTHORIZED</var> status code with a custom error document
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar containing the login form, as follows:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Basic inline example</h3><pre class="prettyprint lang-config">AuthFormProvider file
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarErrorDocument 401 "/login.shtml"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthType form
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthName realm
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthFormLoginRequiredLocation "http://example.com/login.html"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionCookieName session path=/
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionCryptoPassphrase secret</pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The error document page should contain a login form with an empty action property,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar as per the example below. This has the effect of submitting the form to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the original protected URL, without the page having to know what that
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar URL is.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example inline login form</h3><pre class="prettyprint lang-html"><form method="POST" <strong>action=""</strong>>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Username: <input type="text" name="httpd_username" value="" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Password: <input type="password" name="httpd_password" value="" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <input type="submit" name="login" value="Login" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</form></pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>When the end user has filled in their login details, the form will make
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar an HTTP POST request to the original password protected URL.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> will intercept this POST request, and if
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar HTML fields are found present for the username and password, the user
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar will be logged in, and the original password protected URL will be returned
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar to the user as a GET request.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="inlinepreservebody" id="inlinepreservebody">Inline Login with Body Preservation</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>A limitation of the inline login technique described above is that should an
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar HTML form POST have resulted in the request to authenticate or
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar reauthenticate, the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar contents of the original form posted by the browser will be lost. Depending on
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the function of the website, this could present significant inconvenience for the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar end user.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p><code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> addresses this by allowing the method and body
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar of the original request to be embedded in the login form. If authentication
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar is successful, the original method and body will be retried by Apache httpd, preserving
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the state of the original request.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>To enable body preservation, add three additional fields to the login form as
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar per the example below.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example with body preservation</h3><pre class="prettyprint lang-html"><form method="POST" action="">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Username: <input type="text" name="httpd_username" value="" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Password: <input type="password" name="httpd_password" value="" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <input type="submit" name="login" value="Login" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <br /> <strong><input type="hidden" name="httpd_method" value="POST" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" /></strong><br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</form></pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>How the method, mimetype and body of the original request are embedded within the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar login form will depend on the platform and technology being used within the website.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>One option is to use the <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> module along with the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="/mod/mod_request.html#keptbodysize">KeptBodySize</a></code> directive, along with a suitable
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar CGI script to embed the variables in the form.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Another option is to render the login form using a CGI script or other dynamic
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar technology.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>CGI example</h3><pre class="prettyprint lang-config"> AuthFormProvider file
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="loggingout" id="loggingout">Logging Out</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>To enable a user to log out of a particular session, configure a page to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar be handled by the <var>form-logout-handler</var>. Any attempt to access this
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar URL will cause the username and password to be removed from the current
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar session, effectively logging the user out.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>By setting the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="#authformlogoutlocation">AuthFormLogoutLocation</a></code> directive,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar a URL can be specified that the browser will be redirected to on successful
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar logout. This URL might explain to the user that they have been logged out, and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar give the user the option to log in again.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Basic logout example</h3><pre class="prettyprint lang-config">SetHandler form-logout-handler
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthName realm
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthFormLogoutLocation "http://example.com/loggedout.html"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionCookieName session path=/
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionCryptoPassphrase secret</pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Note that logging a user out does not delete the session; it merely removes
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the username and password from the session. If this results in an empty session,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the net effect will be the removal of that session, but this is not
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar guaranteed. If you want to guarantee the removal of a session, set the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="/mod/mod_session.html#sessionmaxage">SessionMaxAge</a></code> directive to a small
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar value, like 1 (setting the directive to zero would mean no session age limit).
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Basic session expiry example</h3><pre class="prettyprint lang-config">SetHandler form-logout-handler
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAuthFormLogoutLocation "http://example.com/loggedout.html"
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionMaxAge 1
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionCookieName session path=/
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarSessionCryptoPassphrase secret</pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="urlencoding" id="urlencoding">Usernames and Passwords</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Note that form submission involves URLEncoding the form data:
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar in this case the username and password. You should therefore
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar pick usernames and passwords that avoid characters that are
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar URLencoded in form submission, or you may get unexpected results.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormAuthoritative" id="AuthFormAuthoritative">AuthFormAuthoritative</a> <a name="authformauthoritative" id="authformauthoritative">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets whether authorization and authentication are passed to
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormAuthoritative On|Off</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthFormAuthoritative On</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>Normally, each authorization module listed in <code class="directive"><a href="#authformprovider">AuthFormProvider</a></code> will attempt
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin to verify the user, and if the user is not found in any provider,
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin access will be denied. Setting the
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive">AuthFormAuthoritative</code> directive explicitly
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin to <code>Off</code> allows for both authentication and
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin authorization to be passed on to other non-provider-based modules
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin if there is <strong>no userID</strong> or <strong>rule</strong>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin matching the supplied userID. This should only be necessary when
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin combining <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> with third-party modules
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin that are not configured with the <code class="directive"><a href="#authformprovider">AuthFormProvider</a></code>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin directive. When using such modules, the order of processing
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin is determined in the modules' source code and is not configurable.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormBody" id="AuthFormBody">AuthFormBody</a> <a name="authformbody" id="authformbody">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the body of the request to attempt on successful login</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormBody <var>fieldname</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_body</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code> directive specifies
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the name of an HTML field which, if present, will contain the method of the request to
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin to submit should login be successful.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>By populating the form with fields described by
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code>,
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive"><a href="#authformmimetype">AuthFormMimetype</a></code> and
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive"><a href="#authformbody">AuthFormBody</a></code>, a website can retry
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin a request that may have been interrupted by the login screen, or by a session
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin timeout.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormDisableNoStore" id="AuthFormDisableNoStore">AuthFormDisableNoStore</a> <a name="authformdisablenostore" id="authformdisablenostore">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Disable the CacheControl no-store header on the login page</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormDisableNoStore <var>On|Off</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthFormDisableNoStore Off</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformdisablenostore">AuthFormDisableNoStore</a></code> flag
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin disables the sending of a <code>Cache-Control no-store</code> header with the
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin error 401 page returned when the user is not yet logged in. The purpose of the header
fd5a091eb07540ab440f8ac3a277caa590be46c1humbedooh is to make it difficult for an <code>ecmascript</code> application to attempt to resubmit the
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin login form, and reveal the username and password to the backend application. Disable
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin at your own risk.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormFakeBasicAuth" id="AuthFormFakeBasicAuth">AuthFormFakeBasicAuth</a> <a name="authformfakebasicauth" id="authformfakebasicauth">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Fake a Basic Authentication header</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormFakeBasicAuth <var>On|Off</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthFormFakeBasicAuth Off</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformfakebasicauth">AuthFormFakeBasicAuth</a></code> flag
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin determines whether a <code>Basic Authentication</code> header will be added to
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the request headers. This can be used to expose the username and password to
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin an underlying application, without the underlying application having to be aware
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin of how the login was achieved.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormLocation" id="AuthFormLocation">AuthFormLocation</a> <a name="authformlocation" id="authformlocation">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying a URL to redirect to on successful login</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormLocation <var>fieldname</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_location</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformlocation">AuthFormLocation</a></code> directive specifies
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the name of an HTML field which, if present, will contain a URL to redirect the browser to
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin should login be successful.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormLoginRequiredLocation" id="AuthFormLoginRequiredLocation">AuthFormLoginRequiredLocation</a> <a name="authformloginrequiredlocation" id="authformloginrequiredlocation">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The URL of the page to be redirected to should login be required</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormLoginRequiredLocation <var>url</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
9da97ff0bac3a0ff56a9cdebe6e5ab563636aa86jailletc<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later. The use of the expression
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code> directive
e41ae559e8408edb1c949c1237034f277d423eccminfrin specifies the URL to redirect to should the user not be authorised to view a page. The value
15e38d431fea66258ef33960b39edee496c3c9c2humbedooh is parsed using the <a href="/expr.html">ap_expr</a> parser before being sent to the client.
e41ae559e8408edb1c949c1237034f277d423eccminfrin By default, if a user is not authorised to view a page, the HTTP response code
e41ae559e8408edb1c949c1237034f277d423eccminfrin <code>HTTP_UNAUTHORIZED</code> will be returned with the page specified by the
ff4eeb709e3f992376253f506c5d23361bc369ffnilgun <code class="directive"><a href="/mod/core.html#errordocument">ErrorDocument</a></code> directive. This directive overrides this
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin default.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>Use this directive if you have a dedicated login page to redirect users to.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormLoginSuccessLocation" id="AuthFormLoginSuccessLocation">AuthFormLoginSuccessLocation</a> <a name="authformloginsuccesslocation" id="authformloginsuccesslocation">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The URL of the page to be redirected to should login be successful</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormLoginSuccessLocation <var>url</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
9da97ff0bac3a0ff56a9cdebe6e5ab563636aa86jailletc<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later. The use of the expression
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformloginsuccesslocation">AuthFormLoginSuccessLocation</a></code> directive
e41ae559e8408edb1c949c1237034f277d423eccminfrin specifies the URL to redirect to should the user have logged in successfully. The value is
15e38d431fea66258ef33960b39edee496c3c9c2humbedooh parsed using the <a href="/expr.html">ap_expr</a> parser before being sent to the client.
e41ae559e8408edb1c949c1237034f277d423eccminfrin This directive can be overridden if a form field has been defined containing another URL
e41ae559e8408edb1c949c1237034f277d423eccminfrin using the <code class="directive"><a href="#authformlocation">AuthFormLocation</a></code> directive.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>Use this directive if you have a dedicated login URL, and you have not embedded the
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin destination page in the login form.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormLogoutLocation" id="AuthFormLogoutLocation">AuthFormLogoutLocation</a> <a name="authformlogoutlocation" id="authformlogoutlocation">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The URL to redirect to after a user has logged out</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormLogoutLocation <var>uri</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
9da97ff0bac3a0ff56a9cdebe6e5ab563636aa86jailletc<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later. The use of the expression
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformlogoutlocation">AuthFormLogoutLocation</a></code> directive
e41ae559e8408edb1c949c1237034f277d423eccminfrin specifies the URL of a page on the server to redirect to should the user attempt to log
15e38d431fea66258ef33960b39edee496c3c9c2humbedooh out. The value is parsed using the <a href="/expr.html">ap_expr</a> parser before
e41ae559e8408edb1c949c1237034f277d423eccminfrin being sent to the client.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>When a URI is accessed that is served by the handler <code>form-logout-handler</code>,
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the page specified by this directive will be shown to the end user. For example:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example</h3><pre class="prettyprint lang-config"><Location "/logout">
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic SetHandler form-logout-handler
3658293f56f1683ca41e3bc5b70d98b203d8004bcoar AuthFormLogoutLocation "http://example.com/loggedout.html"
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>An attempt to access the URI <var>/logout/</var> will result in the user being logged
016241a6ee9c7b02ff94f30f90e705012ea08e41jsl out, and the page <var>/loggedout.html</var> will be displayed. Make sure that the page
016241a6ee9c7b02ff94f30f90e705012ea08e41jsl <var>loggedout.html</var> is not password protected, otherwise the page will not be
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin displayed.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormMethod" id="AuthFormMethod">AuthFormMethod</a> <a name="authformmethod" id="authformmethod">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the method of the request to attempt on successful login</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormMethod <var>fieldname</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_method</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code> directive specifies
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the name of an HTML field which, if present, will contain the method of the request to
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin to submit should login be successful.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>By populating the form with fields described by
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code>,
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive"><a href="#authformmimetype">AuthFormMimetype</a></code> and
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive"><a href="#authformbody">AuthFormBody</a></code>, a website can retry
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin a request that may have been interrupted by the login screen, or by a session
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin timeout.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormMimetype" id="AuthFormMimetype">AuthFormMimetype</a> <a name="authformmimetype" id="authformmimetype">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the mimetype of the body of the request to attempt on successful login</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormMimetype <var>fieldname</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_mimetype</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code> directive specifies
08cf4a15275e4cb65a424b3a1db5410bfb51085cjim the name of an HTML field which, if present, will contain the
08cf4a15275e4cb65a424b3a1db5410bfb51085cjim mimetype of the request to to submit should login be successful.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>By populating the form with fields described by
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code>,
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive"><a href="#authformmimetype">AuthFormMimetype</a></code> and
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive"><a href="#authformbody">AuthFormBody</a></code>, a website can retry
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin a request that may have been interrupted by the login screen, or by a session
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin timeout.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormPassword" id="AuthFormPassword">AuthFormPassword</a> <a name="authformpassword" id="authformpassword">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the login password</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormPassword <var>fieldname</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_password</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformpassword">AuthFormPassword</a></code> directive specifies
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the name of an HTML field which, if present, will contain the password to be used to log
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormProvider" id="AuthFormProvider">AuthFormProvider</a> <a name="authformprovider" id="authformprovider">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the authentication provider(s) for this location</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormProvider <var>provider-name</var>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthFormProvider file</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <p>The <code class="directive">AuthFormProvider</code> directive sets
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin which provider is used to authenticate the users for this location.
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin The default <code>file</code> provider is implemented
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin by the <code class="module"><a href="/mod/mod_authn_file.html">mod_authn_file</a></code> module. Make sure
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin that the chosen provider module is present in the server.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example</h3><pre class="prettyprint lang-config"><Location "/secure">
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic AuthType form
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic AuthName "private area"
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic AuthFormProvider dbm
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic AuthDBMType SDBM
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic Require valid-user
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>Providers are implemented by <code class="module"><a href="/mod/mod_authn_dbm.html">mod_authn_dbm</a></code>,
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <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>,
a29610af88e278144045bfa1bc63b4a1a4b5ff14trawick <code class="module"><a href="/mod/mod_authnz_ldap.html">mod_authnz_ldap</a></code> and <code class="module"><a href="/mod/mod_authn_socache.html">mod_authn_socache</a></code>.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormSitePassphrase" id="AuthFormSitePassphrase">AuthFormSitePassphrase</a> <a name="authformsitepassphrase" id="authformsitepassphrase">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Bypass authentication checks for high traffic sites</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormSitePassphrase <var>secret</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformsitepassphrase">AuthFormSitePassphrase</a></code> directive
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen specifies a passphrase which, if present in the user session, causes Apache httpd to
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin bypass authentication checks for the given URL. It can be used on high traffic websites
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin to reduce the load induced on authentication infrastructure.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The passphrase can be inserted into a user session by adding this directive to the
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin configuration for the <var>form-login-handler</var>. The <var>form-login-handler</var>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin itself will always run the authentication checks, regardless of whether a passphrase
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin is specified or not.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>If the session is exposed to the user through the use of
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="module"><a href="/mod/mod_session_cookie.html">mod_session_cookie</a></code>, and the session is not protected with
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="module"><a href="/mod/mod_session_crypto.html">mod_session_crypto</a></code>, the passphrase is open to potential exposure
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin through a dictionary attack. Regardless of how the session is configured,
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin ensure that this directive is not used within URL spaces where private user data
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin could be exposed, or sensitive transactions can be conducted. Use at own risk.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormSize" id="AuthFormSize">AuthFormSize</a> <a name="authformsize" id="authformsize">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The largest size of the form in bytes that will be parsed for the login details</td></tr>
fd5a091eb07540ab440f8ac3a277caa590be46c1humbedooh<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormSize <var>size</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>8192</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformsize">AuthFormSize</a></code> directive specifies
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the maximum size of the body of the request that will be parsed to find the login form.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>If a login request arrives that exceeds this size, the whole request will be aborted
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin with the HTTP response code <code>HTTP_REQUEST_TOO_LARGE</code>.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>If you have populated the form with fields described by
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code>,
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive"><a href="#authformmimetype">AuthFormMimetype</a></code> and
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <code class="directive"><a href="#authformbody">AuthFormBody</a></code>, you probably want to set this
47c70d0375af94ba766091e7bc3a7ed93331ae86rbowen field to a similar size as the <code class="directive"><a href="/mod/mod_request.html#keptbodysize">KeptBodySize</a></code>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin directive.</p>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<div class="directive-section"><h2><a name="AuthFormUsername" id="AuthFormUsername">AuthFormUsername</a> <a name="authformusername" id="authformusername">Directive</a></h2>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the login username</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormUsername <var>fieldname</var></code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_username</code></td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
32d8ef43efe6077a8c34efb5c34bbaa5742ca2bfrbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.0 and later</td></tr>
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin <p>The <code class="directive"><a href="#authformusername">AuthFormUsername</a></code> directive specifies
d9b843d090f14405079b4a61a493316cd3f1e5b9minfrin the name of an HTML field which, if present, will contain the username to be used to log
253547fb9cc7986e84ff68aef076f664fc4169dctakashi<p><span>Available Languages: </span><a href="/en/mod/mod_auth_form.html" title="English"> en </a> |
253547fb9cc7986e84ff68aef076f664fc4169dctakashi<a href="/fr/mod/mod_auth_form.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p>
727872d18412fc021f03969b8641810d8896820bhumbedooh</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>
727872d18412fc021f03969b8641810d8896820bhumbedoohvar comments_shortname = 'httpd';
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohvar comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_auth_form.html';
0d0ba3a410038e179b695446bb149cce6264e0abnd(function(w, d) {
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread"><\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd var s = d.createElement('script');
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd})(window, document);
205f749042ed530040a4f0080dbcb47ceae8a374rjung<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>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<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[//><!--
0d0ba3a410038e179b695446bb149cce6264e0abndif (typeof(prettyPrint) !== 'undefined') {
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd prettyPrint();