0N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
0N/A<
TITLE>Apache module mod_access</
TITLE>
0N/A<!-- Background white, links blue (unvisited), navy (visited), red (active) --> 0N/A<
H1 ALIGN="CENTER">Module mod_access</
h1>
2362N/Ais compiled in by default. It provides access control based on client
0N/A<
li><
A HREF="#allow">allow</
A>
0N/A<
li><
A HREF="#allowfromenv">allow from env=</
A>
0N/A<
li><
A HREF="#deny">deny</
A>
0N/A<
li><
A HREF="#denyfromenv">deny from env=</
A>
0N/A<
li><
A HREF="#order">order</
A>
0N/A<
h2><
A name="allow">allow directive</
A></
h2>
0N/A<!--%plaintext <?INDEX {\tt allow} directive> --> 0N/A<
strong>Syntax:</
strong> allow from <
em>host host ...</
em><
br>
0N/A<
Strong>Context:</
strong> directory, .htaccess<
br>
0N/A<
Strong>Override:</
strong> Limit<
br>
0N/A<
strong>Status:</
strong> Base<
br>
0N/A<
strong>Module:</
strong> mod_access
0N/AThe allow directive affects which hosts can access a given directory.
0N/A<
em>Host</
em> is one of the following:
0N/A<
dd>All hosts are allowed access
0N/A<
dt>A (partial) domain-name
0N/A<
dd>Hosts whose names match, or end in, this string are allowed access.
0N/A<
dt>A full IP address
0N/A<
dd>An IP address of a host allowed access
0N/A<
dt>A partial IP address
0N/A<
dd>The first 1 to 3 bytes of an IP address, for subnet restriction.
0N/A<
dd>Similar to the previous case, except the netmask consists of nnn
0N/AAll hosts in the specified domain are allowed access.
0N/ANote that this compares whole components; <
code>
bar.edu</
code>
0N/ASee also <
A HREF="#deny">deny</
A>, <
A HREF="#order">order</
A>, and
0N/A<
a name="allowfromenv"><
strong>Syntax:</
strong> allow from env=<
em>variablename</
em></
a><
br>
0N/A<
Strong>Context:</
strong> directory, .htaccess<
br>
0N/A<
Strong>Override:</
strong> Limit<
br>
0N/A<
strong>Status:</
strong> Base<
br>
0N/A<
strong>Module:</
strong> mod_access<
br>
0N/A<
strong>Compatibility:</
strong> Apache 1.2 and above
0N/AThe allow from env directive controls access to a directory by the
0N/Aexistence (or non-existence) of an environment variable.
0N/A<Directory /docroot>
0N/Aallow from env=let_me_in
0N/ASee also <
A HREF="#denyfromenv">deny from env</
A>
0N/Aand <
A HREF="#order">order</
A>.
0N/A<
h2><
A name="deny">deny directive</
A></
h2>
0N/A<!--%plaintext <?INDEX {\tt deny} directive> --> 0N/A<
strong>Syntax:</
strong> deny from <
em>host host ...</
em><
br>
<
Strong>Context:</
strong> directory, .htaccess<
br>
<
Strong>Override:</
strong> Limit<
br>
<
strong>Status:</
strong> Base<
br>
<
strong>Module:</
strong> mod_access
The deny directive affects which hosts can access a given directory.
<
em>Host</
em> is one of the following:
<
dd>all hosts are denied access
<
dt>A (partial) domain-name
<
dd>host whose name is, or ends in, this string are denied access.
<
dd>An IP address of a host denied access
<
dd>The first 1 to 3 bytes of an IP address, for subnet restriction.
<
dd>Similar to the previous case, except the netmask consists of nnn
<
blockquote><
code>deny from 16</
code></
blockquote>
All hosts in the specified network are denied access.
Note that this compares whole components; <
code>
bar.edu</
code>
See also <
A HREF="#allow">allow</
A> and <
A HREF="#order">order</
A>.
<
a name="denyfromenv"><
strong>Syntax:</
strong> deny from env=<
em>variablename</
em></
a><
br>
<
Strong>Context:</
strong> directory, .htaccess<
br>
<
Strong>Override:</
strong> Limit<
br>
<
strong>Status:</
strong> Base<
br>
<
strong>Module:</
strong> mod_access<
br>
<
strong>Compatibility:</
strong> 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.
<Directory /docroot>
See also <
A HREF="#allowfromenv">allow from env</
A>
and <
A HREF="#order">order</
A>.
<
h2><
A name="order">order directive</
A></
h2>
<!--%plaintext <?INDEX {\tt order} directive> --> <
strong>Syntax:</
strong> order <
em>ordering</
em><
br>
<
strong>Default:</
strong> <
code>order deny,allow</
code><
br>
<
strong>Context:</
strong> directory, .htaccess<
br>
<
strong>Override:</
strong> Limit<
br>
<
strong>Status:</
strong> Base<
br>
<
strong>Module:</
strong> mod_access
The order directive controls the order in which <
A HREF="#allow">allow</
A> and
<
A HREF="#deny">deny</
A> directives are evaluated. <
em>Ordering</
em> is one
<
dd>the deny directives are evaluated before the allow directives. (The
<
dd>the allow directives are evaluated before the deny directives. (The
initial state is FORBIDDEN.)
<
dd>Only those hosts which appear on the allow list and do not appear
on the deny list are granted access. (The initial state is irrelevant.)
Note that in all cases every <
code>allow</
code> and <
code>deny</
code>
statement is evaluated, there is no "short-circuiting".
Hosts in the
ncsa.uiuc.edu domain are allowed access; all other hosts are