Commit 721a94e3 authored by brian's avatar brian
Browse files

Moving files to mod/


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@76995 13f79535-47bb-0310-9956-ffa450edef68
parent c5916efd
Loading
Loading
Loading
Loading
+125 −0
Original line number Diff line number Diff line
<!--%hypertext -->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_access</TITLE>
</HEAD>

<BODY>
<IMG SRC="../images/apache_sub.gif" ALT="">
<!--/%hypertext -->
<H1>Module mod_access</h1>

This module is contained in the <code>mod_access.c</code> file, and
is compiled in by default. It provides access control based on client
hostname or IP address.

<!--%hypertext -->
<menu>
<li><A HREF="#allow">allow</A>
<li><A HREF="#deny">deny</A>
<li><A HREF="#order">order</A>
</menu>
<hr>
<!--/%hypertext -->

<A name="allow"><h2>allow</h2></A>
<!--%plaintext &lt;?INDEX {\tt allow} directive&gt; -->
<strong>Syntax:</strong> allow 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<p>

The allow directive affects which hosts can access a given directory; it is
typically used within a <A HREF="core.html#limit">&lt;Limit&gt;</A> section.
<em>Host</em> is one of the following:
<dl>
<dt><code>all</code>
<dd>all hosts are allowed access
<dt>A (partial) domain-name
<dd>host whose name is, or ends in, this string are allowed access.
<dt>A full IP address
<dd>An IP address of a host allowed access
<dt>A partial IP address
<dd>The first 1 to 3 bytes of an IP address, for subnet restriction.
</dl>

Example:<blockquote><code>allow from .ncsa.uiuc.edu</code></blockquote>
All hosts in the specified domain are allowed access.<p>

Note that this compares whole components; <code>bar.edu</code>
would not match <code>foobar.edu</code>.<p>

See also <A HREF="#deny">deny</A> and <A HREF="#order">order</A>.<p><hr>

<A name="deny"><h2>deny</h2></A>
<!--%plaintext &lt;?INDEX {\tt deny} directive&gt; -->
<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<p>

The deny directive affects which hosts can access a given directory; it is
typically used within a <A HREF="core.html#limit">&lt;Limit&gt;</A> section.
<em>Host</em> is one of the following:
<dl>
<dt><code>all</code>
<dd>all hosts are denied access
<dt>A (partial) domain-name
<dd>host whose name is, or ends in, this string are denied access.
<dt>A full IP address
<dd>An IP address of a host denied access
<dt>A partial IP address
<dd>The first 1 to 3 bytes of an IP address, for subnet restriction.
</dl>

Example:<blockquote><code>deny from 16</code></blockquote>
All hosts in the specified network are denied access.<p>

Note that this compares whole components; <code>bar.edu</code>
would not match <code>foobar.edu</code>.<p>

See also <A HREF="#allow">allow</A> and <A HREF="#order">order</A>.<p><hr>

<A name="order"><h2>order</h2></A>
<!--%plaintext &lt;?INDEX {\tt order} directive&gt; -->
<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<p>

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
of
<dl>
<dt>deny,allow
<dd>the deny directives are evaluated before the allow directives.
<dt>allow,deny
<dd>the allow directives are evaluated before the deny directives.
<dt>mutual-failure
<dd>Only those hosts which appear on the allow list and do not appear
on the deny list are granted access.
</dl>

Example:
<blockquote><code>
order deny,allow
deny from all
allow from .ncsa.uiuc.edu
</code></blockquote>
Hosts in the ncsa.uiuc.edu domain are allowed access; all other hosts are
denied access.

<!--%hypertext -->
<hr>

<A HREF="../"><IMG SRC="../images/apache_home.gif" ALT="Home"></A>
<A HREF="./"><IMG SRC="../images/apache_index.gif" ALT="Index"></A>

</BODY>
</HTML>
<!--/%hypertext -->
+81 −0
Original line number Diff line number Diff line
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_actions</TITLE>
</HEAD>

<BODY>
<IMG SRC="../images/apache_sub.gif" ALT="">
<H1>Apache module mod_actions</h1>

