Name
require
Synopsis
require [useruser1
user2
...] [groupgroup1
group2
] [valid-user] [valid-user] [valid-group] directory, .htaccess
The key directive that throws password checking into action is
require
.
The
argument, valid-user
, accepts any users that are
found in the password file. Do not mistype this as
valid_user
, or you will get a hard-to-explain
authorization failure when you try to access this site through a
browser. This is because Apache does not care what you put after
require
and will interpret
valid_user
as a username. It would be nice if
Apache returned an error message, but require
is
usable by multiple modules, and there’s no way to
determine (in the current API) what values are valid.
file-owner
[Available after Apache 1.3.20] The supplied username and password
must be in the AuthUserFile
database, and the
username must also match the system’s name for the
owner of the file being requested. That is, if the operating system
says the requested file is owned by jones, then
the username used to access it through the Web must be
jones as well.
file-group
[Available after Apache 1.3.20] The supplied username and password
must be in the AuthUserFile
database, the name of
the group that owns the file must be in the
AuthGroupFile
database, and the username must be a
member of that group. For example, if the operating system says the
requested file is owned by group accounts, the
group accounts must be in the
AuthGroupFile
database, and the username used in the request ...
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.