From: Joshua Slive Date: Mon, 18 Feb 2002 00:18:50 +0000 (+0000) Subject: Convert a few more modules to xml format. The transformations are X-Git-Tag: 2.0.33~219 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec1281ccfd6b6983c2044d353f025f320a21ce60;p=apache Convert a few more modules to xml format. The transformations are not yet live. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93466 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_alias.xml b/docs/manual/mod/mod_alias.xml new file mode 100644 index 0000000000..84db11dc1c --- /dev/null +++ b/docs/manual/mod/mod_alias.xml @@ -0,0 +1,279 @@ + + + + +mod_alias +Provides for mapping different parts of the host + filesystem in the document tree and for URL redirection +Base +mod_alias.c +alias_module + + +

The directives contained in this module allow for manipulation + and control of URLs as requests arrive at the server. The + Alias and ScriptAlias directives are used to + map between URLs and filesystem paths. This allows for content + which is not directly under the DocumentRoot served as part of the web + document tree. The ScriptAlias directive has the + additional effect of marking the target directory as containing + only CGI scripts.

+ +

The Redirect + directives are used to instruct clients to make a new request with + a different URL. They are often used when a resource has moved to + a new location.

+ +

A more powerful and flexible set of directives for + manipulating URLs is contained in the mod_rewrite + module.

+
+ + +Alias +Maps URLs to filesystem locations + Alias URL-path + file-path|directory-path +server configvirtual host + + + + +

The Alias directive allows documents to + be stored in the local filesystem other than under the + DocumentRoot. URLs with a + (%-decoded) path beginning with url-path will be mapped + to local files beginning with directory-filename.

+ +

Example:

+ +Alias /image /ftp/pub/image + +

A request for http://myserver/image/foo.gif would cause the + server to return the file /ftp/pub/image/foo.gif.

+ +

Note that if you include a trailing / on the + url-path then the server will require a trailing / in + order to expand the alias. That is, if you use Alias + /icons/ /usr/local/apache/icons/ then the url + /icons will not be aliased.

+ +

Note that you may need to specify additional <Directory> sections which cover + the destination of aliases. Aliasing occurs before + <Directory> sections + are checked, so only the destination of aliases are affected. + (Note however <Location> + sections are run through once before aliases are performed, so + they will apply.)

+ +
+
+ + +AliasMatch +Maps URLs to filesystem locations using regular +expressions +AliasMatch regex + file-path|directory-path +server configvirtual host + + + +

This directive is equivalent to Alias, but makes use of standard + regular expressions, instead of simple prefix matching. The + supplied regular expression is matched against the URL-path, and + if it matches, the server will substitute any parenthesized + matches into the given string and use it as a filename. For + example, to activate the /icons directory, one might + use:

+ + AliasMatch ^/icons(.*) /usr/local/apache/icons$1 + +
+
+ + +Redirect +Sends an external redirect asking the client to fetch +a different URL +Redirect [status] URL-path URL +server configvirtual host +directory.htaccess +FileInfo + + +

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. URL-path a (%-decoded) + path; any requests for documents beginning with this path will + be returned a redirect error to a new (%-encoded) URL beginning + with URL.

+ +

Example:

+ +Redirect /service http://foo2.bar.com/service + +

If the client requests http://myserver/service/foo.txt, it + will be told to access http://foo2.bar.com/service/foo.txt + instead.

+ +Note

Redirect directives take precedence over +Alias and ScriptAlias directives, irrespective of their ordering in +the configuration file. Also, URL-path must be an absolute +path, not a relative path, even when used with .htaccess files or +inside of <Directory> +sections.

+ +

If no status argument is given, the redirect will + be "temporary" (HTTP status 302). This indicates to the client + that the resource has moved temporarily. The status + argument can be used to return other HTTP status codes:

+ +
+
permanent
+ +
Returns a permanent redirect status (301) indicating that + the resource has moved permanently.
+ +
temp
+ +
Returns a temporary redirect status (302). This is the + default.
+ +
seeother
+ +
Returns a "See Other" status (303) indicating that the + resource has been replaced.
+ +
gone
+ +
Returns a "Gone" status (410) indicating that the + resource has been permanently removed. When this status is + used the url argument should be omitted.
+
+ +