This module is contained in the <code>mod_actions.c</code> file, and
is compiled in by default. It provides for
executing CGI scripts based on media type or request method. It is not
present in versions prior to Apache 1.1.

<h2>Summary</h2>

This module lets you run CGI scripts whenever a file of a certain type
is requested. This makes it much easier to execute scripts that
process files.

<h2>Directives</h2>
<ul>
<li><A HREF="#action">Action</A>
<li><A HREF="#script">Script</A>
</ul>

<hr>

<A name="action"><h2>Action</h2></A>
<strong>Syntax:</strong> Action <em>mime-type cgi-script</em><br>
<strong>Context:</strong> server config, virutal host, directory, .htaccess<br>
<strong>Override:</strong> FileInfo<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_actions<br>
<strong>Compatibility:</strong> Action is only available in Apache 1.1
and later<p>

This directive adds an action, which will activate <em>cgi-script</em> when
a file of content type <em>mime-type</em> is requested. It sends the
URL and file path of the requested document using the standard
CGI PATH_INFO and PATH_TRANSLATED environment variables.

<hr>

<A name="script"><h2>Script</h2></A>
<strong>Syntax:</strong> Script <em>method cgi-script</em><br>
<strong>Context:</strong> server config, virutal host, directory<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_actions<br>
<strong>Compatibility:</strong> Script is only available in Apache 1.1
and later<p>

<p>This directive adds an action, which will activate <em>cgi-script</em> when
a file is requested using the method of <em>method</em>, which can be
one of <code>GET</code>, <code>POST</code>, <code>PUT</code> or
<code>DELETE</code>. It sends the
URL and file path of the requested document using the standard
CGI PATH_INFO and PATH_TRANSLATED environment variables. 

<p>Note that the Script command defines default actions only. If a CGI
script is called, or some other resource that is capable of handling
the requested method internally, it will do so. Also note that script
with a method of <code>GET</code> will only be called if there are
query arguments present (e.g. foo.html?hi). Otherwise, the request
will proceed normally.

<p>Examples:
<pre>
    Script GET /cgi-bin/search     #e.g. for &lt;ISINDEX&gt;-style searching
    Script PUT /~bob/put.cgi
</pre>

<p><hr>

<A HREF="../"><IMG SRC="../images/apache_home.gif" ALT="Home"></A>
<A HREF="./"><IMG SRC="../images/apache_index.gif" ALT="Index"></A>

</BODY>
</HTML>
+93 −0
Original line number Diff line number Diff line
<!--%hypertext -->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_alias</TITLE>
</HEAD>

<BODY>
<IMG SRC="../images/apache_sub.gif" ALT="">
<!--/%hypertext -->
<H1>Module mod_alias</h1>

This module is contained in the <code>mod_alias.c</code> file, and
is compiled in by default. It provides for mapping different parts of the
host filesystem in the the document tree, and for URL redirection.

<!--%hypertext -->
<menu>
<li><A HREF="#alias">Alias</A>
<li><A HREF="#redirect">Redirect</A>
<li><A HREF="#scriptalias">ScriptAlias</A>
</menu>
<hr>
<!--/%hypertext -->

<A name="alias"><h2>Alias</h2></A>
<!--%plaintext &lt;?INDEX {\tt Alias} directive&gt; -->
<strong>Syntax:</strong> Alias <em>url-path directory-filename</em><br>
<Strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_alias<br>
<strong>Compatibility:</strong> Alias is only available in Apache 1.1
and later<p>

The Alias directive allows documents to be stored in the local filesystem
other than under the <A HREF="core.html#documentroot">DocumentRoot</A>.
URLs with a (%-decoded) path beginning with <em>url-path</em> will be
mapped to local files beginning with <em>directory-filename</em>.
Example:
<blockquote><code>Alias /image /ftp/pub/image</code></blockquote>
A request for http://myserver/image/foo.gif would cause the server to
return the file /ftp/pub/image/foo.gif.<p>
See also <A HREF="#scriptalias">ScriptAlias</A>.<p><hr>

