This module is contained in the mod_access.c
file, and
is compiled in by default. It provides access control based on client
hostname or IP address.
Syntax: Allow from host host ...
Context: directory, .htaccess
Override: Limit
Status: Base
Module: mod_access
The Allow directive affects which hosts can access a given directory. Host is one of the following:
all
Example:
Allow from .ncsa.uiuc.edu
All hosts in the specified domain are allowed access.
Note that this compares whole components; bar.edu
would not match foobar.edu
.
See also Deny, Order, and BrowserMatch.
Syntax: Allow from
env=variablename
Context: directory, .htaccess
Override: Limit
Status: Base
Module: mod_access
Compatibility: Apache 1.2 and above
The Allow from env
directive controls access to a directory by the
existence (or non-existence) of an environment variable.
Example:
In this case browsers with the user-agent string KnockKnock/2.0 will be allowed access, and all others will be denied.BrowserMatch ^KnockKnock/2.0 let_me_in <Directory /docroot> Order Deny,Allow Deny from all Allow from env=let_me_in </Directory>
See also Deny from env and Order.
Syntax: Deny from host host ...
Context: directory, .htaccess
Override: Limit
Status: Base
Module: mod_access
The Deny
directive affects which hosts can access a given directory.
Host is one of the following:
all
Example:
Deny from 16
All hosts in the specified network are denied access.
Note that this compares whole components; bar.edu
would not match foobar.edu
.
Syntax: Deny from
env=variablename
Context: directory, .htaccess
Override: Limit
Status: Base
Module: mod_access
Compatibility: Apache 1.2 and above
The Deny from env
directive controls access to a directory by the
existence (or non-existence) of an environment variable.
Example:
In this case browsers with the user-agent string BadRobot/0.9 will be denied access, and all others will be allowed.BrowserMatch ^BadRobot/0.9 go_away <Directory /docroot> Order Allow,Deny Allow from all Deny from env=go_away </Directory>
See also Allow from env and Order.
Syntax: Order ordering
Default: Order Deny,Allow
Context: directory, .htaccess
Override: Limit
Status: Base
Module: mod_access
The Order
directive controls the order in which
Allow and Deny directives are
evaluated. Ordering is one
of
Deny
directives are evaluated before the Allow
directives. (The initial state is OK.)
Allow
directives are evaluated before the Deny
directives. (The initial state is FORBIDDEN.)
Allow
list and do not
appear on the Deny
list are granted access. (The initial state is
irrelevant.)
Keywords may only be separated by a comma; no whitespace is allowed between
them.
Note that in all cases every Allow
and Deny
statement is evaluated, there is no "short-circuiting".
Example:
Order Deny,Allow
Deny from all
Allow from .ncsa.uiuc.edu
Hosts in the ncsa.uiuc.edu domain are allowed access; all other hosts are denied access.