Other status codes can be returned by giving the numeric + status code as the value of status. If the status is + between 300 and 399, the url argument must be present, + otherwise it must be omitted. Note that the status must be + known to the Apache code (see the function + send_error_response in http_protocol.c).

+
+
+ + +RedirectMatch +Sends an external redirect asking the client to fetch +a different URL based on a regular expression match of the +current URL +RedirectMatch [status] regex URL +server configvirtual host +directory.htaccess +FileInfo + + +

This directive is equivalent to Redirect, but makes use of standard + regular expressions, instead of simple prefix matching. The + supplied regular expression is matched against the URL-path, and + if it matches, the server will substitute any parenthesized + matches into the given string and use it as a filename. For + example, to redirect all GIF files to like-named JPEG files on + another server, one might use:

+ + RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg + +
+
+ + +RedirectTemp +Sends an external temporary redirect asking the client to fetch +a different URL +RedirectTemp URL-path URL +server configvirtual host +directory.htaccess +FileInfo + + +

This directive makes the client know that the Redirect is + only temporary (status 302). Exactly equivalent to + Redirect temp.

+
+
+ + +RedirectPermanent +Sends an external permanent redirect asking the client to fetch +a different URL +RedirectPermanent URL-path URL +server configvirtual host +directory.htaccess +FileInfo + + +

This directive makes the client know that the Redirect is + permanent (status 301). Exactly equivalent to Redirect + permanent.

+
+
+ + +ScriptAlias +Maps a URL to a filesystem location and designates the +target as a CGI script +ScriptAlias +URL-path file-path|directory-path +server configvirtual host + + + +

The ScriptAlias directive has the same + behavior as the Alias + directive, except that in addition it marks the target directory + as containing CGI scripts that will be processed by mod_cgi's cgi-script handler. URLs with a + (%-decoded) path beginning with URL-path will be mapped + to scripts beginning with the second argument which is a full + pathname in the local filesystem.

+ +

Example:

+ +ScriptAlias /cgi-bin/ /web/cgi-bin/ + +

A request for http://myserver/cgi-bin/foo would cause the + server to run the script /web/cgi-bin/foo.

+
+
+ + +ScriptAliasMatch +Maps a URL to a filesystem location using a regular expression +and designates the target as a CGI script +ScriptAliasMatch +regex file-path|directory-path +server configvirtual host + + + +

This directive is equivalent to ScriptAlias, but makes use of standard + regular expressions, instead of simple prefix matching. The + supplied regular expression is matched against the URL-path, + and if it matches, the server will substitute any parenthesized + matches into the given string and use it as a filename. For + example, to activate the standard /cgi-bin, one + might use:

+ + ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 + +
+
+ +
+ diff --git a/docs/manual/mod/mod_asis.xml b/docs/manual/mod/mod_asis.xml new file mode 100644 index 0000000000..171e2b6681 --- /dev/null +++ b/docs/manual/mod/mod_asis.xml @@ -0,0 +1,69 @@ + + + + +mod_asis +Sends files that contain their own +HTTP headers +Base +mod_asis.c +asis_module + + +

This module provides the handler send-as-is + which causes Apache to send the document without adding most of + the usual HTTP headers.

+ +

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.

+ +

For historical reasons, this module will also process any + file with the mime type httpd/send-as-is.

+
+ +
Usage + +

In the server configuration file, associate files with the + send-as-is handler e.g.

+ +AddHandler send-as-is asis + +

The contents of any file with a .asis 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.

+ +

Here's an example of a file whose contents are sent as + is so as to tell the client that a file has + redirected.

+ + +Status: 301 Now where did I leave that URL
+ Location: http://xyz.abc.com/foo/bar.html
+ Content-type: text/html
+
+ <HTML>
+ <HEAD>
+ <TITLE>Lame excuses'R'us</TITLE>
+ </HEAD>
+ <BODY>
+ <H1>Fred's exceptionally wonderful page has moved + to
+ <A + HREF="http://xyz.abc.com/foo/bar.html">Joe's</A> + site.
+ </H1>
+ </BODY>
+ </HTML> +
+ +

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 not add a + Last-Modified header; it probably should.