<A name="redirect"><h2>Redirect</h2></A>
<!--%plaintext &lt;?INDEX {\tt Redirect} directive&gt; -->
<strong>Syntax:</strong> Redirect <em>url-path url</em><br>
<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_alias<br>
<strong>Compatibility:</strong> The directory and .htaccess context's
are only available in versions 1.1 and later<p>

The Redirect directive maps an old URL into a new one. The new URL is returned
to the client which attempts to fetch it again with the new address.
<em>Url-path</em> a (%-decoded) path; any requests for documents beginning with
this path will be returned a redirect error to a new (%-encoded) url
beginning with <em>url</em>. Example:
<blockquote><code>Redirect /service
http://foo2.bar.com/service</code></blockquote>
If the client requests http://myserver/service/foo.txt, it will be told to
access http://foo2.bar.com/service/foo.txt instead.<p>
Note: Redirect directives take precedence over Alias and ScriptAlias
directives, irrespective of their ordering in the configuration file.<p><hr>

<A name="scriptalias"><h2>ScriptAlias</h2></A>
<!--%plaintext &lt;?INDEX {\tt ScriptAlias} directive&gt; -->
<strong>Syntax:</strong> ScriptAlias <em>url-path directory-filename</em><br>
<Strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_alias<br>
<strong>Compatibility:</strong> ScriptAlias is only available in Apache 1.1
and later<p>

The ScriptAlias directive has the same behaviour as the
<A HREF="#alias">Alias</A> directive, except that in addition it
marks the target directory as containing CGI scripts.
URLs with a (%-decoded) path beginning with <em>url-path</em> will be
mapped to scripts beginning with <em>directory-filename</em>.
Example:
<blockquote><code>ScriptAlias /cgi-bin/ /web/cgi-bin/</code></blockquote>
A request for http://myserver/cgi-bin/foo would cause the server to
run the script /web/cgi-bin/foo.<p>

<!--%hypertext -->
<hr>

<A HREF="../"><IMG SRC="../images/apache_home.gif" ALT="Home"></A>
<A HREF="./"><IMG SRC="../images/apache_index.gif" ALT="Index"></A>

</BODY>
</HTML>
<!--/%hypertext -->
+67 −0
Original line number Diff line number Diff line
<!--%hypertext -->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_asis</TITLE>
</HEAD>

<BODY>
<IMG SRC="../images/apache_sub.gif" ALT="">
<!--/%hypertext -->
<H1>Module mod_asis</h1>

This module is contained in the <code>mod_asis.c</code> file, and
is compiled in by default. It provides for <code>.asis</code> files. Any
document with mime type <code>httpd/send-as-is</code> will be processed by
this module.
<!--%plaintext &lt;?INDEX {\tt httpd/send-as-is} mime type&gt; -->

<h2>Purpose</h2>
To allow file types to be defined such that Apache sends them without
adding HTTP headers.<P>

This can be used to send any kind of data from the server, including redirects
and other special HTTP responses, without requiring a cgi-script or an nph
script.
<h2>Usage</h2>
In the server configuration file, define a new mime type called
<code>httpd/send-as-is</code> e.g.
<blockquote><code>AddType httpd/send-as-is asis</code></blockquote>
this defines the <code>.asis</code> file extension as being of the new
<code>httpd/send-as-is</code> mime type. The contents of any file with a
<code>.asis</code> extension will then be sent by Apache to the client with
almost no changes. Clients will need HTTP headers to be attached, so do not
forget them. A Status: header is also required; the data should be the
3-digit HTTP response code, followed by a textual message.<p>

Here's an example of a file whose contents are sent <em>as is</em> so as to
tell the client that a file has redirected.
<blockquote><code>
Status: 302 Now where did I leave that URL <br>
Location: http://xyz.abc.com/foo/bar.html <br>
Content-type: text/html <br>
<br>
&lt;HTML&gt; <br>
&lt;HEAD&gt; <br>
&lt;TITLE&gt;Lame excuses'R'us&lt;/TITLE&gt; <br>
&lt;/HEAD&gt; <br>
&lt;BODY&gt; <br>
&lt;H1&gt;Fred's exceptionally wonderful page has moved to <br>
&lt;A HREF="http://xyz.abc.com/foo/bar.html"&gt;Joe's&lt;/A&gt; site.  <br>
&lt;/H1&gt; <br>
&lt;/BODY&gt; <br>
&lt;/HTML&gt;
</code></blockquote>
Notes: the server always adds a Date: and Server: header to the data returned
to the client, so these should not be included in the file.
The server does <em>not</em> add a Last-Modified header; it probably should.
<P>

