This module provides access control based on client hostname or IP address.
Status: Base
Source File: mod_access.c
Module Identifier: access_module
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 Allow from env=, Deny and Order.
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:
SetEnvIf User-Agent ^KnockKnock/2.0 let_me_in
<Directory /docroot>
Order Deny,Allow
Deny from all
Allow from env=let_me_in
</Directory>
In this case browsers with the user-agent string KnockKnock/2.0 will
be allowed access, and all others will be denied.
See also Deny from env=, Order and SetEnvIf.
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.
See also Deny from env=, Allow and Order.
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:
SetEnvIf User-Agent ^BadRobot/0.9 go_away
<Directory /docroot>
Order Allow,Deny
Allow from all
Deny from env=go_away
</Directory>
In this case browsers with the user-agent string BadRobot/0.9 will
be denied access, and all others will be allowed.
See also Allow from env=, Order and SetEnvIf.
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.) This ordering has the same effect as Order Allow,Deny
and is deprecated in favor of that configuration.
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.