+
+ +
diff --git a/docs/manual/mod/mod_auth.xml b/docs/manual/mod/mod_auth.xml new file mode 100644 index 0000000000..2bde9f139c --- /dev/null +++ b/docs/manual/mod/mod_auth.xml @@ -0,0 +1,168 @@ + + + + +mod_auth +User authentication using text files +Base +mod_auth.c +auth_module + + + +

This module allows the use of HTTP Basic Authentication to + restrict access by looking up users in plain text password and + group files. Similar functionality and greater scalability is + provided by mod_auth_dbm. HTTP Digest + Authentication is provided by + mod_auth_digest.

+ +
+Require +Satisfy +AuthName +AuthType + + +AuthGroupFile +Sets the name of a text file containing the list +of user groups for authentication +AuthGroupFile file-path +directory.htaccess + +AuthConfig + + +

The AuthGroupFile directive sets the + name of a textual file containing the list of user groups for user + authentication. File-path is the path to the group + file. If it is not absolute (i.e., if it doesn't begin + with a slash), it is treated as relative to the ServerRoot.

+ +

Each line of the group file contains a groupname followed by a + colon, followed by the member usernames separated by spaces. + Example:

+ +mygroup: bob joe anne + +

Note that searching large text files is very + inefficient; AuthDBMGroupFile should be used + instead.

+ +Security +

Make sure that the AuthGroupFile is stored outside + the document tree of the web-server; do not put it in + the directory that it protects. Otherwise, clients will be able + to download the AuthGroupFile.

+
+
+
+ + +AuthUserFile +Sets the name of a text file containing the list of users and +passwords for authentication +AuthUserFile file-path +directory.htaccess + +AuthConfig + + +

The AuthUserFile directive sets the name + of a textual file containing the list of users and passwords for + user authentication. File-path is the path to the user + file. If it is not absolute (i.e., if it doesn't begin + with a slash), it is treated as relative to the ServerRoot.

+ +

Each line of the user file file contains a username followed by + a colon, followed by the crypt() encrypted + password. The behavior of multiple occurrences of the same user is + undefined.

+ +

The utility htpasswd + which is installed as part of the binary distribution, or which + can be found in src/support, is used to maintain + this password file. See the man page for more + details. In short:

+ +

Create a password file 'Filename' with 'username' as the + initial ID. It will prompt for the password:

+htpasswd -c Filename username + +

Adds or modifies in password file 'Filename' the 'username':

+htpasswd Filename username2 + +

Note that searching large text files is very + inefficient; AuthDBMUserFile should be used + instead.

+ +Security

Make sure that the AuthUserFile is +stored outside the document tree of the web-server; do not +put it in the directory that it protects. Otherwise, clients will be +able to download the AuthUserFile.

+ +
+
+ + +AuthAuthoritative +Sets whether authorization and authentication are +passed to lower level modules +AuthAuthoritative on|off +AuthAuthoritative on +directory.htaccess + +AuthConfig + + + +This information has not been updated for Apache 2.0, which +uses a different system for module ordering. + +

Setting the AuthAuthoritative directive + explicitly to 'off' allows for both + authentication and authorization to be passed on to lower level + modules (as defined in the Configuration and + modules.c files) if there is no + userID or rule matching the supplied + userID. If there is a userID and/or rule specified; the usual + password and access checks will be applied and a failure will give + an Authorization Required reply.

+ +

So if a userID appears in the database of more than one module; + or if a valid Require + directive applies to more than one module; then the first module + will verify the credentials; and no access is passed on; + regardless of the AuthAuthoritative setting.

+ +

A common use for this is in conjunction with one of the + database modules; such as auth_dbm, + mod_auth_msql, and mod_auth_anon. + These modules supply the bulk of the user credential checking; but + a few (administrator) related accesses fall through to a lower + level with a well protected AuthUserFile.

+ +

By default; control is not passed on; and an unknown userID or + rule will result in an Authorization Required reply. Not setting + it thus keeps the system secure; and forces an NCSA compliant + behaviour.

+ + Security Do consider the implications of + allowing a user to allow fall-through in his .htaccess file; and + verify that this is really what you want; Generally it is easier + to just secure a single .htpasswd file, than it is to secure a + database such as mSQL. Make sure that the AuthUserFile is stored outside the + document tree of the web-server; do not put it in the + directory that it protects. Otherwise, clients will be able to + download the AuthUserFile. + +
+
+ +
\ No newline at end of file