<!--%hypertext -->
<HR>

<A HREF="../"><IMG SRC="../images/apache_home.gif" ALT="Home"></A>
<A HREF="./"><IMG SRC="../images/apache_index.gif" ALT="Index"></A>
</BODY>
</HTML>
<!--/%hypertext -->
+84 −0
Original line number Diff line number Diff line
<!--%hypertext -->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_auth</TITLE>
</HEAD>

<BODY>
<IMG SRC="../images/apache_sub.gif" ALT="">
<!--/%hypertext -->
<H1>Module mod_auth</h1>

This module is contained in the <code>mod_auth.c</code> file, and
is compiled in by default. It provides for user authentication using
textual files.

<!--%hypertext -->
<menu>
<li><A HREF="#authgroupfile">AuthGroupFile</A>
<li><A HREF="#authuserfile">AuthUserFile</A>
</menu>
<hr>
<!--/%hypertext -->

<A name="authgroupfile"><h2>AuthGroupFile</h2></A>
<!--%plaintext &lt;?INDEX {\tt AuthGroupFile} directive&gt; -->
<strong>Syntax:</strong> AuthGroupFile <em>filename</em><br>
<Strong>Context:</strong> directory, .htaccess<br>
<Strong>Override:</strong> AuthConfig<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_auth<p>

The AuthGroupFile directive sets the name of a textual file containing the list
of user groups for user authentication. <em>Filename</em> is the absolute path
to the group file.<p>
Each line of the group file contains a groupname followed by a colon, followed
by the member usernames separated by spaces. Example:
<blockquote><code>mygroup: bob joe anne</code></blockquote>
Note that searching large groups files is <em>very</em> inefficient;
<A HREF="mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</A> should
be used instead.<p>

Security: make sure that the AuthGroupFile is stored outside the
document tree of the webserver; do <em>not</em> put it in the directory that
it protects. Otherwise, clients will be able to download the AuthGroupFile.<p>

See also <A HREF="core.html#authname">AuthName</A>,
<A HREF="core.html#authtype">AuthType</A> and
<A HREF="#authuserfile">AuthUserFile</A>.<p><hr>

<A name="authuserfile"><h2>AuthUserFile</h2></A>
<!--%plaintext &lt;?INDEX {\tt AuthUserFile} directive&gt; -->
<strong>Syntax:</strong> AuthUserFile <em>filename</em><br>
<Strong>Context:</strong> directory, .htaccess<br>
<Strong>Override:</strong> AuthConfig<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_auth<p>

The AuthUserFile directive sets the name of a textual file containing the list
of users and passwords for user authentication. <em>Filename</em> is the
absolute path to the user file.<p>
Each line of the user file file contains a username followed by a colon,
followed by the crypt() encrypted password. The behaviour of multiple
occurrences of the same user is undefined.<p>
Note that searching user groups files is inefficient;
<A HREF="mod_auth_dbm.html#authdbmuserfile">AuthDBMUserFile</A> should
be used instead.<p>

Security: make sure that the AuthUserFile is stored outside the
document tree of the webserver; do <em>not</em> put it in the directory that
it protects. Otherwise, clients will be able to download the AuthUserFile.<p>

See also <A HREF="core.html#authname">AuthName</A>,
<A HREF="core.html#authtype">AuthType</A> and
<A HREF="#authgroupfile">AuthGroupFile</A>.<p>

<!--%hypertext -->
<hr>
<A HREF="../"><IMG SRC="../images/apache_home.gif" ALT="Home"></A>
<A HREF="./"><IMG SRC="../images/apache_index.gif" ALT="Index"></A>

</BODY>
</HTML>
<!--/%hypertext -->
Loading