This module provides core authentication capabilities to
allow or deny access to portions of the web site.
Extended authentication providers can be created
within the configuration file and assigned an alias name. The alias
providers can then be referenced through the directives
This example checks for passwords in two different text files.
The example below creates two different ldap authentication provider aliases based on the ldap provider. This allows a single authenticated location to be serviced by multiple ldap hosts:
This directive sets the name of the authorization realm for a
directory. This realm is given to the client so that the user
knows which username and password to send.
For example:
The string provided for the AuthName
is what will
appear in the password dialog provided by most browsers.
From 2.5.0, expression syntax can be used inside the directive to produce the name dynamically.
For example:
This directive selects the type of user authentication for a
directory. The authentication types available are None
,
Basic
(implemented by
Digest
(implemented by Form
(implemented by
To implement authentication, you must also use the
The authentication type None
disables authentication.
When authentication is enabled, it is normally inherited by each
subsequent configuration section,
unless a different authentication type is specified. If no
authentication is desired for a subsection of an authenticated
section, the authentication type None
may be used;
in the following example, clients may access the
/www/docs/public
directory without authenticating:
From 2.5.0, expression syntax can be used inside the directive to specify the type dynamically.
<AuthnProviderAlias>
and
</AuthnProviderAlias>
are used to enclose a group of
authentication directives that can be referenced by the alias name
using one of the directives