diff options
Diffstat (limited to 'docs/manual/mod')
43 files changed, 0 insertions, 15208 deletions
diff --git a/docs/manual/mod/core.html b/docs/manual/mod/core.html deleted file mode 100644 index 148eab5155..0000000000 --- a/docs/manual/mod/core.html +++ /dev/null @@ -1,3309 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache Core Features</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> - -<H1 ALIGN="CENTER">Apache Core Features</H1> -<P> -These configuration parameters control the core Apache features, and are -always available. -</P> -<H2>Directives</H2> -<UL> -<LI><A HREF="#accessconfig">AccessConfig</A> -<LI><A HREF="#accessfilename">AccessFileName</A> -<LI><A HREF="#addmodule">AddModule</A> -<LI><A HREF="#allowoverride">AllowOverride</A> -<LI><A HREF="#authname">AuthName</A> -<LI><A HREF="#authtype">AuthType</A> -<LI><A HREF="#bindaddress">BindAddress</A> -<LI><A HREF="#bs2000account">BS2000Account</A> -<LI><A HREF="#clearmodulelist">ClearModuleList</A> -<LI><A HREF="#contentdigest">ContentDigest</A> -<LI><A HREF="#coredumpdirectory">CoreDumpDirectory</A> -<LI><A HREF="#defaulttype">DefaultType</A> -<LI><A HREF="#directory"><Directory></A> -<LI><A HREF="#directorymatch"><DirectoryMatch></A> -<LI><A HREF="#documentroot">DocumentRoot</A> -<LI><A HREF="#documentrootcheck">DocumentRootCheck</A> -<LI><A HREF="#errordocument">ErrorDocument</A> -<LI><A HREF="#errorlog">ErrorLog</A> -<LI><A HREF="#files"><Files></A> -<LI><A HREF="#filesmatch"><FilesMatch></A> -<LI><A HREF="#group">Group</A> -<LI><A HREF="#hostnamelookups">HostNameLookups</A> -<LI><A HREF="#identitycheck">IdentityCheck</A> -<LI><A HREF="#ifdefine"><IfDefine></A> -<LI><A HREF="#ifmodule"><IfModule></A> -<LI><A HREF="#include">Include</A> -<LI><A HREF="#keepalive">KeepAlive</A> -<LI><A HREF="#keepalivetimeout">KeepAliveTimeout</A> -<LI><A HREF="#limit"><Limit></A> -<LI><A HREF="#limitexcept"><LimitExcept></A> -<LI><A HREF="#limitrequestbody">LimitRequestBody</A> -<LI><A HREF="#limitrequestfields">LimitRequestFields</A> -<LI><A HREF="#limitrequestfieldsize">LimitRequestFieldsize</A> -<LI><A HREF="#limitrequestline">LimitRequestLine</A> -<LI><A HREF="#listen">Listen</A> -<LI><A HREF="#listenbacklog">ListenBacklog</A> -<LI><A HREF="#location"><Location></A> -<LI><A HREF="#locationmatch"><LocationMatch></A> -<LI><A HREF="#lockfile">LockFile</A> -<LI><A HREF="#loglevel">LogLevel</A> -<LI><A HREF="#maxclients">MaxClients</A> -<LI><A HREF="#maxkeepaliverequests">MaxKeepAliveRequests</A> -<LI><A HREF="#maxrequestsperchild">MaxRequestsPerChild</A> -<LI><A HREF="#maxspareservers">MaxSpareServers</A> -<LI><A HREF="#minspareservers">MinSpareServers</A> -<LI><A HREF="#namevirtualhost">NameVirtualHost</A> -<LI><A HREF="#options">Options</A> -<LI><A HREF="#pidfile">PidFile</A> -<LI><A HREF="#port">Port</A> -<LI><A HREF="#require">require</A> -<LI><A HREF="#resourceconfig">ResourceConfig</A> -<LI><A HREF="#rlimitcpu">RLimitCPU</A> -<LI><A HREF="#rlimitmem">RLimitMEM</A> -<LI><A HREF="#rlimitnproc">RLimitNPROC</A> -<LI><A HREF="#satisfy">Satisfy</A> -<LI><A HREF="#scoreboardfile">ScoreBoardFile</A> -<LI><A HREF="#scriptinterpretersource">ScriptInterpreterSource</A> -<LI><A HREF="#sendbuffersize">SendBufferSize</A> -<LI><A HREF="#serveradmin">ServerAdmin</A> -<LI><A HREF="#serveralias">ServerAlias</A> -<LI><A HREF="#servername">ServerName</A> -<LI><A HREF="#serverpath">ServerPath</A> -<LI><A HREF="#serverroot">ServerRoot</A> -<LI><A HREF="#serversignature">ServerSignature</A> -<LI><A HREF="#servertokens">ServerTokens</A> -<LI><A HREF="#servertype">ServerType</A> -<LI><A HREF="#startservers">StartServers</A> -<LI><A HREF="#threadsperchild">ThreadsPerChild</A> -<LI><A HREF="#timeout">TimeOut</A> -<LI><A HREF="#usecanonicalname">UseCanonicalName</A> -<LI><A HREF="#user">User</A> -<LI><A HREF="#virtualhost"><VirtualHost></A> -</UL> -<HR> - -<H2><A NAME="accessconfig">AccessConfig directive</A></H2> -<!--%plaintext <?INDEX {\tt AccessConfig} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AccessConfig <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>AccessConfig conf/access.conf</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The server will read this file for more directives after reading the -<A HREF="#resourceconfig">ResourceConfig</A> file. <EM>Filename</EM> is -relative to the <A HREF="#serverroot">ServerRoot</A>. -This feature can be disabled using: -<BLOCKQUOTE><CODE>AccessConfig /dev/null</CODE></BLOCKQUOTE> -Historically, this file only contained -<A HREF="#directory"><Directory></A> sections; in fact it can now -contain any server directive allowed in the <EM>server config</EM> context. -<P><HR> - -<H2><A NAME="accessfilename">AccessFileName directive</A></H2> -<!--%plaintext <?INDEX {\tt AccessFileName} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AccessFileName <EM>filename filename ...</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>AccessFileName .htaccess</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> AccessFileName can accept more than -one filename only in Apache 1.3 and later<P> - -When returning a document to the client the server looks for the first existing -access control file from this list of names in every directory of the path to -the document, if access control files are enabled for that directory. - -For example: -<BLOCKQUOTE><CODE>AccessFileName .acl</CODE></BLOCKQUOTE> -before returning the document /usr/local/web/index.html, the -server will read /.acl, /usr/.acl, /usr/local/.acl and /usr/local/web/.acl -for directives, unless they have been disabled with -<BLOCKQUOTE><CODE> -<Directory /><BR> -AllowOverride None<BR> -</Directory></CODE></BLOCKQUOTE><P><HR> - -<H2><A NAME="addmodule">AddModule directive</A></H2> -<!--%plaintext <?INDEX {\tt AddModule} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddModule <EM>module module ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config <BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> AddModule is only available in -Apache 1.2 and later<P> - -The server can have modules compiled in which are not actively in use. -This directive can be used to enable the use of those modules. The -server comes with a pre-loaded list of active modules; this list can -be cleared with the <A HREF="#clearmodulelist">ClearModuleList</A> -directive.<P><HR> - -<H2><A NAME="allowoverride">AllowOverride directive</A></H2> -<!--%plaintext <?INDEX {\tt AllowOverride} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AllowOverride <EM>override override ...</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>AllowOverride All</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -When the server finds an .htaccess file (as specified by -<A HREF="#accessfilename">AccessFileName</A>) it needs to know which -directives declared in that file can override earlier access information.<P> - -<EM>Override</EM> can be set to <CODE>None</CODE>, in which case the server -will not read the file, <CODE>All</CODE> in which case the server will -allow all the directives, or one or more of the following: -<DL> -<DT>AuthConfig -<DD> -<!--%plaintext <?INDEX {\tt AuthConfig} override> --> -Allow use of the authorization directives -(<A HREF="mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</A>, -<A HREF="mod_auth_dbm.html#authdbmuserfile">AuthDBMUserFile</A>, -<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A>, -<A HREF="#authname">AuthName</A>, <A HREF="#authtype">AuthType</A>, -<A HREF="mod_auth.html#authuserfile">AuthUserFile</A>, -<A HREF="#require">require</A>, <EM>etc.</EM>). -<DT>FileInfo -<DD> -<!--%plaintext <?INDEX {\tt FileInfo} override> --> -Allow use of the directives controlling document types -(<A HREF="mod_mime.html#addencoding">AddEncoding</A>, -<A HREF="mod_mime.html#addlanguage">AddLanguage</A>, -<A HREF="mod_mime.html#addtype">AddType</A>, -<A HREF="#defaulttype">DefaultType</A>, -<A HREF="#errordocument">ErrorDocument</A>, -<A HREF="mod_negotiation.html#languagepriority">LanguagePriority</A>, <EM>etc.</EM>). -<DT>Indexes -<DD> -<!--%plaintext <?INDEX {\tt Indexes} override> --> -Allow use of the directives controlling directory indexing -(<A HREF="mod_autoindex.html#adddescription">AddDescription</A>, -<A HREF="mod_autoindex.html#addicon">AddIcon</A>, -<A HREF="mod_autoindex.html#addiconbyencoding">AddIconByEncoding</A>, -<A HREF="mod_autoindex.html#addiconbytype">AddIconByType</A>, -<A HREF="mod_autoindex.html#defaulticon">DefaultIcon</A>, -<A HREF="mod_dir.html#directoryindex">DirectoryIndex</A>, -<A HREF="mod_autoindex.html#fancyindexing">FancyIndexing</A>, -<A HREF="mod_autoindex.html#headername">HeaderName</A>, -<A HREF="mod_autoindex.html#indexignore">IndexIgnore</A>, -<A HREF="mod_autoindex.html#indexoptions">IndexOptions</A>, -<A HREF="mod_autoindex.html#readmename">ReadmeName</A>, <EM>etc.</EM>). -<DT>Limit -<DD> -<!--%plaintext <?INDEX {\tt Limit} override> --> -Allow use of the directives controlling host access (allow, deny and order). -<DT>Options -<DD> -<!--%plaintext <?INDEX {\tt Options} override> --> -Allow use of the directives controlling specific directory features -(<A HREF="#options">Options</A> and -<A HREF="mod_include.html#xbithack">XBitHack</A>). -</DL><P><HR> - -<H2><A NAME="authname">AuthName directive</A></H2> -<!--%plaintext <?INDEX {\tt AuthName} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthName <EM>auth-domain</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -This directive sets the name of the authorization realm for a directory. -This realm is given to the client so that the user knows which username and -password to send. <SAMP>AuthName</SAMP> takes a single argument; -if the realm name contains spaces, it must be enclosed in quotation marks. -It must be accompanied by <A HREF="#authtype">AuthType</A> and -<A HREF="#require">require</A> directives, and directives such as -<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and -<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> to work.<P><HR> - -<H2><A NAME="authtype">AuthType directive</A></H2> -<!--%plaintext <?INDEX {\tt AuthType} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthType <EM>type</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -This directive selects the type of user authentication for a directory. -Only <CODE>Basic</CODE> and <CODE>Digest</CODE> are currently implemented. -<!--%plaintext <?INDEX {\tt Basic} authentication scheme> --> -It must be accompanied by <A HREF="#authname">AuthName</A> and -<A HREF="#require">require</A> directives, and directives such as -<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and -<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> to work.<P><HR> - -<H2><A NAME="bindaddress">BindAddress directive</A></H2> -<!--%plaintext <?INDEX {\tt BindAddress} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> BindAddress <EM>saddr</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>BindAddress *</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -A Unix® http server can either listen for connections to every -IP address of the server machine, or just one IP address of the server -machine. <EM>Saddr</EM> can be - -<MENU> -<LI>* -<LI>An IP address -<LI>A fully-qualified Internet domain name -</MENU> -If the value is *, then the server will listen for connections on -every IP address, otherwise it will only listen on the IP address -specified. <P> - -Only one <CODE>BindAddress</CODE> directive can be used. For more -control over which address and ports Apache listens to, use the -<CODE><A HREF="#listen">Listen</A></CODE> directive instead of -<CODE>BindAddress</CODE>.<P> - -<CODE>BindAddress</CODE> can be used as an alternative method for -supporting <A HREF="../vhosts/index.html">virtual hosts</A> using -multiple independent servers, instead of using <CODE><A -HREF="#virtualhost"><VirtualHost></A></CODE> sections. - -<P><STRONG>See Also:</STRONG> -<A HREF="../dns-caveats.html">DNS Issues</A><BR> -<STRONG>See Also:</STRONG> -<A HREF="../bind.html">Setting which addresses and ports Apache uses</A></P> - -<HR> - -<H2><A NAME="bs2000account">BS2000Account directive</A></H2> -<!--%plaintext <?INDEX {\tt BS2000Account} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> BS2000Account <EM>account</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>none</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> BS2000Account is only available for -BS2000 machines, as of Apache 1.3 and later.<P> - -The <CODE>BS2000Account</CODE> directive is available for BS2000 hosts -only. It must be used to define the account number for the non-privileged -apache server user (which was configured using the -<A HREF="#user">User</A> directive). -This is required by the BS2000 POSIX subsystem (to change the underlying -BS2000 task environment by performing a sub-LOGON) to prevent CGI scripts -from accessing resources of the privileged account which started the -server, usually <SAMP>SYSROOT</SAMP>.<BR> -Only one <CODE>BS2000Account</CODE> directive can be used. <P> - -<P><STRONG>See Also:</STRONG> -<A HREF="../ebcdic.html">Apache EBCDIC port</A></P> - -<HR> - -<H2><A NAME="clearmodulelist">ClearModuleList directive</A></H2> -<!--%plaintext <?INDEX {\tt ClearModuleList} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ClearModuleList<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ClearModuleList is only available in -Apache 1.2 and later<P> - -The server comes with a built-in list of active modules. This -directive clears the list. It is assumed that the list will then be -re-populated using the <A HREF="#addmodule">AddModule</A> directive.<P><HR> - -<H2><A NAME="contentdigest">ContentDigest directive</A></H2> -<!--%plaintext <?INDEX {\tt ContentDigest} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ContentDigest <EM>on|off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ContentDigest off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, -.htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Options<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> experimental<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ContentDigest is only available in -Apache 1.1 and later<P> - -This directive enables the generation of <CODE>Content-MD5</CODE> headers -as defined in RFC1864 respectively RFC2068.<P> - -MD5 is an algorithm for computing a "message digest" (sometimes called -"fingerprint") of arbitrary-length data, with a high degree of confidence -that any alterations in the data will be reflected in alterations in the -message digest.<P> - -The <CODE>Content-MD5</CODE> header provides an end-to-end message -integrity check (MIC) of the entity-body. A proxy or client may check this -header for detecting accidental modification of the entity-body -in transit. -Example header: -<PRE> Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==</PRE><P> - -Note that this can cause performance problems on your server -since the message digest is computed on every request -(the values are not cached).<P> - -<CODE>Content-MD5</CODE> is only sent for documents served by the -core, and not by any module. For example, SSI documents, output from -CGI scripts, and byte range responses do not have this header. - -<HR> - -<H2><A NAME="coredumpdirectory">CoreDumpDirectory directive</A></H2> -<!--%plaintext <?INDEX {\tt CoreDumpDirectory} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CoreDumpDirectory <EM>directory</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> the same location as ServerRoot<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -This controls the directory to which Apache attempts to switch before -dumping core. The default is in the <A HREF="#serverroot">ServerRoot</A> -directory, however since this should not be writable by the user -the server runs as, core dumps won't normally get written. If you -want a core dump for debugging, you can use this directive to place -it in a different location.<P><HR> - -<H2><A NAME="defaulttype">DefaultType directive</A></H2> -<!--%plaintext <?INDEX {\tt DefaultType} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> DefaultType <EM>MIME-type</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>DefaultType text/html</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, -.htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -There will be times when the server is asked to provide a document -whose type cannot be determined by its MIME types mappings.<P> - -The server must inform the client of the content-type of the document, so in -the event of an unknown type it uses the <CODE>DefaultType</CODE>. For -example: -<BLOCKQUOTE><CODE>DefaultType image/gif</CODE></BLOCKQUOTE> -would be appropriate for a directory which contained many gif images -with filenames missing the .gif extension.<P><HR> - -<H2><A NAME="directory"><Directory> directive</A></H2> -<!--%plaintext <?INDEX {\tt Directory} section directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <Directory <EM>directory</EM>> - ... </Directory> <BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core. <P> - -<Directory> and </Directory> are used to enclose a group of -directives which will apply only to the named directory and sub-directories -of that directory. Any directive which is allowed in a directory -context may be used. <EM>Directory</EM> is either the full path to a directory, -or a wild-card string. In a wild-card string, `?' matches any single character, -and `*' matches any sequences of characters. As of Apache 1.3, you -may also use `[]' character ranges like in the shell. Also as of Apache 1.3 -none of the wildcards match a `/' character, which more closely mimics the -behaviour of Unix shells. -Example: -<PRE> - <Directory /usr/local/httpd/htdocs> - Options Indexes FollowSymLinks - </Directory> -</PRE> - -<P><STRONG>Apache 1.2 and above:</STRONG> -Extended regular expressions can also be used, with the addition of the -<CODE>~</CODE> character. For example:</P> - -<PRE> - <Directory ~ "^/www/.*/[0-9]{3}"> -</PRE> - -would match directories in /www/ that consisted of three numbers. - -<P>If multiple (non-regular expression) directory sections match the -directory (or its parents) containing -a document, then the directives are applied in the order of shortest match -first, interspersed with the directives from the -<A HREF="#accessfilename">.htaccess</A> files. For example, with -<BLOCKQUOTE><CODE> -<Directory /><BR> -AllowOverride None<BR> -</Directory><BR><BR> -<Directory /home/*><BR> -AllowOverride FileInfo<BR> -</Directory></CODE></BLOCKQUOTE> -for access to the document <CODE>/home/web/dir/doc.html</CODE> the -steps are: -<MENU> -<LI>Apply directive <CODE>AllowOverride None</CODE> (disabling -<CODE>.htaccess</CODE> files). -<LI>Apply directive <CODE>AllowOverride FileInfo</CODE> (for directory -<CODE>/home/web</CODE>). -<LI>Apply any FileInfo directives in <CODE>/home/web/.htaccess</CODE> -</MENU> - -<P> -Regular expression directory sections are handled slightly differently -by Apache 1.2 and 1.3. In Apache 1.2 they are interspersed with the normal -directory sections and applied in the order they appear in the configuration -file. They are applied only once, and apply when the shortest match -possible occurs. In Apache 1.3 regular expressions are not considered -until after all of the normal sections have been applied. Then all of -the regular expressions are tested in the order they appeared in the -configuration file. For example, with -<BLOCKQUOTE><CODE> -<Directory ~ abc$><BR> -... directives here ...<BR> -</Directory><BR> -</CODE></BLOCKQUOTE> -Suppose that the filename being accessed is -<CODE>/home/abc/public_html/abc/index.html</CODE>. The server -considers each of <CODE>/</CODE>, <CODE>/home</CODE>, <CODE>/home/abc</CODE>, -<CODE>/home/abc/public_html</CODE>, and <CODE>/home/abc/public_html/abc</CODE> -in that order. In Apache 1.2, when -<CODE>/home/abc</CODE> is considered, the regular expression will match -and be applied. In Apache 1.3 the regular expression isn't considered -at all at that point in the tree. It won't be considered until after -all normal <Directory>s and <CODE>.htaccess</CODE> files have -been applied. Then the regular expression will -match on <CODE>/home/abc/public_html/abc</CODE> and be applied. - -<P> - -<STRONG> -Note that the default Apache access for <Directory /> is -<SAMP>Allow from All</SAMP>. This means that Apache will serve any file -mapped from an URL. It is recommended that you change this with a block -such as -</STRONG> -<PRE> - <Directory /> - Order Deny,Allow - Deny from All - </Directory> -</PRE> -<P> -<STRONG> -and then override this for directories you <EM>want</EM> accessible. -See the -<A - HREF="../misc/security_tips.html" ->Security Tips</A> -page for more details. -</STRONG> -</P> - -The directory sections typically occur in the access.conf file, but they -may appear in any configuration file. <Directory> directives cannot -nest, and cannot appear in a <A HREF="#limit"><Limit></A> or -<A HREF="#limitexcept"><LimitExcept></A> section. -<P> - -<STRONG>See also</STRONG>: <A HREF="../sections.html">How Directory, -Location and Files sections work</A> for an explanation of how these -different sections are combined when a request is received - -<HR> - -<H2><A NAME="directorymatch"><DirectoryMatch></A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <DirectoryMatch <EM>regex</EM>> - ... </DirectoryMatch> <BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core.<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Available in Apache 1.3 and later - -<P><DirectoryMatch> and </DirectoryMatch> are used to enclose a -group of -directives which will apply only to the named directory and sub-directories -of that directory, the same as <A -HREF="#directory"><Directory></A>. However, it takes as an -argument a regular expression. For example:</P> - -<PRE> - <DirectoryMatch "^/www/.*/[0-9]{3}"> -</PRE> - -<P>would match directories in /www/ that consisted of three numbers.</P> - -<P><STRONG>See Also:</STRONG> -<A HREF="#directory"><Directory></A> for a description of how -regular expressions are mixed in with normal <Directory>s. -<BR> -<STRONG>See also</STRONG>: <A HREF="../sections.html">How Directory, -Location and Files sections work</A> for an explanation of how these -different sections are combined when a request is received - -<HR> - -<H2><A NAME="documentroot">DocumentRoot directive</A></H2> -<!--%plaintext <?INDEX {\tt DocumentRoot} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> DocumentRoot <EM>directory-filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>DocumentRoot -/usr/local/apache/htdocs</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -This directive sets the directory from which httpd will serve files. -Unless matched by a directive like Alias, the server appends the path -from the requested URL to the document root to make the path to the -document. Example: -<BLOCKQUOTE><CODE>DocumentRoot /usr/web</CODE></BLOCKQUOTE> -then an access to <CODE>http://www.my.host.com/index.html</CODE> refers -to <CODE>/usr/web/index.html</CODE>. - -<P>There appears to be a bug in mod_dir which causes problems when the -DocumentRoot has a trailing slash (<EM>i.e.</EM>, "DocumentRoot /usr/web/") so -please avoid that. - -<P><HR> - -<H2><A NAME="documentrootcheck">DocumentRootCheck directive</A></H2> -<!--%plaintext <?INDEX {\tt DocumentRootCheck} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> DocumentRootCheck <EM>On/Off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>DocumentRootCheck On</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Available in Apache 1.3.7 and later -<P> -During startup, Apache does a <CODE>stat</CODE> of each -<A HREF="#documentroot">DocumentRoot</A> -to determine if the directory exists. If your server is -configured with lots of DocumentRoot directives (for example, -if you serve numerous virtual hosts), this can <em>greatly</em> increase -the startup time. If you are sure that all the DocumentRoot -entries exist, you can tell Apache to bypass this check using: -<BLOCKQUOTE><CODE>DocumentRootCheck Off</CODE></BLOCKQUOTE> -<P> -This directive is ignored when Apache is called with the -<CODE>-t</CODE> command line option to perform a configuration -test. - -<P><HR> - -<H2><A NAME="errordocument">ErrorDocument directive</A></H2> -<!--%plaintext <?INDEX {\tt ErrorDocument} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ErrorDocument <EM>error-code document</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, -.htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> The directory and .htaccess contexts -are only available in Apache 1.1 and later.<P> - -In the event of a problem or error, Apache can be configured to do -one of four things, - -<OL> -<LI>output a simple hardcoded error message -<LI>output a customized message -<LI>redirect to a local URL to handle the problem/error -<LI>redirect to an external URL to handle the problem/error -</OL> - -<P>The first option is the default, while options 2-4 are configured -using the <CODE>ErrorDocument</CODE> directive, which is followed by -the HTTP response code and a message or URL. - -<P><EM>Messages</EM> in this context begin with a single quote -(<CODE>"</CODE>), which does not form part of the message itself. -Apache will sometimes offer additional information regarding the -problem/error. - -<P>URLs can begin with a slash (/) for local URLs, or be a full -URL which the client can resolve. Examples: -<BLOCKQUOTE><CODE> -ErrorDocument 500 http://foo.example.com/cgi-bin/tester<BR> -ErrorDocument 404 /cgi-bin/bad_urls.pl<BR> -ErrorDocument 401 /subscription_info.html<BR> -ErrorDocument 403 "Sorry can't allow you access today -</CODE></BLOCKQUOTE> - -<P>Note that when you specify an <CODE>ErrorDocument</CODE> that -points to a remote URL (ie. anything with a method such as "http" in -front of it) Apache will send a redirect to the client to tell it -where to find the document, even if the document ends up being -on the same server.. This has several implications, the -most important being that <STRONG>if you use an "ErrorDocument 401" -directive then it must refer to a local document.</STRONG> This results -from the nature of the HTTP basic authentication scheme. - -<P>See Also: <A HREF="../custom-error.html">documentation of customizable -responses.</A><P><HR> - -<H2><A NAME="errorlog">ErrorLog directive</A></H2> -<!--%plaintext <?INDEX {\tt ErrorLog} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ErrorLog <EM>filename</EM>|<CODE>syslog[:facility]</CODE> -<BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ErrorLog logs/error_log</CODE> (Unix)<BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ErrorLog logs/error.log</CODE> - (Windows and OS/2)<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The error log directive sets the name of the file to which the server will log -any errors it encounters. If the filename does not begin with a slash (/) -then it is assumed to be relative to the <A HREF="#serverroot">ServerRoot</A>. -If the filename begins with a pipe (|) then it is assumed to be a command to -spawn to handle the error log. - -<P><STRONG>Apache 1.3 and above:</STRONG> -Using <CODE>syslog</CODE> instead of a filename enables logging via syslogd(8) -if the system supports it. The default is to use syslog facility -<CODE>local7</CODE>, but you can override this by using the -<CODE>syslog:</CODE><EM>facility</EM> syntax where <EM>facility</EM> can be -one of the names usually documented in syslog(1). - -<P> -SECURITY: See the -<A HREF="../misc/security_tips.html#serverroot">security tips</A> -document for details on why your security could be compromised if -the directory where logfiles are stored is writable by anyone other -than the user that starts the server. - -<P><STRONG>See also:</STRONG> <A HREF="#loglevel">LogLevel</A> -<P><HR> - -<H2><A NAME="files"><Files> directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <Files <EM>filename</EM>> -... </Files><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, .htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> only available in Apache -1.2 and above.<P> - -<P>The <Files> directive provides for access control by -filename. It is comparable to the <A -HREF="#directory"><Directory></A> directive and -<A HREF="#location"><Location></A> directives. It -should be matched with a </Files> directive. The -directives given within this section will be applied to any -object with a basename (last component of filename) matching -the specified filename. -<CODE><Files></CODE> sections are processed in the -order they appear in the configuration file, after the -<Directory> sections and <CODE>.htaccess</CODE> files are -read, but before <Location> sections. Note that -<Files> can be nested inside <Directory> -sections to restrict the portion of the filesystem they -apply to.</P> - -<P>The <EM>filename</EM> argument should include a filename, or a -wild-card string, where `?' matches any single character, and `*' matches any -sequences of characters. Extended regular expressions can also be used, -with the addition of -the <CODE>~</CODE> character. For example:</P> - -<PRE> - <Files ~ "\.(gif|jpe?g|png)$"> -</PRE> - -would match most common Internet graphics formats. In Apache 1.3 and -later, <A HREF="#filesmatch"><FilesMatch></A> is preferred, -however. - -<P>Note that unlike <A -HREF="#directory"><CODE><Directory></CODE></A> and <A -HREF="#location"><CODE><Location></CODE></A> sections, -<CODE><Files></CODE> sections can be used inside .htaccess -files. This allows users to control access to their own files, at a -file-by-file level. - -<P> - -<STRONG>See also</STRONG>: <A HREF="../sections.html">How Directory, -Location and Files sections work</A> for an explanation of how these -different sections are combined when a request is received - -<HR> - -<H2><A NAME="filesmatch"><FilesMatch></A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <FilesMatch <EM>regex</EM>> -... </FilesMatch><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, .htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> only available in Apache -1.3 and above.<P> - -<P>The <FilesMatch> directive provides for access control by -filename, just as the <A HREF="#files"><Files></A> directive -does. However, it accepts a regular expression. For example:</P> - -<PRE> - <FilesMatch "\.(gif|jpe?g|png)$"> -</PRE> - -<P>would match most common Internet graphics formats.</P> - -<STRONG>See also</STRONG>: <A HREF="../sections.html">How Directory, -Location and Files sections work</A> for an explanation of how these -different sections are combined when a request is received - -<HR> - -<H2><A NAME="group">Group directive</A></H2> -<!--%plaintext <?INDEX {\tt Group} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Group <EM>unix-group</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>Group #-1</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The Group directive sets the group under which the server will answer requests. -In order to use this directive, the stand-alone server must be run initially -as root. <EM>Unix-group</EM> is one of: -<DL> -<DT>A group name -<DD>Refers to the given group by name. -<DT># followed by a group number. -<DD>Refers to a group by its number. -</DL> - -It is recommended that you set up a new group specifically for running the -server. Some admins use user <CODE>nobody</CODE>, but this is not always -possible or desirable.<P> - -Note: if you start the server as a non-root user, it will fail to change -to the specified group, and will instead continue to run as the group of the -original user. <P> - -Special note: Use of this directive in <VirtualHost> requires a -properly configured <A HREF="../suexec.html">suEXEC wrapper</A>. -When used inside a <VirtualHost> in this manner, only the group -that CGIs are run as is affected. Non-CGI requests are still processed -as the group specified in the main Group directive.<P> - -SECURITY: See <A HREF="#user">User</A> for a discussion of the security -considerations.<P><HR> - -<H2><A NAME="hostnamelookups">HostNameLookups directive</A></H2> -<!--%plaintext <?INDEX {\tt HostNameLookups} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> HostNameLookups <EM>on | off | double</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>HostNameLookups off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> <CODE>double</CODE> available only in -Apache -1.3 and above.<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Default was <CODE>on</CODE> prior to -Apache 1.3.<P> - -This directive enables DNS lookups so that host names can be logged (and -passed to CGIs/SSIs in <CODE>REMOTE_HOST</CODE>). -The value <CODE>double</CODE> refers to doing double-reverse DNS. -That is, after a reverse lookup is performed, a forward lookup is then -performed on that result. At least one of the ip addresses in the forward -lookup must match the original address. (In "tcpwrappers" terminology -this is called <CODE>PARANOID</CODE>.)<P> - -Regardless of the setting, when <A HREF="mod_access.html">mod_access</A> -is used for controlling access by hostname, a double reverse lookup -will be performed. This is necessary for security. Note that the -result of this double-reverse isn't generally available unless -you set <CODE>HostnameLookups double</CODE>. For example, if only -<CODE>HostnameLookups on</CODE> and a request is made to an object that -is protected by hostname restrictions, regardless of whether the -double-reverse fails or not, CGIs will still be passed the single-reverse -result in <CODE>REMOTE_HOST</CODE>.<P> - -The default for this directive was previously <CODE>on</CODE> in -versions of Apache prior to 1.3. It was changed to <CODE>off</CODE> -in order to save the network traffic for those sites that don't truly -need the reverse lookups done. It is also better for the end users -because they don't have to suffer the extra latency that a lookup -entails. -Heavily loaded sites should leave this directive <CODE>off</CODE>, since DNS -lookups can take considerable amounts of time. The utility <EM>logresolve</EM>, -provided in the <EM>/support</EM> directory, can be used to look up host names -from logged IP addresses offline.<P><HR> - -<H2><A NAME="identitycheck">IdentityCheck directive</A></H2> -<!--%plaintext <?INDEX {\tt IdentityCheck} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> IdentityCheck <EM>boolean</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>IdentityCheck off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -This directive enables RFC1413-compliant logging of the remote user name -for each connection, where the client machine runs identd or something similar. -This information is logged in the access log. <EM>Boolean</EM> is either -<CODE>on</CODE> or <CODE>off</CODE>.<P> - -The information should not be trusted in any way except for rudimentary usage -tracking.<P> - -Note that this can cause serious latency problems accessing your server -since every request requires one of these lookups to be performed. When -firewalls are involved each lookup might possibly fail and add 30 seconds -of latency to each hit. So in general this is not very useful on public -servers accessible from the Internet. -<P><HR> - -<H2><A NAME="ifdefine"><IfDefine> directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <IfDefine [!]<EM>parameter-name</EM>> <EM>...</EM> -</IfDefine><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> None<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> all<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> <IfDefine> is only available in -1.3.1 and later.<P> - -<P> - -The <IfDefine <EM>test</EM>>...</IfDefine> -section is used to mark directives that are conditional. The -directives within an IfDefine section are only -processed if the <EM>test</EM> is true. If <EM>test</EM> -is false, everything between the start and end markers -is ignored.<P> - -The <EM>test</EM> in the <IfDefine> section directive -can be one of two forms: - -<UL> -<LI><EM>parameter-name</EM> -<LI><CODE>!</CODE><EM>parameter-name</EM> -</UL> - -<P>In the former case, the directives between the start and end markers are -only processed if the parameter named <EM>parameter-name</EM> is defined. -The second format reverses the test, and only processes the directives if -<EM>parameter-name</EM> is <STRONG>not</STRONG> defined. - -<P>The <EM>parameter-name</EM> argument is a define as given on the -<CODE>httpd</CODE> command line via <CODE>-D</CODE><EM>parameter-</EM>, at the -time the server was started. - -<P><IfDefine> sections are nest-able, which can be used to implement -simple multiple-parameter tests. - -Example: - -<PRE> - $ httpd -DReverseProxy ... - - # httpd.conf - <IfDefine ReverseProxy> - LoadModule rewrite_module libexec/mod_rewrite.so - LoadModule proxy_module libexec/libproxy.so - </IfDefine> -</PRE> - -<P> <HR> - -<H2><A NAME="ifmodule"><IfModule> directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <IfModule [!]<EM>module-name</EM>> - <EM>...</EM> -</IfModule><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> None<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> all<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> IfModule is only available in 1.2 and -later.<P> - -<P> - -The <IfModule <EM>test</EM>>...</IfModule> -section is used to mark directives that are conditional. The -directives within an IfModule section are only -processed if the <EM>test</EM> is true. If <EM>test</EM> -is false, everything between the start and end markers -is ignored.<P> - -The <EM>test</EM> in the <IfModule> section directive -can be one of two forms: - -<UL> -<LI><EM>module name</EM> -<LI>!<EM>module name</EM> -</UL> - -<P>In the former case, the directives between the start and end markers -are only processed if the module named <EM>module name</EM> is compiled -in to Apache. The second format reverses the test, and only processes -the directives if <EM>module name</EM> is <STRONG>not</STRONG> compiled in. - -<P>The <EM>module name</EM> argument is a module name as given as the file -name of the module, at the time it was compiled. For example, -<CODE>mod_rewrite.c</CODE>. - -<P><IfModule> sections are nest-able, which can be used to implement -simple multiple-module tests. - -<P> <HR> - -<H2><A NAME="include">Include directive</A></H2> -<STRONG>Syntax:</STRONG> Include <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Include is only available in Apache 1.3 -and later. -<P> -This directive allows inclusion of other configuration files from within the -server configuration files. - -<P> <HR> - -<H2><A NAME="keepalive">KeepAlive directive</A></H2> -<STRONG>Syntax: (Apache 1.1)</STRONG> KeepAlive <EM>max-requests</EM><BR> -<STRONG>Default: (Apache 1.1)</STRONG> <CODE>KeepAlive 5</CODE><BR> -<STRONG>Syntax: (Apache 1.2)</STRONG> KeepAlive <EM>on/off</EM><BR> -<STRONG>Default: (Apache 1.2)</STRONG> <CODE>KeepAlive On</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> KeepAlive is only available in Apache -1.1 and later.<P> - -This directive enables -<A HREF="../keepalive.html">Keep-Alive</A> -support. - -<P><STRONG>Apache 1.1</STRONG>: Set <EM>max-requests</EM> -to the maximum number of requests you want Apache to entertain per -request. A limit is imposed to prevent a client from hogging your -server resources. Set this to <CODE>0</CODE> to disable support. - -<P><STRONG>Apache 1.2 and later</STRONG>: Set to "On" to enable -persistent connections, "Off" to disable. See also the <A -HREF="#maxkeepaliverequests">MaxKeepAliveRequests</A> directive.</P><HR> - -<H2><A NAME="keepalivetimeout">KeepAliveTimeout directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> KeepAliveTimeout <EM>seconds</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>KeepAliveTimeout 15</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> KeepAliveTimeout is only available in -Apache 1.1 and later.<P> - -The number of seconds Apache will wait for a subsequent request before -closing the connection. Once a request has been received, the timeout -value specified by the <A -HREF="#timeout"><CODE>Timeout</CODE></A> directive -applies. -<HR> - -<H2><A NAME="limit"><Limit> directive</A></H2> -<!--%plaintext <?INDEX {\tt Limit} section directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> - <Limit <EM>method method</EM> ... > ... </Limit><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> any<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -<Limit> and </Limit> are used to enclose a group of -access control directives which will then apply only to the specified -access methods, where <EM>method</EM> is any valid HTTP method. -Any directive except another <Limit> or -<A HREF="#directory"><Directory></A> may be used; the majority will be -unaffected by the <Limit>. Example: -<BLOCKQUOTE><CODE> -<Limit GET POST><BR> -require valid-user<BR> -</Limit></CODE></BLOCKQUOTE> - -If an access control directive appears outside a <Limit> -directive, then it applies to all access methods. The method names -listed can be one or more of: GET, POST, PUT, DELETE, CONNECT or -OPTIONS. <STRONG>The method name is case-sensitive.</STRONG> -If GET is used it will also restrict HEAD requests. -<STRONG>If you wish to limit all methods, do not include any -<Limit> directive at all.</STRONG> - -<P><HR> - -<H2><A NAME="limitexcept"><LimitExcept> directive</A></H2> -<!--%plaintext <?INDEX {\tt LimitExcept} section directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> - <LimitExcept <EM>method method</EM> ... > ... </LimitExcept><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> any<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Available in Apache 1.3.5 and later<P> - -<LimitExcept> and </LimitExcept> are used to enclose a group of -access control directives which will then apply to any HTTP access method -<STRONG>not</STRONG> listed in the arguments; i.e., it is the opposite of a -<A HREF="#limit"><Limit></A> section and can be used to control both -standard and nonstandard/unrecognized methods. See the documentation for -<A HREF="#limit"><Limit></A> for more details. - -<P><HR> - -<H2><A NAME="limitrequestbody">LimitRequestBody directive</A></H2> -<!--%plaintext <?INDEX {\tt LimitRequestBody} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LimitRequestBody <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>LimitRequestBody 0</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, -.htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> LimitRequestBody is only available in -Apache 1.3.2 and later. -<P> - -<EM>Number</EM> is a long integer from 0 (meaning unlimited) to 2147483647 -(2GB). The default value is defined by the compile-time constant -<CODE>DEFAULT_LIMIT_REQUEST_BODY</CODE> (0 as distributed). -<P> - -The LimitRequestBody directive allows the user to set a -limit on the allowed size of an HTTP request message body within -the context in which the directive is given (server, per-directory, -per-file or per-location). If the client request exceeds that limit, -the server will return an error response instead of servicing the request. -The size of a normal request message body will vary greatly depending -on the nature of the resource and the methods allowed on that resource. -CGI scripts typically use the message body for passing form information -to the server. Implementations of the PUT method will require a value -at least as large as any representation that the server wishes -to accept for that resource. -<P> - -This directive gives the server administrator greater control over abnormal -client request behavior, which may be useful for avoiding some forms -of denial-of-service attacks. -<P> - -<P><HR> - -<H2><A NAME="limitrequestfields">LimitRequestFields directive</A></H2> -<!--%plaintext <?INDEX {\tt LimitRequestFields} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LimitRequestFields <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>LimitRequestFields 100</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> LimitRequestFields is only available in -Apache 1.3.2 and later. -<P> - -<EM>Number</EM> is an integer from 0 (meaning unlimited) to 32767. -The default value is defined by the compile-time constant -<CODE>DEFAULT_LIMIT_REQUEST_FIELDS</CODE> (100 as distributed). -<P> - -The LimitRequestFields directive allows the server administrator to modify -the limit on the number of request header fields allowed in an HTTP request. -A server needs this value to be larger than the number of fields that a -normal client request might include. The number of request header fields -used by a client rarely exceeds 20, but this may vary among different -client implementations, often depending upon the extent to which a user -has configured their browser to support detailed content negotiation. -Optional HTTP extensions are often expressed using request header fields. -<P> - -This directive gives the server administrator greater control over abnormal -client request behavior, which may be useful for avoiding some forms -of denial-of-service attacks. The value should be increased if normal -clients see an error response from the server that indicates too many -fields were sent in the request.<P> - -<P><HR> - -<H2><A NAME="limitrequestfieldsize">LimitRequestFieldsize directive</A></H2> -<!--%plaintext <?INDEX {\tt LimitRequestFieldsize} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LimitRequestFieldsize <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>LimitRequestFieldsize 8190</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> LimitRequestFieldsize is only available in -Apache 1.3.2 and later. -<P> - -<EM>Number</EM> is an integer size in bytes from 0 to the value of the -compile-time constant <CODE>DEFAULT_LIMIT_REQUEST_FIELDSIZE</CODE> -(8190 as distributed). -<P> - -The LimitRequestFieldsize directive allows the server administrator to reduce -the limit on the allowed size of an HTTP request header field below the -normal input buffer size compiled with the server. A server needs this -value to be large enough to hold any one header field from a normal client -request. The size of a normal request header field will vary greatly -among different client implementations, often depending upon the extent -to which a user has configured their browser to support detailed -content negotiation. -<P> - -This directive gives the server administrator greater control over abnormal -client request behavior, which may be useful for avoiding some forms -of denial-of-service attacks. Under normal conditions, the value should -not be changed from the default.<P> - -<P><HR> - -<H2><A NAME="limitrequestline">LimitRequestLine directive</A></H2> -<!--%plaintext <?INDEX {\tt LimitRequestLine} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LimitRequestLine <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>LimitRequestLine 8190</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> LimitRequestLine is only available in -Apache 1.3.2 and later. -<P> - -<EM>Number</EM> is an integer size in bytes from 0 to the value of the -compile-time constant <CODE>DEFAULT_LIMIT_REQUEST_LINE</CODE> -(8190 as distributed). -<P> - -The LimitRequestLine directive allows the server administrator to reduce -the limit on the allowed size of a client's HTTP request-line below the -normal input buffer size compiled with the server. Since the request-line -consists of the HTTP method, URI, and protocol version, the -LimitRequestLine directive places a restriction on the length of a -request-URI allowed for a request on the server. A server needs this -value to be large enough to hold any of its resource names, including -any information that might be passed in the query part of a GET request. -<P> - -This directive gives the server administrator greater control over abnormal -client request behavior, which may be useful for avoiding some forms -of denial-of-service attacks. Under normal conditions, the value should -not be changed from the default.<P> - -<P><HR> - -<H2><A NAME="listen">Listen directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> -Listen [<EM>IP address</EM>:]<EM>port number</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Listen is only available in Apache -1.1 and later.<P> - -<P>The Listen directive instructs Apache to listen to more than one IP -address or port; by default it responds to requests on all IP -interfaces, but only on the port given by the <CODE><A -HREF="#port">Port</A></CODE> directive.</P> - -<TT>Listen</TT> can be used instead of <TT><A -HREF="#bindaddress">BindAddress</A></TT> and <TT>Port</TT>. It tells -the server to accept incoming requests on the specified port or -address-and-port combination. If the first format is used, with a port -number only, the server listens to the given port on all interfaces, -instead of the port given by the <TT>Port</TT> directive. If an IP -address is given as well as a port, the server will listen on the -given port and interface. <P> - -Note that you may still require a <TT>Port</TT> directive so -that URLs that Apache generates that point to your server still -work.<P> - -Multiple Listen directives may be used -to specify a number of addresses and ports to listen to. The server -will respond to requests from any of the listed addresses and -ports. -<P> - -For example, to make the server accept connections on both port -80 and port 8000, use: -<PRE> - Listen 80 - Listen 8000 -</PRE> - -To make the server accept connections on two specified -interfaces and port numbers, use -<PRE> - Listen 192.170.2.1:80 - Listen 192.170.2.5:8000 -</PRE> - -<P><STRONG>See Also:</STRONG> -<A HREF="../dns-caveats.html">DNS Issues</A><BR> -<STRONG>See Also:</STRONG> -<A HREF="../bind.html">Setting which addresses and ports Apache uses</A><BR> -<STRONG>See Also:</STRONG> -<A HREF="http://www.apache.org/info/known_bugs.html#listenbug">Known Bugs</A> -</P> -<HR> - -<H2><A NAME="listenbacklog">ListenBacklog directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ListenBacklog <EM>backlog</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ListenBacklog 511</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ListenBacklog is only available in Apache -versions after 1.2.0. - -<P>The maximum length of the queue of pending connections. Generally no -tuning is needed or desired, however on some systems it is desirable -to increase this when under a TCP SYN flood attack. See -the backlog parameter to the <CODE>listen(2)</CODE> system call. - -<P>This will often be limited to a smaller number by the operating -system. This varies from OS to OS. Also note that many OSes do not -use exactly what is specified as the backlog, but use a number based on -(but normally larger than) what is set. -<HR> - -<H2><A NAME="location"><Location> directive</A></H2> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <Location <EM>URL</EM>> -... </Location><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Location is only available in Apache -1.1 and later.<P> - -<P>The <Location> directive provides for access control by -URL. It is similar to the <A -HREF="#directory"><Directory></A> directive, and -starts a subsection which is terminated with a </Location> -directive. <CODE><Location></CODE> sections are processed in the -order they appear in the configuration file, after the -<Directory> sections and <CODE>.htaccess</CODE> files are -read, and after the <Files> sections.</P> - -<P>Note that URLs do not have to line up with the filesystem at all, -it should be emphasized that <Location> operates completely outside -the filesystem. - -<P>For all origin (non-proxy) requests, the URL to be matched is -of the form <CODE>/path/</CODE>, and you should not include any -<CODE>http://servername</CODE> prefix. For proxy requests, the URL -to be matched is of the form <CODE>scheme://servername/path</CODE>, -and you must include the prefix. - -<P>The URL may use wildcards In a wild-card string, `?' matches any -single character, and `*' matches any sequences of characters. - -<P><STRONG>Apache 1.2 and above:</STRONG> -Extended regular expressions can also be used, with the addition of -the <CODE>~</CODE> character. - -For example:</P> - -<PRE> - <Location ~ "/(extra|special)/data"> -</PRE> - -<P>would match URLs that contained the substring "/extra/data" or -"/special/data". In Apache 1.3 and above, a new directive -<A HREF="#locationmatch"><LocationMatch></A> exists which -behaves identical to the regex version of -<CODE><Location></CODE>. - -<P>The <CODE>Location</CODE> functionality is especially useful when -combined with the <CODE><A -HREF="mod_mime.html#sethandler">SetHandler</A></CODE> directive. For example, -to enable status requests, but allow them only -from browsers at foo.com, you might use: - -<PRE> - <Location /status> - SetHandler server-status - order deny,allow - deny from all - allow from .foo.com - </Location> -</PRE> - -<P><STRONG>Apache 1.3 and above note about / (slash)</STRONG>: The slash -character has special -meaning depending on where in a URL it appears. People may be used -to its behaviour in the filesystem where multiple adjacent slashes are -frequently collapsed to a single slash (<EM>i.e.</EM>, <CODE>/home///foo</CODE> -is the same as <CODE>/home/foo</CODE>). In URL-space this is not -necessarily true. The <CODE><LocationMatch></CODE> directive -and the regex version of <CODE><Location></CODE> require you -to explicitly specify multiple slashes if that is your intention. -For example, <CODE><LocationMatch ^/abc></CODE> would match the -request URL <CODE>/abc</CODE> but not the request URL <CODE>//abc</CODE>. -The (non-regex) <CODE><Location></CODE> directive behaves -similarly when used for proxy requests. But when (non-regex) -<CODE><Location></CODE> is used for non-proxy requests it will -implicitly match multiple slashes with a single slash. For example, -if you specify <CODE><Location /abc/def></CODE> and the request -is to <CODE>/abc//def</CODE> then it will match. - -<P> -<STRONG>See also</STRONG>: <A HREF="../sections.html">How Directory, -Location and Files sections work</A> for an explanation of how these -different sections are combined when a request is received - -<HR> - -<H2><A NAME="locationmatch"><LocationMatch></A></H2> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <LocationMatch <EM>regex</EM>> -... </LocationMatch><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> LocationMatch is only available in -Apache 1.3 and later.<P> - -<P>The <LocationMatch> directive provides for access control by -URL, in an identical manner to <A -HREF="#location"><Location></A>. However, it takes a regular -expression as an argument instead of a simple string. For example:</P> - -<PRE> - <LocationMatch "/(extra|special)/data"> -</PRE> - -<P>would match URLs that contained the substring "/extra/data" or -"/special/data".</P> - -<STRONG>See also</STRONG>: <A HREF="../sections.html">How Directory, -Location and Files sections work</A> for an explanation of how these -different sections are combined when a request is received - -<HR> - -<H2><A NAME="lockfile">LockFile directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LockFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>LockFile logs/accept.lock</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The LockFile directive sets the path to the lockfile used when -Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or -USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be -left at its default value. The main reason for changing it is if -the <CODE>logs</CODE> directory is NFS mounted, since <STRONG>the lockfile -must be stored on a local disk</STRONG>. The PID of the main -server process is automatically appended to the filename. <P> - -<STRONG>SECURITY:</STRONG> It is best to avoid putting this file in a -world writable directory such as <CODE>/var/tmp</CODE> because someone -could create a denial of service attack and prevent the server from -starting by creating a lockfile with the same name as the one the -server will try to create.<P> - -<P><HR> - -<H2><A NAME="loglevel">LogLevel directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LogLevel <EM>level</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>LogLevel error</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> LogLevel is only available in 1.3 or -later. - -<P>LogLevel adjusts the verbosity of the messages recorded in the -error logs (see <A HREF="#errorlog">ErrorLog</A> directive). -The following <EM>level</EM>s are available, in order of -decreasing significance: - -<P><TABLE> - <TR><TH ALIGN="LEFT"><STRONG>Level</STRONG> - <TH ALIGN="LEFT"><STRONG>Description</STRONG> - <TR><TH><TH ALIGN="LEFT"><STRONG>Example</STRONG> - <TR><TD><CODE>emerg</CODE> - <TD>Emergencies - system is unusable. - <TR><TD><TD>"Child cannot open lock file. Exiting" - <TR><TD><CODE>alert</CODE> - <TD>Action must be taken immediately. - <TR><TD><TD>"getpwuid: couldn't determine user name from uid" - <TR><TD><CODE>crit</CODE> - <TD>Critical Conditions. - <TR><TD><TD>"socket: Failed to get a socket, exiting child" - <TR><TD><CODE>error</CODE> - <TD>Error conditions. - <TR><TD><TD>"Premature end of script headers" - <TR><TD><CODE>warn</CODE> - <TD>Warning conditions. - <TR><TD><TD>"child process 1234 did not exit, sending another SIGHUP" - <TR><TD><CODE>notice</CODE> - <TD>Normal but significant condition. - <TR><TD><TD>"httpd: caught SIGBUS, attempting to dump core in ..." - <TR><TD><CODE>info</CODE> - <TD>Informational. - <TR><TD><TD>"Server seems busy, (you may need to increase StartServers, or - Min/MaxSpareServers)..." - <TR><TD><CODE>debug</CODE> - <TD>Debug-level messages - <TR><TD><TD>"Opening config file ..." -</TABLE> - -<P>When a particular level is specified, messages from all other levels -of higher significance will be reported as well. <EM>E.g.</EM>, when -<CODE>LogLevel info</CODE> is specified, then messages with log levels of -<CODE>notice</CODE> and <CODE>warn</CODE> will also be posted. -<P> -Using a level of at least <CODE>crit</CODE> is recommended. -<P><HR> - -<H2><A NAME="maxclients">MaxClients directive</A></H2> -<!--%plaintext <?INDEX {\tt MaxClients} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> MaxClients <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>MaxClients 256</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -<P>The MaxClients directive sets the limit on the number of simultaneous -requests that can be supported; not more than this number of child server -processes will be created. To configure more than 256 clients, you must -edit the HARD_SERVER_LIMIT entry in httpd.h and recompile. - -<P>Any connection attempts over the MaxClients limit will normally -be queued, up to a number based on the <A HREF="#listenbacklog"> -ListenBacklog</A> directive. Once a child process is freed at the -end of a different request, the connection will then be serviced. - -<HR> - -<H2><A NAME="maxkeepaliverequests">MaxKeepAliveRequests directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> MaxKeepAliveRequests <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>MaxKeepAliveRequests 100</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Only available in Apache -1.2 and later. - -<P>The MaxKeepAliveRequests directive limits the number of requests -allowed per connection when <A HREF="#keepalive">KeepAlive</A> is -on. If it is set to "<CODE>0</CODE>", unlimited requests will be -allowed. We recommend that this setting be kept to a high value for -maximum server performance.</P><HR> - -<H2><A NAME="maxrequestsperchild">MaxRequestsPerChild directive</A></H2> -<!--%plaintext <?INDEX {\tt MaxRequestsPerChild} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> MaxRequestsPerChild <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>MaxRequestsPerChild 0</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The MaxRequestsPerChild directive sets the limit on the number of requests -that an individual child server process will handle. After MaxRequestsPerChild -requests, the child process will die. If MaxRequestsPerChild is 0, then -the process will never expire.<P> - -Setting MaxRequestsPerChild to a non-zero limit has two beneficial effects: -<UL> -<LI>it limits the amount of memory that process can consume by (accidental) -memory leakage; -<LI> by giving processes a finite lifetime, it helps reduce the -number of processes when the server load reduces. -</UL> - -<P>This directive has no effect on Win32. - -<P><STRONG>NOTE:</STRONG> For <EM>KeepAlive</EM> requests, only the first -request is counted towards this limit. In effect, it changes the -behavior to limit the number of <EM>connections</EM> per child. - -<P><HR> - -<H2><A NAME="maxspareservers">MaxSpareServers directive</A></H2> -<!--%plaintext <?INDEX {\tt MaxSpareServers} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> MaxSpareServers <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>MaxSpareServers 10</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The MaxSpareServers directive sets the desired maximum number of <EM>idle</EM> -child server processes. An idle process is one which is not handling -a request. If there are more than MaxSpareServers idle, then the parent -process will kill off the excess processes.<P> - -Tuning of this parameter should only be necessary on very busy sites. -Setting this parameter to a large number is almost always a bad idea.<P> - -This directive has no effect when used with the Apache Web server on a -Microsoft Windows platform. - -<P> - -See also <A HREF="#minspareservers">MinSpareServers</A> and -<A HREF="#startservers">StartServers</A>.<P><HR> - -<H2><A NAME="minspareservers">MinSpareServers directive</A></H2> -<!--%plaintext <?INDEX {\tt MinSpareServers} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> MinSpareServers <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>MinSpareServers 5</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The MinSpareServers directive sets the desired minimum number of <EM>idle</EM> -child server processes. An idle process is one which is not handling -a request. If there are fewer than MinSpareServers idle, then the parent -process creates new children at a maximum rate of 1 per second.<P> - -Tuning of this parameter should only be necessary on very busy sites. -Setting this parameter to a large number is almost always a bad idea.<P> - -This directive has no effect on Microsoft Windows. - -<P> - -See also <A HREF="#maxspareservers">MaxSpareServers</A> and -<A HREF="#startservers">StartServers</A>.<P><HR> - -<H2><A NAME="namevirtualhost">NameVirtualHost directive</A></H2> -<!--%plaintext <?INDEX {\tt NameVirtualHost} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> NameVirtualHost <EM>addr</EM>[:<EM>port</EM>]<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> NameVirtualHost is only available in -Apache 1.3 and later<P> - -The NameVirtualHost directive is a required directive if you want to configure -<A HREF="../vhosts/index.html">name-based virtual hosts</A>.<P> - -Although <EM>addr</EM> can be hostname it is recommended that you always use -an IP address, <EM>e.g.</EM> - -<BLOCKQUOTE><CODE>NameVirtualHost 111.22.33.44</CODE></BLOCKQUOTE> - -With the NameVirtualHost directive you specify the address to which your -name-based virtual host names resolve. If you have multiple name-based -hosts on multiple addresses, repeat the directive for each address.<P> - -Note: the "main server" and any _default_ servers will <STRONG>never</STRONG> -be served for a request to a NameVirtualHost IP Address (unless for some -reason you specify NameVirtualHost but then don't define any VirtualHosts -for that address).<P> - -Optionally you can specify a port number on which the name-based -virtual hosts should be used, <EM>e.g.</EM> - -<BLOCKQUOTE><CODE>NameVirtualHost 111.22.33.44:8080</CODE></BLOCKQUOTE> - -<STRONG>See also:</STRONG> -<A HREF="../vhosts/index.html">Apache Virtual Host documentation</A> -<HR> -<H2><A NAME="options">Options directive</A></H2> -<!--%plaintext <?INDEX {\tt Options} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Options <EM>[+|-]option [+|-]option ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, -.htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Options<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The Options directive controls which server features are available in -a particular directory. -<P> -<EM>option</EM> can be set to <CODE>None</CODE>, in which case none of -the extra features are enabled, or one or more of the following: -<DL> -<DT>All -<DD>All options except for MultiViews. This is the default setting. -<DT>ExecCGI -<DD> -<!--%plaintext <?INDEX {\tt ExecCGI} option> --> -Execution of CGI scripts is permitted. -<DT>FollowSymLinks -<DD> -<!--%plaintext <?INDEX {\tt FollowSymLinks} option> --> -The server will follow symbolic links in this directory. -<BR> -<STRONG>Note</STRONG>: even though the server follows the symlink it -does <EM>not</EM> -change the pathname used to match against <CODE><Directory></CODE> -sections. -<BR> -<STRONG>Note</STRONG>: this option gets ignored if set inside a -<Location> section. - -<DT>Includes -<DD> -<!--%plaintext <?INDEX {\tt Includes} option> --> -Server-side includes are permitted. -<DT>IncludesNOEXEC -<DD> -<!--%plaintext <?INDEX {\tt IncludesNOEXEC} option> --> -Server-side includes are permitted, but the #exec command and -#include of CGI scripts are disabled. -<DT>Indexes -<DD> -<!--%plaintext <?INDEX {\tt Indexes} option> --> -If a URL which maps to a directory is requested, and the there is no -DirectoryIndex (<EM>e.g.</EM>, index.html) in that directory, then the server will -return a formatted listing of the directory. -<DT>MultiViews -<DD> -<!--%plaintext <?INDEX {\tt MultiViews} option> --> -<A HREF="../content-negotiation.html">Content negotiated</A> MultiViews are -allowed. -<DT>SymLinksIfOwnerMatch -<DD> -<!--%plaintext <?INDEX {\tt SymLinksIfOwnerMatch} option> --> -The server will only follow symbolic links for which the target -file or directory is owned by the same user id as the link. -<BR> -<STRONG>Note</STRONG>: this option gets ignored if set inside a -<Location> section. -</DL> - -Normally, if multiple <CODE>Options</CODE> could apply to a directory, -then the most specific one is taken complete; the options are not -merged. However if <EM>all</EM> the options on the <CODE>Options</CODE> -directive are preceded by a + or - symbol, the options are -merged. Any options preceded by a + are added to the options -currently in force, and any options preceded by a - are removed from -the options currently in force. <P> - -For example, without any + and - symbols: - -<BLOCKQUOTE><CODE> -<Directory /web/docs> <BR> -Options Indexes FollowSymLinks<BR> -</Directory><BR> -<Directory /web/docs/spec> <BR> -Options Includes<BR> -</Directory> -</CODE></BLOCKQUOTE> -then only <CODE>Includes</CODE> will be set for the /web/docs/spec -directory. However if the second <CODE>Options</CODE> directive uses the + -and - symbols:<P> - -<BLOCKQUOTE><CODE> -<Directory /web/docs> <BR> -Options Indexes FollowSymLinks<BR> -</Directory><BR> -<Directory /web/docs/spec> <BR> -Options +Includes -Indexes<BR> -</Directory> -</CODE></BLOCKQUOTE> -then the options <CODE>FollowSymLinks</CODE> and <CODE>Includes</CODE> -are set for the /web/docs/spec directory.<P> - -<STRONG>Note:</STRONG> Using <CODE>-IncludesNOEXEC</CODE> or -<CODE>-Includes</CODE> -disables server-side includes completely regardless of the previous setting.<P> - -The default in the absence of any other settings is <CODE>All</CODE>.<P> -<HR> - -<H2><A NAME="pidfile">PidFile directive</A></H2> -<!--%plaintext <?INDEX {\tt PidFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> PidFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>PidFile logs/httpd.pid</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The PidFile directive sets the file to which the server records the -process id of the daemon. If the filename does not begin with a slash (/) -then it is assumed to be relative to the <A HREF="#serverroot">ServerRoot</A>. -The PidFile is only used in <A HREF="#servertype">standalone</A> mode.<P> - -It is often useful to be able to send the server a signal, so that it closes -and then reopens its <A HREF="#errorlog">ErrorLog</A> and TransferLog, and -re-reads its configuration files. This is done by sending a SIGHUP (kill -1) -signal to the process id listed in the PidFile.<P> - -The PidFile is subject to the same warnings about log file placement and -<A HREF="../misc/security_tips.html#serverroot">security</A>. - -<P><HR> - -<H2><A NAME="port">Port directive</A></H2> -<!--%plaintext <?INDEX {\tt Port} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Port <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>Port 80</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -<EM>Number</EM> is a number from 0 to 65535; some port numbers -(especially below -1024) are reserved for particular protocols. See <CODE>/etc/services</CODE> -for a list of some defined ports; the standard port for the http protocol -is 80.<P> - -The Port directive has two behaviors, the first of which is necessary for -NCSA backwards compatibility (and which is confusing in the context of -Apache).<P> - -<UL> -<LI> -In the absence of any <A HREF="#listen">Listen</A> or -<A HREF="#bindaddress">BindAddress</A> directives specifying a port number, -a Port directive given in the "main server" -(<EM>i.e.</EM>, outside any <A HREF="#virtualhost"><VirtualHost></A> section) -sets the network port on which the server listens. -If there are any Listen or BindAddress directives specifying -<CODE>:number</CODE> then Port has no effect on what address the server -listens at. - -<LI>The Port directive -sets the <CODE>SERVER_PORT</CODE> environment variable (for -<A HREF="mod_cgi.html">CGI</A> and <A HREF="mod_include.html">SSI</A>), -and is used when the server must generate a URL that refers to itself -(for example when creating an external redirect to itself). This -behaviour is modified by -<A HREF="#usecanonicalname">UseCanonicalName</A>. -</UL> - -In no event does a Port setting affect -what ports a <A HREF="#virtualhost">VirtualHost</A> responds on, the -VirtualHost directive itself is used for that.<P> - -The primary behaviour of Port should be considered to be similar to that of -the <A HREF="#servername">ServerName</A> directive. The ServerName -and Port together specify what you consider to be the <EM>canonical</EM> -address of the server. -(See also <A HREF="#usecanonicalname">UseCanonicalName</A>.)<P> - -Port 80 is one of Unix's special ports. All ports numbered -below 1024 are reserved for system use, <EM>i.e.</EM>, regular (non-root) users cannot -make use of them; instead they can only use higher port numbers. -To use port 80, you must start the server from the root account. -After binding to the port and before accepting requests, Apache will change -to a low privileged user as set by the <A HREF="#user">User directive</A>.<P> - -If you cannot use port 80, choose any other unused port. Non-root users -will have to choose a port number higher than 1023, such as 8000.<P> - -SECURITY: if you do start the server as root, be sure -not to set <A HREF="#user">User</A> to root. If you run the server as -root whilst handling connections, your site may be open to a major security -attack.<P><HR> - -<H2><A NAME="require">require directive</A></H2> -<!--%plaintext <?INDEX {\tt require} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> require <EM>entity-name entity entity...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -This directive selects which authenticated users can access a directory. -The allowed syntaxes are: -<UL> -<LI>require user <EM>userid userid ...</EM><P> -Only the named users can access the directory.<P> -<LI>require group <EM>group-name group-name ...</EM><P> -Only users in the named groups can access the directory.<P> -<LI>require valid-user<P> -All valid users can access the directory. -</UL> -<P> -If <CODE>require</CODE> appears in a <A HREF="#limit"><Limit></A> -section, then it restricts access to the named methods, otherwise -it restricts access for all methods. Example: -<BLOCKQUOTE><CODE> -AuthType Basic<BR> -AuthName somedomain<BR> -AuthUserFile /web/users<BR> -AuthGroupFile /web/groups<BR> -<Limit GET POST><BR> -require group admin<BR> -</Limit> -</CODE></BLOCKQUOTE> - -Require must be accompanied by <A HREF="#authname">AuthName</A> and -<A HREF="#authtype">AuthType</A> directives, and directives such as -<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and -<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> (to define users and -groups) in order to work correctly.<P><HR> - -<H2><A NAME="resourceconfig">ResourceConfig directive</A></H2> -<!--%plaintext <?INDEX {\tt ResourceConfig} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ResourceConfig <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ResourceConfig conf/srm.conf</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The server will read this file for more directives after reading the -httpd.conf file. <EM>Filename</EM> is relative to the -<A HREF="#serverroot">ServerRoot</A>. -This feature can be disabled using: -<BLOCKQUOTE><CODE>ResourceConfig /dev/null</CODE></BLOCKQUOTE> -Historically, this file contained most directives except for server -configuration directives and <A HREF="#directory"><Directory></A> -sections; in fact it can now contain any server directive allowed in the -<EM>server config</EM> context.<P> - -See also <A HREF="#accessconfig">AccessConfig</A>.<P><HR> - -<H2><A NAME="rlimit">RLimitCPU</A> <A NAME="rlimitcpu">directive</A></H2> -<!--%plaintext <?INDEX {\tt RLimitCPU} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> RLimitCPU <EM># or 'max'</EM> - <EM>[# or 'max']</EM> -<BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>Unset; uses operating system defaults</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> RLimitCPU is only available in Apache 1.2 -and later<P> - -Takes 1 or 2 parameters. The first parameter sets the soft resource limit -for all processes and the second parameter sets the maximum resource limit. -Either parameter can be a number, or <EM>max</EM> to indicate to the server -that the limit should be set to the maximum allowed by the operating system -configuration. Raising the maximum resource limit requires that the server -is running as root, or in the initial startup phase.<P> - -CPU resource limits are expressed in seconds per process.<P> - -See also <A HREF="#rlimitmem">RLimitMEM</A> or -<A HREF="#rlimitnproc">RLimitNPROC</A>.<P><HR> - -<H2><A NAME="rlimitmem">RLimitMEM directive</A></H2> -<!--%plaintext <?INDEX {\tt RLimitMEM} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> RLimitMEM <EM># or 'max'</EM> - <EM>[# or 'max']</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>Unset; uses operating system defaults</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> RLimitMEM is only available in Apache 1.2 -and later<P> - -Takes 1 or 2 parameters. The first parameter sets the soft resource limit for -all processes and the second parameter sets the maximum resource limit. Either -parameter can be a number, or <EM>max</EM> to indicate to the server that the -limit should be set to the maximum allowed by the operating system -configuration. Raising the maximum resource limit requires that the -server is running as root, or in the initial startup phase.<P> - -Memory resource limits are expressed in bytes per process.<P> - -See also <A HREF="#rlimitcpu">RLimitCPU</A> or -<A HREF="#rlimitnproc">RLimitNPROC</A>.<P><HR> - -<H2><A NAME="rlimitnproc">RLimitNPROC directive</A></H2> -<!--%plaintext <?INDEX {\tt RLimitNPROC} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> RLimitNPROC <EM># or 'max'</EM> - <EM>[# or 'max']</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>Unset; uses operating system defaults</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> RLimitNPROC is only available in Apache -1.2 and later<P> - -Takes 1 or 2 parameters. The first parameter sets the soft resource limit -for all processes and the second parameter sets the maximum resource limit. -Either parameter can be a number, or <EM>max</EM> to indicate to the server -that the limit should be set to the maximum allowed by the operating system -configuration. Raising the maximum resource limit requires that the server -is running as root, or in the initial startup phase.<P> - -Process limits control the number of processes per user.<P> - -Note: If CGI processes are <STRONG>not</STRONG> running under userids other -than the -web server userid, this directive will limit the number of processes that the -server itself can create. Evidence of this situation will be indicated by -<STRONG><EM>cannot fork</EM></STRONG> messages in the error_log.<P> - -See also <A HREF="#rlimitmem">RLimitMEM</A> or -<A HREF="#rlimitcpu">RLimitCPU</A>. - -<P><HR> - -<H2><A NAME="satisfy">Satisfy directive</A></H2> -<!--%plaintext <?INDEX {\tt Satisfy} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Satisfy <EM>'any' or 'all'</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> Satisfy all<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Satisfy is only available in Apache 1.2 -and later<P> - -Access policy if both allow and require used. The parameter can be -either <EM>'all'</EM> or <EM>'any'</EM>. This directive is only useful -if access to a particular area is being restricted by both -username/password <EM>and</EM> client host address. In this case the -default behavior ("all") is to require that the client passes the -address access restriction <EM>and</EM> enters a valid username and -password. With the "any" option the client will be granted access if -they either pass the host restriction or enter a valid username and -password. This can be used to password restrict an area, but to let -clients from particular addresses in without prompting for a password. - - -<P><HR> - -<H2><A NAME="scoreboardfile">ScoreBoardFile directive</A></H2> -<!--%plaintext <?INDEX {\tt ScoreBoardFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ScoreBoardFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ScoreBoardFile logs/apache_status</CODE> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The ScoreBoardFile directive is required on some architectures to place -a file that the server will use to communicate between its children and -the parent. The easiest way to find out if your architecture requires -a scoreboard file is to run Apache and see if it creates the file named -by the directive. If your architecture requires it then you must ensure -that this file is not used at the same time by more than one invocation -of Apache.<P> - -If you have to use a ScoreBoardFile then you may see improved speed by -placing it on a RAM disk. But be careful that you heed the same warnings -about log file placement and -<A HREF="../misc/security_tips.html">security</A>.<P> - -Apache 1.2 and above:<P> - -Linux 1.x users might be able to add -<CODE>-DHAVE_SHMGET -DUSE_SHMGET_SCOREBOARD</CODE> to -the <CODE>EXTRA_CFLAGS</CODE> in your <CODE>Configuration</CODE>. This -might work with some 1.x installations, but won't work with all of -them. (Prior to 1.3b4, <CODE>HAVE_SHMGET</CODE> would have sufficed.)<P> - -SVR4 users should consider adding -<CODE>-DHAVE_SHMGET -DUSE_SHMGET_SCOREBOARD</CODE> to the -<CODE>EXTRA_CFLAGS</CODE> in your <CODE>Configuration</CODE>. This -is believed to work, but we were unable to test it in time for 1.2 -release. (Prior to 1.3b4, <CODE>HAVE_SHMGET</CODE> would have sufficed.)<P> - -<STRONG>See Also</STRONG>: -<A HREF="../stopping.html">Stopping and Restarting Apache</A></P> - -<P><HR> - -<H2><A NAME="scriptinterpretersource">ScriptInterpreterSource directive</A></H2> -<!--%plaintext <?INDEX {\tt ScriptInterpreterSource} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ScriptInterpreterSource <EM>'registry' or 'script'</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ScriptInterpreterSource script</CODE> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core (Windows only)<P> - -This directive is used to control how Apache 1.3.5 and later finds the interpreter -used to run CGI scripts. The default technique is to use the interpreter pointed to by -the #! line in the script. Setting ScriptInterpreterSource registry will cause the -Windows Registry to be searched using the script file extension (e.g., .pl) as a search key. -<P><HR> - -<H2><A NAME="sendbuffersize">SendBufferSize directive</A></H2> -<!--%plaintext <?INDEX {\tt SendBufferSize} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> SendBufferSize <EM>bytes</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The server will set the TCP buffer size to the number of bytes -specified. Very useful to increase past standard OS defaults on high -speed high latency (<EM>i.e.</EM>, 100ms or so, such as transcontinental -fast pipes) -<P><HR> - -<H2><A NAME="serveradmin">ServerAdmin directive</A></H2> -<!--%plaintext <?INDEX {\tt ServerAdmin} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ServerAdmin <EM>email-address</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The ServerAdmin sets the e-mail address that the server includes in any -error messages it returns to the client.<P> - -It may be worth setting up a dedicated address for this, <EM>e.g.</EM> -<BLOCKQUOTE><CODE>ServerAdmin www-admin@foo.bar.com</CODE></BLOCKQUOTE> -as users do not always mention that they are talking about the server!<P><HR> - -<H2><A NAME="serveralias">ServerAlias directive</A></H2> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ServerAlias <EM>host1 host2 ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ServerAlias is only available in Apache -1.1 and later.<P> - -The ServerAlias directive sets the alternate names for a host, for use -with -<A HREF="../vhosts/name-based.html">name-based virtual hosts</A>. - -<P><STRONG>See also:</STRONG> -<A HREF="../vhosts/index.html">Apache Virtual Host documentation</A> - -<HR> - -<H2><A NAME="servername">ServerName directive</A></H2> -<!--%plaintext <?INDEX {\tt ServerName} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ServerName <EM>fully-qualified domain name</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The ServerName directive sets the hostname of the server; this is only -used when creating redirection URLs. If it is not specified, then the -server attempts to deduce it from its own IP address; however this may -not work reliably, or may not return the preferred hostname. For example: -<BLOCKQUOTE><CODE>ServerName www.wibble.com</CODE></BLOCKQUOTE> -would be used if the canonical (main) name of the actual machine -were <CODE>monster.wibble.com</CODE>.<P> -<P><STRONG>See Also</STRONG>:<BR> -<A HREF="../dns-caveats.html">DNS Issues</A><BR> -<A HREF="#usecanonicalname">UseCanonicalName</A><BR> -</P> -<HR> - -<H2><A NAME="serverpath">ServerPath directive</A></H2> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ServerPath <EM>pathname</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ServerPath is only available in Apache -1.1 and later.<P> - -The ServerPath directive sets the legacy URL pathname for a host, for -use with <A HREF="../vhosts/index.html">name-based virtual hosts</A>. - -<P><STRONG>See also:</STRONG> -<A HREF="../vhosts/index.html">Apache Virtual Host documentation</A> - -<HR> - -<H2><A NAME="serverroot">ServerRoot directive</A></H2> -<!--%plaintext <?INDEX {\tt ServerRoot} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ServerRoot <EM>directory-filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ServerRoot /usr/local/apache</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The ServerRoot directive sets the directory in which the server lives. -Typically it will contain the subdirectories <CODE>conf/</CODE> and -<CODE>logs/</CODE>. Relative paths for other configuration files are taken -as relative to this directory.<P> - -See also <A HREF="../invoking.html">the <CODE>-d</CODE> option to httpd</A>.<P> -See also <A HREF="../misc/security_tips.html#serverroot">the security tips</A> -for information on how to properly set permissions on the ServerRoot.<P> - -<HR> - -<H2><A NAME="serversignature">ServerSignature directive</A></H2> -<!--%plaintext <?INDEX {\tt ServerSignature} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ServerSignature <EM>Off | On | EMail</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ServerSignature Off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, -.htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ServerSignature is only available in -Apache -1.3 and later.<P> - -The ServerSignature directive allows the configuration of a trailing -footer line under server-generated documents (error messages, -mod_proxy ftp directory listings, mod_info output, ...). The reason -why you would want to enable such a footer line is that in a chain -of proxies, the user often has no possibility to tell which of the -chained servers actually produced a returned error message.<BR> -The <SAMP>Off</SAMP> setting, which is the default, suppresses the -error line (and is therefore compatible with the behavior of -Apache-1.2 and below). The <SAMP>On</SAMP> setting simply adds a -line with the server version number and <A -HREF="#servername">ServerName</A> of the serving virtual host, and -the <SAMP>EMail</SAMP> setting additionally creates a "mailto:" -reference to the <A HREF="#serveradmin">ServerAdmin</A> of the -referenced document. - -<HR> - -<H2><A NAME="servertokens">ServerTokens directive</A></H2> -<!--%plaintext <?INDEX {\tt ServerTokens} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ServerTokens <EM>Minimal|OS|Full</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ServerTokens Full</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config <BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ServerTokens is only available - in Apache 1.3 and later - -<P> -This directive controls whether <SAMP>Server</SAMP> response header -field which is sent back to clients includes a description of the generic -OS-type of the server as well as information about compiled-in modules. -</P> -<DL> - <DT><CODE>ServerTokens Min[imal]</CODE> - </DT> - <DD>Server sends (<EM>e.g.</EM>): <SAMP>Server: Apache/1.3.0</SAMP> - </DD> - <DT><CODE>ServerTokens OS</CODE> - </DT> - <DD>Server sends (<EM>e.g.</EM>): <SAMP>Server: Apache/1.3.0 (Unix)</SAMP> - </DD> - <DT><CODE>ServerTokens Full</CODE> (or not specified) - </DT> - <DD>Server sends (<EM>e.g.</EM>): <SAMP>Server: Apache/1.3.0 (Unix) PHP/3.0 - MyMod/1.2</SAMP> - </DD> -</DL> -<P> -This setting applies to the entire server, and cannot be enabled or -disabled on a virtualhost-by-virtualhost basis. -</P> - -<HR> - -<H2><A NAME="servertype">ServerType directive</A></H2> -<!--%plaintext <?INDEX {\tt ServerType} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ServerType <EM>type</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ServerType standalone</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The ServerType directive sets how the server is executed by the system. -<EM>Type</EM> is one of -<DL> -<DT>inetd -<DD>The server will be run from the system process inetd; the command to start -the server is added to <CODE>/etc/inetd.conf</CODE> -<DT>standalone -<DD>The server will run as a daemon process; the command to start the server -is added to the system startup scripts. (<CODE>/etc/rc.local</CODE> or -<CODE>/etc/rc3.d/...</CODE>.) -</DL> - -Inetd is the lesser used of the two options. For each http -connection received, a new copy of the server is started from scratch; -after the connection is complete, this program exits. There is a high price to -pay per connection, but for security reasons, some admins prefer this option. -<FONT COLOR="red">Inetd mode is no longer recommended and does not always -work properly. Avoid it if at all possible.</FONT> -<P> - -Standalone is the most common setting for ServerType since -it is far more efficient. The server is started once, and services all -subsequent connections. If you intend running Apache to serve a busy site, -standalone will probably be your only option.<P> -<HR> -<H2><A NAME="startservers">StartServers directive</A></H2> -<!--%plaintext <?INDEX {\tt StartServers} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> StartServers <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>StartServers 5</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The StartServers directive sets the number of child server processes created -on startup. As the number of processes is dynamically controlled depending -on the load, there is usually little reason to adjust this parameter.<P> - -<P>When running under Microsoft Windows, this directive has no effect. - There is always one child which handles all requests. Within the - child requests are handled by separate threads. The - <A HREF="#threadsperchild">ThreadsPerChild</A> directive controls - the maximum number of child threads handling requests, which will - have a similar effect to the setting of <SAMP>StartServers</SAMP> - on Unix. - -<P> - -See also <A HREF="#minspareservers">MinSpareServers</A> and -<A HREF="#maxspareservers">MaxSpareServers</A>.<P><HR> - -<H2><A NAME="threadsperchild">ThreadsPerChild</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ThreadsPerChild <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ThreadsPerChild 50</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core (Windows)<BR> -<STRONG>Compatibility:</STRONG> Available only with Apache 1.3 and later -with Windows - -<P>This directive tells the server how many threads it should use. This - is the maximum number of connections the server can handle at once; be - sure and set this number high enough for your site if you get a lot of - hits. - -<P>This directive has no effect on Unix systems. Unix users should look - at <A HREF="#startservers">StartServers</A> and <A - HREF="#maxrequestsperchild">MaxRequestsPerChild</A>.</P> - -<HR> - -<H2><A NAME="timeout">TimeOut directive</A></H2> -<!--%plaintext <?INDEX {\tt TimeOut} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> TimeOut <EM>number</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>TimeOut 300</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The TimeOut directive currently defines the amount of time Apache will -wait for three things: - -<OL> - <LI>The total amount of time it takes to receive a GET request. - <LI>The amount of time between receipt of TCP packets on a POST or - PUT request. - <LI>The amount of time between ACKs on transmissions of TCP packets - in responses. -</OL> - -We plan on making these separately configurable at some point down the -road. The timer used to default to 1200 before 1.2, but has been -lowered to 300 which is still far more than necessary in most -situations. It is not set any lower by default because there may -still be odd places in the code where the timer is not reset when -a packet is sent. - -<P><HR> - -<H2><A NAME="usecanonicalname">UseCanonicalName directive</A></H2> -<!--%plaintext <?INDEX {\tt UseCanonicalName} directive> --> -<A HREF="directive-dict.html#Syntax" REL="Help"> -<STRONG>Syntax:</STRONG></A> UseCanonicalName <EM>on|off</EM><BR> -<A HREF="directive-dict.html#Default" REL="Help"> -<STRONG>Default:</STRONG></A> <CODE>UseCanonicalName on</CODE><BR> -<A HREF="directive-dict.html#Context" REL="Help"> -<STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess -<BR> -<A HREF="directive-dict.html#Override" REL="Help"> -<STRONG>Override:</STRONG></A> Options<BR> -<A HREF="directive-dict.html#Compatibility" REL="Help"> -<STRONG>Compatibility:</STRONG></A> UseCanonicalName is only available in -Apache 1.3 and later<P> - -In many situations Apache has to construct a <EM>self-referential</EM> -URL. That is, a URL which refers back to the same server. -With <CODE>UseCanonicalName on</CODE> (and in all versions prior to -1.3) Apache will use the <A HREF="#servername">ServerName</A> and <A -HREF="#port">Port</A> directives to construct a canonical name for the -server. This name is used in all self-referential URLs, and for the -values of <CODE>SERVER_NAME</CODE> and <CODE>SERVER_PORT</CODE> in CGIs. - -<P>With <CODE>UseCanonicalName off</CODE> Apache will form -self-referential URLs using the hostname and port supplied -by the client if any are supplied (otherwise it will use the -canonical name). These values are the same that are used to -implement <A HREF="../vhosts/name-based.html">name based virtual -hosts</A>, and are available with the same clients. The CGI variables -<CODE>SERVER_NAME</CODE> and <CODE>SERVER_PORT</CODE> will be constructed -from the client supplied values as well. - -<P>An example where this may be useful is on an intranet server where -you have users connecting to the machine using short names such as -<CODE>www</CODE>. You'll notice that if the users type a shortname, -and a URL which is a directory, such as <CODE>http://www/splat</CODE>, -<EM>without the trailing slash</EM> then Apache will redirect them to -<CODE>http://www.domain.com/splat/</CODE>. If you have authentication -enabled, this will cause the user to have to reauthenticate twice (once -for <CODE>www</CODE> and once again for <CODE>www.domain.com</CODE>). -But if <CODE>UseCanonicalName</CODE> is set off, then Apache will redirect -to <CODE>http://www/splat/</CODE>. - -<P><STRONG>Warning:</STRONG> if CGIs make assumptions about the values of -<CODE>SERVER_NAME</CODE> they may be broken by this option. The client -is essentially free to give whatever value they want as a hostname. -But if the CGI is only using <CODE>SERVER_NAME</CODE> to construct -self-referential URLs then it should be just fine. - -<P><STRONG>See also:</STRONG> -<A HREF="#servername">ServerName</A>, -<A HREF="#port">Port</A> - -<P><HR> - -<H2><A NAME="user">User directive</A></H2> -<!--%plaintext <?INDEX {\tt User} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> User <EM>unix-userid</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>User #-1</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> core<P> - -The User directive sets the userid as which the server will answer requests. -In order to use this directive, the standalone server must be run initially -as root. <EM>Unix-userid</EM> is one of: -<DL> -<DT>A username -<DD>Refers to the given user by name. -<DT># followed by a user number. -<DD>Refers to a user by their number. -</DL> - -The user should have no privileges which result in it being able to access -files which are not intended to be visible to the outside world, and -similarly, the user should not be able to execute code which is not -meant for httpd requests. It is recommended that you set up a new user and -group specifically for running the server. Some admins use user -<CODE>nobody</CODE>, but this is not always possible or desirable. -For example mod_proxy's cache, when enabled, must be accessible to this user -(see the <A HREF="mod_proxy.html#cacheroot"><CODE>CacheRoot</CODE> -directive</A>).<P> - -Notes: If you start the server as a non-root user, it will fail to change -to the lesser privileged user, and will instead continue to run as -that original user. If you do start the server as root, then it is normal -for the parent process to remain running as root.<P> - -Special note: Use of this directive in <VirtualHost> requires a -properly configured <A HREF="../suexec.html">suEXEC wrapper</A>. -When used inside a <VirtualHost> in this manner, only the user -that CGIs are run as is affected. Non-CGI requests are still processed -with the user specified in the main User directive.<P> - -SECURITY: Don't set User (or <A HREF="#group">Group</A>) to -<CODE>root</CODE> unless you know exactly what you are doing, and what the -dangers are.<P><HR> - -<H2><A NAME="virtualhost"><VirtualHost> directive</A></H2> -<!--%plaintext <?INDEX {\tt VirtualHost} section directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <VirtualHost <EM>addr</EM>[:<EM>port</EM>] - ...> ... -</VirtualHost> <BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Core.<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Non-IP address-based Virtual Hosting only -available in Apache 1.1 and later.<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Multiple address support only available in -Apache 1.2 and later.<P> - -<VirtualHost> and </VirtualHost> are used to enclose a group of -directives which will apply only to a particular virtual host. -Any directive which is allowed in a virtual host context may be used. -When the server receives a request for a document on a particular virtual -host, it uses the configuration directives enclosed in the <VirtualHost> -section. <EM>Addr</EM> can be -<MENU> -<LI>The IP address of the virtual host -<LI>A fully qualified domain name for the IP address of the virtual host. -</MENU> Example: -<BLOCKQUOTE> -<CODE> -<VirtualHost 10.1.2.3> <BR> -ServerAdmin webmaster@host.foo.com <BR> -DocumentRoot /www/docs/host.foo.com <BR> -ServerName host.foo.com <BR> -ErrorLog logs/host.foo.com-error_log <BR> -TransferLog logs/host.foo.com-access_log <BR> -</VirtualHost> -</CODE></BLOCKQUOTE> - -Each VirtualHost must correspond to a different IP address, different port -number or a -different host name for the server, in the latter case the server -machine must be configured to accept IP packets for multiple -addresses. (If the machine does not have multiple network interfaces, -then this can be accomplished with the <CODE>ifconfig alias</CODE> -command (if your OS supports it), or with kernel patches like <A -HREF="../misc/vif-info.html">VIF</A> (for SunOS(TM) 4.1.x)).<P> - -The special name <CODE>_default_</CODE> can be specified in which case -this virtual host will match any IP address that is not explicitly listed -in another virtual host. In the absence of any _default_ virtual host -the "main" server config, consisting of all those definitions outside -any VirtualHost section, is used when no match occurs.<P> - -You can specify a <CODE>:port</CODE> to change the port that is matched. -If unspecified then it defaults to the same port as the most recent -<CODE><A HREF="#port">Port</A></CODE> statement of the main server. You -may also specify <CODE>:*</CODE> to match all ports on that address. -(This is recommended when used with <CODE>_default_</CODE>.)<P> - -<STRONG>SECURITY</STRONG>: See the -<A HREF="../misc/security_tips.html">security tips</A> -document for details on why your security could be compromised if -the directory where logfiles are stored is writable by anyone other -than the user that starts the server. - -<P><STRONG>NOTE</STRONG>: The use of <VirtualHost> does -<STRONG>not</STRONG> affect what addresses Apache listens on. You may -need to ensure that Apache is listening on the correct addresses using -either <A HREF="#bindaddress">BindAddress</A> or <A -HREF="#listen">Listen</A>. - -<P><STRONG>See also:</STRONG> -<A HREF="../vhosts/index.html">Apache Virtual Host documentation</A><BR> -<STRONG>See also:</STRONG> -<A HREF="../dns-caveats.html">Warnings about DNS and Apache</A><BR> -<STRONG>See also:</STRONG> -<A HREF="../bind.html">Setting which addresses and ports Apache uses</A><BR> -<STRONG>See also</STRONG>: <A HREF="../sections.html">How Directory, -Location and Files sections work</A> for an explanation of how these -different sections are combined when a request is received -</P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/directive-dict.html b/docs/manual/mod/directive-dict.html deleted file mode 100644 index a4c13e55f5..0000000000 --- a/docs/manual/mod/directive-dict.html +++ /dev/null @@ -1,262 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Definitions of terms used to describe Apache directives - </TITLE> - </HEAD> -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> - <BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" - > -<!--#include virtual="header.html" --> - <H1 ALIGN="CENTER">Terms Used to Describe Apache Directives</H1> - - <P> - Each Apache configuration directive is described using a common format - that looks like this: - </P> - <DL> - <DD><A - HREF="#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> <EM>directive-name</EM> <EM>some args</EM> - <BR> - <A - HREF="#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> - <SAMP><EM>directive-name default-value</EM></SAMP> - <BR> - <A - HREF="#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> <EM>context-list</EM> - <BR> - <A - HREF="#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> <EM>override</EM> - <BR> - <A - HREF="#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> <EM>status</EM> - <BR> - <A - HREF="#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> <EM>module-name</EM> - <BR> - <A - HREF="#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> <EM>compatibility notes</EM> - </DD> - </DL> - <P> - Each of the directive's attributes, complete with possible values - where possible, are described in this document. - </P> - - <H2>Directive Terms</H2> - <UL> - <LI><A HREF="#Syntax">Syntax</A> - </LI> - <LI><A HREF="#Default">Default</A> - </LI> - <LI><A HREF="#Context">Context</A> - </LI> - <LI><A HREF="#Override">Override</A> - </LI> - <LI><A HREF="#Status">Status</A> - </LI> - <LI><A HREF="#Module">Module</A> - </LI> - <LI><A HREF="#Compatibility">Compatibility</A> - </LI> - </UL> - - <HR> - <H2><A NAME="Syntax">Syntax</A></H2> - <P> - This indicates the format of the directive as it would appear in a - configuration file. This syntax is extremely directive-specific, so - refer to the text of the directive's description for details. - </P> - - <HR> - <H2><A NAME="Default">Default</A></H2> - <P> - If the directive has a default value (<EM>i.e.</EM>, if you omit it - from your configuration entirely, the Apache Web server will behave as - though you set it to a particular value), it is described here. If - there is no default value, this section should say - "<EM>None</EM>". - </P> - - <HR> - <H2><A NAME="Context">Context</A></H2> - <P> - This indicates where in the server's configuration files the directive - is legal. It's a comma-separated list of one or more of the following - values: - </P> - <DL> - <DT><STRONG>server config</STRONG> - </DT> - <DD>This means that the directive may be used in the server - configuration files (<EM>e.g.</EM>, <SAMP>httpd.conf</SAMP>, - <SAMP>srm.conf</SAMP>, and <SAMP>access.conf</SAMP>), but - <STRONG>not</STRONG> within any <SAMP><VirtualHost></SAMP> or - <Directory> containers. It is not allowed in - <SAMP>.htaccess</SAMP> files at all. - <P> - </P> - </DD> - <DT><STRONG>virtual host</STRONG> - </DT> - <DD>This context means that the directive may appear inside - <SAMP><VirtualHost></SAMP> containers in the server - configuration files. - <P> - </P> - </DD> - <DT><STRONG>directory</STRONG> - </DT> - <DD>A directive marked as being valid in this context may be used - inside <SAMP><Directory></SAMP> containers in the server - configuration files. - <P> - </P> - </DD> - <DT><STRONG>.htaccess</STRONG> - </DT> - <DD>If a directive is valid in this context, it means that it can - appear inside <EM>per</EM>-directory <SAMP>.htaccess</SAMP> files. - It may not be processed, though depending upon the - <A - HREF="#Override" - REL="Help" - >overrides</A> - currently active. - <P> - </P> - </DD> - </DL> - <P> - The directive is <EM>only</EM> allowed within the designated context; - if you try to use it elsewhere, you'll get a configuration error that - will either prevent the server from handling requests in that context - correctly, or will keep the server from operating at all -- - <EM>i.e.</EM>, the server won't even start. - </P> - <P> - The valid locations for the directive are actually the result of a - Boolean OR of all of the listed contexts. In other words, a directive - that is marked as being valid in "<SAMP>server config, - .htaccess</SAMP>" can be used in the <SAMP>httpd.conf</SAMP> file - and in <SAMP>.htaccess</SAMP> files, but not within any - <Directory> or <VirtualHost> containers. - </P> - - <HR> - <H2><A NAME="Override">Override</A></H2> - <P> - This directive attribute indicates which configuration override must - be active in order for the directive to be processed when it appears - in a <SAMP>.htaccess</SAMP> file. If the directive's - <A - HREF="#Context" - REL="Help" - >context</A> - doesn't permit it to appear in <SAMP>.htaccess</SAMP> files, this - attribute should say "<EM>Not applicable</EM>". - </P> - <P> - Overrides are activated by the - <A - HREF="core.html#allowoverride" - REL="Help" - ><SAMP>AllowOverride</SAMP></A> - directive, and apply to a particular scope (such as a directory) and - all descendants, unless further modified by other - <SAMP>AllowOverride</SAMP> directives at lower levels. The - documentation for that directive also lists the possible override - names available. - </P> - - <HR> - <H2><A NAME="Status">Status</A></H2> - <P> - This indicates how tightly bound into the Apache Web server the - directive is; in other words, you may need to recompile the server - with an enhanced set of modules in order to gain access to the - directive and its functionality. Possible values for this attribute - are: - </P> - <DL> - <DT><STRONG>Core</STRONG> - </DT> - <DD>If a directive is listed as having "Core" status, that - means it is part of the innermost portions of the Apache Web server, - and is always available. - <P> - </P> - </DD> - <DT><STRONG>Base</STRONG> - </DT> - <DD>A directive labeled as having "Base" status is - supported by one of the standard Apache modules which is compiled - into the server by default, and is therefore normally available - unless you've taken steps to remove the module from your configuration. - <P> - </P> - </DD> - <DT><STRONG>Extension</STRONG> - </DT> - <DD>A directive with "Extension" status is provided by one - of the modules included with the Apache server kit, but the module - isn't normally compiled into the server. To enable the directive - and its functionality, you will need to change the server build - configuration files and re-compile Apache. - <P> - </P> - </DD> - <DT><STRONG>Experimental</STRONG> - </DT> - <DD>"Experimental" status indicates that the directive is - available as part of the Apache kit, but you're on your own if you - try to use it. The directive is being documented for completeness, - and is not necessarily supported. The module which provides the - directive may or may not be compiled in by default; check the top of - the page which describes the directive and its module to see if it - remarks on the availability. - <P> - </P> - </DD> - </DL> - - <HR> - <H2><A NAME="Module">Module</A></H2> - <P> - This quite simply lists the name of the source module which defines - the directive. - </P> - - <HR> - <H2><A NAME="Compatibility">Compatibility</A></H2> - <P> - If the directive wasn't part of the original Apache version 1 - distribution, the version in which it was introduced should be listed - here. If the directive has the same name as one from the NCSA HTTPd - server, any inconsistencies in behaviour between the two should also - be mentioned. Otherwise, this attribute should say "<EM>No - compatibility issues.</EM>" - </P> -<!--#include virtual="footer.html" --> - </BODY> -</HTML> diff --git a/docs/manual/mod/directive-dict.html.en b/docs/manual/mod/directive-dict.html.en deleted file mode 100644 index a4c13e55f5..0000000000 --- a/docs/manual/mod/directive-dict.html.en +++ /dev/null @@ -1,262 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Definitions of terms used to describe Apache directives - </TITLE> - </HEAD> -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> - <BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" - > -<!--#include virtual="header.html" --> - <H1 ALIGN="CENTER">Terms Used to Describe Apache Directives</H1> - - <P> - Each Apache configuration directive is described using a common format - that looks like this: - </P> - <DL> - <DD><A - HREF="#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> <EM>directive-name</EM> <EM>some args</EM> - <BR> - <A - HREF="#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> - <SAMP><EM>directive-name default-value</EM></SAMP> - <BR> - <A - HREF="#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> <EM>context-list</EM> - <BR> - <A - HREF="#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> <EM>override</EM> - <BR> - <A - HREF="#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> <EM>status</EM> - <BR> - <A - HREF="#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> <EM>module-name</EM> - <BR> - <A - HREF="#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> <EM>compatibility notes</EM> - </DD> - </DL> - <P> - Each of the directive's attributes, complete with possible values - where possible, are described in this document. - </P> - - <H2>Directive Terms</H2> - <UL> - <LI><A HREF="#Syntax">Syntax</A> - </LI> - <LI><A HREF="#Default">Default</A> - </LI> - <LI><A HREF="#Context">Context</A> - </LI> - <LI><A HREF="#Override">Override</A> - </LI> - <LI><A HREF="#Status">Status</A> - </LI> - <LI><A HREF="#Module">Module</A> - </LI> - <LI><A HREF="#Compatibility">Compatibility</A> - </LI> - </UL> - - <HR> - <H2><A NAME="Syntax">Syntax</A></H2> - <P> - This indicates the format of the directive as it would appear in a - configuration file. This syntax is extremely directive-specific, so - refer to the text of the directive's description for details. - </P> - - <HR> - <H2><A NAME="Default">Default</A></H2> - <P> - If the directive has a default value (<EM>i.e.</EM>, if you omit it - from your configuration entirely, the Apache Web server will behave as - though you set it to a particular value), it is described here. If - there is no default value, this section should say - "<EM>None</EM>". - </P> - - <HR> - <H2><A NAME="Context">Context</A></H2> - <P> - This indicates where in the server's configuration files the directive - is legal. It's a comma-separated list of one or more of the following - values: - </P> - <DL> - <DT><STRONG>server config</STRONG> - </DT> - <DD>This means that the directive may be used in the server - configuration files (<EM>e.g.</EM>, <SAMP>httpd.conf</SAMP>, - <SAMP>srm.conf</SAMP>, and <SAMP>access.conf</SAMP>), but - <STRONG>not</STRONG> within any <SAMP><VirtualHost></SAMP> or - <Directory> containers. It is not allowed in - <SAMP>.htaccess</SAMP> files at all. - <P> - </P> - </DD> - <DT><STRONG>virtual host</STRONG> - </DT> - <DD>This context means that the directive may appear inside - <SAMP><VirtualHost></SAMP> containers in the server - configuration files. - <P> - </P> - </DD> - <DT><STRONG>directory</STRONG> - </DT> - <DD>A directive marked as being valid in this context may be used - inside <SAMP><Directory></SAMP> containers in the server - configuration files. - <P> - </P> - </DD> - <DT><STRONG>.htaccess</STRONG> - </DT> - <DD>If a directive is valid in this context, it means that it can - appear inside <EM>per</EM>-directory <SAMP>.htaccess</SAMP> files. - It may not be processed, though depending upon the - <A - HREF="#Override" - REL="Help" - >overrides</A> - currently active. - <P> - </P> - </DD> - </DL> - <P> - The directive is <EM>only</EM> allowed within the designated context; - if you try to use it elsewhere, you'll get a configuration error that - will either prevent the server from handling requests in that context - correctly, or will keep the server from operating at all -- - <EM>i.e.</EM>, the server won't even start. - </P> - <P> - The valid locations for the directive are actually the result of a - Boolean OR of all of the listed contexts. In other words, a directive - that is marked as being valid in "<SAMP>server config, - .htaccess</SAMP>" can be used in the <SAMP>httpd.conf</SAMP> file - and in <SAMP>.htaccess</SAMP> files, but not within any - <Directory> or <VirtualHost> containers. - </P> - - <HR> - <H2><A NAME="Override">Override</A></H2> - <P> - This directive attribute indicates which configuration override must - be active in order for the directive to be processed when it appears - in a <SAMP>.htaccess</SAMP> file. If the directive's - <A - HREF="#Context" - REL="Help" - >context</A> - doesn't permit it to appear in <SAMP>.htaccess</SAMP> files, this - attribute should say "<EM>Not applicable</EM>". - </P> - <P> - Overrides are activated by the - <A - HREF="core.html#allowoverride" - REL="Help" - ><SAMP>AllowOverride</SAMP></A> - directive, and apply to a particular scope (such as a directory) and - all descendants, unless further modified by other - <SAMP>AllowOverride</SAMP> directives at lower levels. The - documentation for that directive also lists the possible override - names available. - </P> - - <HR> - <H2><A NAME="Status">Status</A></H2> - <P> - This indicates how tightly bound into the Apache Web server the - directive is; in other words, you may need to recompile the server - with an enhanced set of modules in order to gain access to the - directive and its functionality. Possible values for this attribute - are: - </P> - <DL> - <DT><STRONG>Core</STRONG> - </DT> - <DD>If a directive is listed as having "Core" status, that - means it is part of the innermost portions of the Apache Web server, - and is always available. - <P> - </P> - </DD> - <DT><STRONG>Base</STRONG> - </DT> - <DD>A directive labeled as having "Base" status is - supported by one of the standard Apache modules which is compiled - into the server by default, and is therefore normally available - unless you've taken steps to remove the module from your configuration. - <P> - </P> - </DD> - <DT><STRONG>Extension</STRONG> - </DT> - <DD>A directive with "Extension" status is provided by one - of the modules included with the Apache server kit, but the module - isn't normally compiled into the server. To enable the directive - and its functionality, you will need to change the server build - configuration files and re-compile Apache. - <P> - </P> - </DD> - <DT><STRONG>Experimental</STRONG> - </DT> - <DD>"Experimental" status indicates that the directive is - available as part of the Apache kit, but you're on your own if you - try to use it. The directive is being documented for completeness, - and is not necessarily supported. The module which provides the - directive may or may not be compiled in by default; check the top of - the page which describes the directive and its module to see if it - remarks on the availability. - <P> - </P> - </DD> - </DL> - - <HR> - <H2><A NAME="Module">Module</A></H2> - <P> - This quite simply lists the name of the source module which defines - the directive. - </P> - - <HR> - <H2><A NAME="Compatibility">Compatibility</A></H2> - <P> - If the directive wasn't part of the original Apache version 1 - distribution, the version in which it was introduced should be listed - here. If the directive has the same name as one from the NCSA HTTPd - server, any inconsistencies in behaviour between the two should also - be mentioned. Otherwise, this attribute should say "<EM>No - compatibility issues.</EM>" - </P> -<!--#include virtual="footer.html" --> - </BODY> -</HTML> diff --git a/docs/manual/mod/directives.html b/docs/manual/mod/directives.html deleted file mode 100644 index bfa608d6d8..0000000000 --- a/docs/manual/mod/directives.html +++ /dev/null @@ -1,224 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache directives</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Apache Directives</H1> -<P> -Each Apache directive available in the standard Apache distribution is -listed here. They are described using a consistent format, and there is -<A - HREF="directive-dict.html" - REL="Glossary" ->a dictionary</A> -of the terms used in their descriptions available. -</P> -<UL> -<LI><A HREF="core.html#accessconfig">AccessConfig</A> -<LI><A HREF="core.html#accessfilename">AccessFileName</A> -<LI><A HREF="mod_actions.html#action">Action</A> -<LI><A HREF="mod_autoindex.html#addalt">AddAlt</A> -<LI><A HREF="mod_autoindex.html#addaltbyencoding">AddAltByEncoding</A> -<LI><A HREF="mod_autoindex.html#addaltbytype">AddAltByType</A> -<LI><A HREF="mod_autoindex.html#adddescription">AddDescription</A> -<LI><A HREF="mod_mime.html#addencoding">AddEncoding</A> -<LI><A HREF="mod_mime.html#addhandler">AddHandler</A> -<LI><A HREF="mod_autoindex.html#addicon">AddIcon</A> -<LI><A HREF="mod_autoindex.html#addiconbyencoding">AddIconByEncoding</A> -<LI><A HREF="mod_autoindex.html#addiconbytype">AddIconByType</A> -<LI><A HREF="mod_mime.html#addlanguage">AddLanguage</A> -<LI><A HREF="core.html#addmodule">AddModule</A> -<LI><A HREF="mod_info.html#addmoduleinfo">AddModuleInfo</A> -<LI><A HREF="mod_mime.html#addtype">AddType</A> -<LI><A HREF="mod_log_agent.html#agentlog">AgentLog</A> -<LI><A HREF="mod_alias.html#alias">Alias</A> -<LI><A HREF="mod_alias.html#aliasmatch">AliasMatch</A> -<LI><A HREF="mod_access.html#allow">allow</A> -<LI><A HREF="core.html#allowoverride">AllowOverride</A> -<LI><A HREF="mod_auth_anon.html#anonymous">Anonymous</A> -<LI><A HREF="mod_auth_anon.html#Authoritative">Anonymous_Authoritative</A> -<LI><A HREF="mod_auth_anon.html#LogEmail">Anonymous_LogEmail</A> -<LI><A HREF="mod_auth_anon.html#MustGiveEmail">Anonymous_MustGiveEmail</A> -<LI><A HREF="mod_auth_anon.html#NoUserID">Anonymous_NoUserID</A> -<LI><A HREF="mod_auth_anon.html#VerifyEmail">Anonymous_VerifyEmail</A> -<LI><A HREF="mod_auth.html#authauthoritative">AuthAuthoritative</A> -<LI><A HREF="mod_auth_db.html#authdbauthoritative">AuthDBAuthoritative</A> -<LI><A HREF="mod_auth_db.html#authdbgroupfile">AuthDBGroupFile</A> -<LI><A HREF="mod_auth_dbm.html#authdbmauthoritative">AuthDBMAuthoritative</A> -<LI><A HREF="mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</A> -<LI><A HREF="mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</A> -<LI><A HREF="mod_auth_db.html#authdbuserfile">AuthDBUserFile</A> -<LI><A HREF="mod_auth_dbm.html#authdbmuserfile">AuthDBMUserFile</A> -<LI><A HREF="mod_digest.html#authdigestfile">AuthDigestFile</A> -<LI><A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> -<LI><A HREF="core.html#authname">AuthName</A> -<LI><A HREF="core.html#authtype">AuthType</A> -<LI><A HREF="mod_auth.html#authuserfile">AuthUserFile</A> -<LI><A HREF="core.html#bindaddress">BindAddress</A> -<LI><A HREF="mod_setenvif.html#BrowserMatch">BrowserMatch</A> -<LI><A HREF="mod_setenvif.html#BrowserMatchNoCase">BrowserMatchNoCase</A> -<LI><A HREF="core.html#bs2000account">BS2000Account</A> -<LI><A HREF="mod_proxy.html#cachedefaultexpire">CacheDefaultExpire</A> -<LI><A HREF="mod_proxy.html#cachedirlength">CacheDirLength</A> -<LI><A HREF="mod_proxy.html#cachedirlevels">CacheDirLevels</A> -<LI><A HREF="mod_proxy.html#cacheforcecompletion">CacheForceCompletion</A> -<LI><A HREF="mod_proxy.html#cachegcinterval">CacheGcInterval</A> -<LI><A HREF="mod_proxy.html#cachelastmodifiedfactor">CacheLastModifiedFactor</A> -<LI><A HREF="mod_proxy.html#cachemaxexpire">CacheMaxExpire</A> -<LI><A HREF="mod_negotiation.html#cachenegotiateddocs">CacheNegotiatedDocs</A> -<LI><A HREF="mod_proxy.html#cacheroot">CacheRoot</A> -<LI><A HREF="mod_proxy.html#cachesize">CacheSize</A> -<LI><A HREF="mod_speling.html#checkspelling">CheckSpelling</A> -<LI><A HREF="core.html#clearmodulelist">ClearModuleList</A> -<LI><A HREF="core.html#contentdigest">ContentDigest</A> -<LI><A HREF="mod_usertrack.html#cookieexpires">CookieExpires</A> -<LI><A HREF="mod_cookies.html#cookielog">CookieLog</A> (mod_cookies) -<LI><A HREF="mod_log_config.html#cookielog">CookieLog</A> (mod_log_config) -<LI><A HREF="mod_usertrack.html#cookietracking">CookieTracking</A> -<LI><A HREF="core.html#coredumpdirectory">CoreDumpDirectory</A> -<LI><A HREF="mod_log_config.html#customlog">CustomLog</A> -<LI><A HREF="mod_autoindex.html#defaulticon">DefaultIcon</A> -<LI><A HREF="mod_mime.html#defaultlanguage">DefaultLanguage</A> -<LI><A HREF="core.html#defaulttype">DefaultType</A> -<LI><A HREF="mod_access.html#deny">deny</A> -<LI><A HREF="core.html#directory"><Directory></A> -<LI><A HREF="core.html#directorymatch"><DirectoryMatch></A> -<LI><A HREF="mod_dir.html#directoryindex">DirectoryIndex</A> -<LI><A HREF="core.html#documentroot">DocumentRoot</A> -<LI><A HREF="core.html#documentrootcheck">DocumentRootCheck</A> -<LI><A HREF="core.html#errordocument">ErrorDocument</A> -<LI><A HREF="core.html#errorlog">ErrorLog</A> -<LI><A HREF="mod_example.html#example">Example</A> -<LI><A HREF="mod_expires.html#expiresactive">ExpiresActive</A> -<LI><A HREF="mod_expires.html#expiresbytype">ExpiresByType</A> -<LI><A HREF="mod_expires.html#expiresdefault">ExpiresDefault</A> -<LI><A HREF="mod_status.html#extendedstatus">ExtendedStatus</A> -<LI><A HREF="mod_autoindex.html#fancyindexing">FancyIndexing</A> -<LI><A HREF="core.html#files"><Files></A> -<LI><A HREF="core.html#filesmatch"><FilesMatch></A> -<LI><A HREF="mod_mime.html#forcetype">ForceType</A> -<LI><A HREF="core.html#group">Group</A> -<LI><A HREF="mod_headers.html#header">Header</A> -<LI><A HREF="mod_autoindex.html#headername">HeaderName</A> -<LI><A HREF="core.html#hostnamelookups">HostNameLookups</A> -<LI><A HREF="core.html#identitycheck">IdentityCheck</A> -<LI><A HREF="core.html#ifdefine"><IfDefine></A> -<LI><A HREF="core.html#ifmodule"><IfModule></A> -<LI><A HREF="mod_imap.html#imapbase">ImapBase</A> -<LI><A HREF="mod_imap.html#imapdefault">ImapDefault</A> -<LI><A HREF="mod_imap.html#imapmenu">ImapMenu</A> -<LI><A HREF="core.html#include">Include</A> -<LI><A HREF="mod_autoindex.html#indexignore">IndexIgnore</A> -<LI><A HREF="mod_autoindex.html#indexoptions">IndexOptions</A> -<LI><A HREF="core.html#keepalive">KeepAlive</A> -<LI><A HREF="core.html#keepalivetimeout">KeepAliveTimeout</A> -<LI><A HREF="mod_negotiation.html#languagepriority">LanguagePriority</A> -<LI><A HREF="core.html#limit"><Limit></A> -<LI><A HREF="core.html#limitexcept"><LimitExcept></A> -<LI><A HREF="core.html#limitrequestbody">LimitRequestBody</A> -<LI><A HREF="core.html#limitrequestfields">LimitRequestFields</A> -<LI><A HREF="core.html#limitrequestfieldsize">LimitRequestFieldsize</A> -<LI><A HREF="core.html#limitrequestline">LimitRequestLine</A> -<LI><A HREF="core.html#listen">Listen</A> -<LI><A HREF="core.html#listenbacklog">ListenBacklog</A> -<LI><A HREF="mod_so.html#loadfile">LoadFile</A> -<LI><A HREF="mod_so.html#loadmodule">LoadModule</A> -<LI><A HREF="core.html#location"><Location></A> -<LI><A HREF="core.html#locationmatch"><LocationMatch></A> -<LI><A HREF="core.html#lockfile">LockFile</A> -<LI><A HREF="mod_log_config.html#logformat">LogFormat</A> -<LI><A HREF="core.html#loglevel">LogLevel</A> -<LI><A HREF="core.html#maxclients">MaxClients</A> -<LI><A HREF="core.html#maxkeepaliverequests">MaxKeepAliveRequests</A> -<LI><A HREF="core.html#maxrequestsperchild">MaxRequestsPerChild</A> -<LI><A HREF="core.html#maxspareservers">MaxSpareServers</A> -<LI><A HREF="mod_cern_meta.html#metadir">MetaDir</A> -<LI><A HREF="mod_cern_meta.html#metafiles">MetaFiles</A> -<LI><A HREF="mod_cern_meta.html#metasuffix">MetaSuffix</A> -<LI><A HREF="mod_mime_magic.html#mimemagicfile">MimeMagicFile</A> -<LI><A HREF="core.html#minspareservers">MinSpareServers</A> -<LI><A HREF="mod_mmap_static.html#mmapfile">MMapFile</A> -<LI><A HREF="core.html#namevirtualhost">NameVirtualHost</A> -<LI><A HREF="mod_proxy.html#nocache">NoCache</A> -<LI><A HREF="core.html#options">Options</A> -<LI><A HREF="mod_access.html#order">order</A> -<LI><A HREF="mod_env.html#passenv">PassEnv</A> -<LI><A HREF="core.html#pidfile">PidFile</A> -<LI><A HREF="core.html#port">Port</A> -<LI><A HREF="mod_proxy.html#proxyblock">ProxyBlock</A> -<LI><A HREF="mod_proxy.html#proxypass">ProxyPass</A> -<LI><A HREF="mod_proxy.html#proxypassreverse">ProxyPassReverse</A> -<LI><A HREF="mod_proxy.html#proxyreceivebuffersize">ProxyReceiveBufferSize</A> -<LI><A HREF="mod_proxy.html#proxyremote">ProxyRemote</A> -<LI><A HREF="mod_proxy.html#proxyrequests">ProxyRequests</A> -<LI><A HREF="mod_proxy.html#proxyvia">ProxyVia</A> -<LI><A HREF="mod_autoindex.html#readmename">ReadmeName</A> -<LI><A HREF="mod_alias.html#redirect">Redirect</A> -<LI><A HREF="mod_alias.html#redirectmatch">RedirectMatch</A> -<LI><A HREF="mod_alias.html#redirectperm">RedirectPermanent</A> -<LI><A HREF="mod_alias.html#redirecttemp">RedirectTemp</A> -<LI><A HREF="mod_log_referer.html#refererignore">RefererIgnore</A> -<LI><A HREF="mod_log_referer.html#refererlog">RefererLog</A> -<LI><A HREF="mod_mime#removehandler">RemoveHandler</A> -<LI><A HREF="core.html#require">require</A> -<LI><A HREF="core.html#resourceconfig">ResourceConfig</A> -<LI><A HREF="mod_rewrite.html#RewriteBase">RewriteBase</A> -<LI><A HREF="mod_rewrite.html#RewriteCond">RewriteCond</A> -<LI><A HREF="mod_rewrite.html#RewriteEngine">RewriteEngine</A> -<LI><A HREF="mod_rewrite.html#RewriteLock">RewriteLock</A> -<LI><A HREF="mod_rewrite.html#RewriteLog">RewriteLog</A> -<LI><A HREF="mod_rewrite.html#RewriteLogLevel">RewriteLogLevel</A> -<LI><A HREF="mod_rewrite.html#RewriteMap">RewriteMap</A> -<LI><A HREF="mod_rewrite.html#RewriteOptions">RewriteOptions</A> -<LI><A HREF="mod_rewrite.html#RewriteRule">RewriteRule</A> -<LI><A HREF="core.html#rlimitcpu">RLimitCPU</A> -<LI><A HREF="core.html#rlimitmem">RLimitMEM</A> -<LI><A HREF="core.html#rlimitnproc">RLimitNPROC</A> -<LI><A HREF="core.html#satisfy">Satisfy</A> -<LI><A HREF="core.html#scoreboardfile">ScoreBoardFile</A> -<LI><A HREF="mod_actions.html#script">Script</A> -<LI><A HREF="mod_alias.html#scriptalias">ScriptAlias</A> -<LI><A HREF="mod_alias.html#scriptaliasmatch">ScriptAliasMatch</A> -<LI><A HREF="core.html#scriptinterpretersource">ScriptInterpreterSource</A> -<LI><A HREF="mod_cgi.html#scriptlog">ScriptLog</A> -<LI><A HREF="mod_cgi.html#scriptlogbuffer">ScriptLogBuffer</A> -<LI><A HREF="mod_cgi.html#scriptloglength">ScriptLogLength</A> -<LI><A HREF="core.html#sendbuffersize">SendBufferSize</A> -<LI><A HREF="core.html#serveradmin">ServerAdmin</A> -<LI><A HREF="core.html#serveralias">ServerAlias</A> -<LI><A HREF="core.html#servername">ServerName</A> -<LI><A HREF="core.html#serverpath">ServerPath</A> -<LI><A HREF="core.html#serverroot">ServerRoot</A> -<LI><A HREF="core.html#serversignature">ServerSignature</A> -<LI><A HREF="core.html#servertokens">ServerTokens</A> -<LI><A HREF="core.html#servertype">ServerType</A> -<LI><A HREF="mod_env.html#setenv">SetEnv</A> -<LI><A HREF="mod_setenvif.html#setenvif">SetEnvIf</A> -<LI><A HREF="mod_setenvif.html#SetEnvIfNoCase">SetEnvIfNoCase</A> -<LI><A HREF="mod_mime.html#sethandler">SetHandler</A> -<LI><A HREF="core.html#startservers">StartServers</A> -<LI><A HREF="core.html#threadsperchild">ThreadsPerChild</A> -<LI><A HREF="core.html#timeout">TimeOut</A> -<LI><A HREF="mod_log_config.html#transferlog">TransferLog</A> -<LI><A HREF="mod_mime.html#typesconfig">TypesConfig</A> -<LI><A HREF="mod_env.html#unsetenv">UnsetEnv</A> -<LI><A HREF="core.html#usecanonicalname">UseCanonicalName</A> -<LI><A HREF="core.html#user">User</A> -<LI><A HREF="mod_userdir.html#userdir">UserDir</A> -<LI><A HREF="core.html#virtualhost"><VirtualHost></A> -<LI><A HREF="mod_include.html#xbithack">XBitHack</A> -</UL> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/footer.html b/docs/manual/mod/footer.html deleted file mode 100644 index 7fe745dcfd..0000000000 --- a/docs/manual/mod/footer.html +++ /dev/null @@ -1,8 +0,0 @@ -<HR> - -<H3 ALIGN="CENTER"> - Apache HTTP Server Version 1.3 -</H3> - -<A HREF="./"><IMG SRC="../images/index.gif" ALT="Index"></A> -<A HREF="../"><IMG SRC="../images/home.gif" ALT="Home"></A> diff --git a/docs/manual/mod/header.html b/docs/manual/mod/header.html deleted file mode 100644 index 5662300029..0000000000 --- a/docs/manual/mod/header.html +++ /dev/null @@ -1,6 +0,0 @@ -<DIV ALIGN="CENTER"> - <IMG SRC="../images/sub.gif" ALT="[APACHE DOCUMENTATION]"> - <H3> - Apache HTTP Server Version 1.3 - </H3> -</DIV> diff --git a/docs/manual/mod/index.html b/docs/manual/mod/index.html deleted file mode 100644 index f003071e9f..0000000000 --- a/docs/manual/mod/index.html +++ /dev/null @@ -1,120 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache modules</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Apache modules</H1> - -<P> -Below is a list of all of the modules that come as part of the -Apache distribution. See also the complete alphabetical list of -<A - HREF="directives.html" ->all Apache directives</A>. -</P> - -<DL> -<DT><A HREF="core.html">Core</A> -<DD>Core Apache features. -<DT><A HREF="mod_access.html">mod_access</A> -<DD>Host based access control. -<DT><A HREF="mod_actions.html">mod_actions</A> Apache 1.1 and later. -<DD>Filetype/method-based script execution -<DT><A HREF="mod_alias.html">mod_alias</A> -<DD>Aliases and redirects. -<DT><A HREF="mod_asis.html">mod_asis</A> -<DD>The .asis file handler. -<DT><A HREF="mod_auth.html">mod_auth</A> -<DD>User authentication using text files. -<DT><A HREF="mod_auth_anon.html">mod_auth_anon</A> -<DD>Anonymous user authentication, FTP-style. -<DT><A HREF="mod_auth_db.html">mod_auth_db</A> -<DD>User authentication using Berkeley DB files. -<DT><A HREF="mod_auth_dbm.html">mod_auth_dbm</A> -<DD>User authentication using DBM files. -<DT><A HREF="mod_autoindex.html">mod_autoindex</A> -<DD>Automatic directory listings. -<DT><A HREF="mod_browser.html">mod_browser</A> Apache 1.2.* only -<DD>Set environment variables based on User-Agent strings. Replaced by - mod_setenvif in Apache 1.3 and up -<DT><A HREF="mod_cern_meta.html">mod_cern_meta</A> -<DD>Support for HTTP header metafiles. -<DT><A HREF="mod_cgi.html">mod_cgi</A> -<DD>Invoking CGI scripts. -<DT><A HREF="mod_cookies.html">mod_cookies</A> up to Apache 1.1.1 -<DD>Support for Netscape-like cookies. Replaced in Apache 1.2 by -mod_usertrack -<DT><A HREF="mod_digest.html">mod_digest</A> -<DD>MD5 authentication -<DT><A HREF="mod_dir.html">mod_dir</A> -<DD>Basic directory handling. -<DT><A HREF="mod_dld.html">mod_dld</A> Apache 1.2.* and earlier -<DD>Start-time linking with the GNU libdld. Replaced in Apache 1.3 by mod_so -<DT><A HREF="mod_dll.html">mod_dll</A> Apache 1.3b1 to 1.3b5 only -<DD>Replaced in 1.3b6 by mod_so -<DT><A HREF="mod_env.html">mod_env</A> -<DD>Passing of environments to CGI scripts -<DT><A HREF="mod_example.html">mod_example</A> Apache 1.2 and up -<DD>Demonstrates Apache API -<DT><A HREF="mod_expires.html">mod_expires</A> Apache 1.2 and up -<DD>Apply Expires: headers to resources -<DT><A HREF="mod_headers.html">mod_headers</A> Apache 1.2 and up -<DD>Add arbitrary HTTP headers to resources -<DT><A HREF="mod_imap.html">mod_imap</A> -<DD>The imagemap file handler. -<DT><A HREF="mod_include.html">mod_include</A> -<DD>Server-parsed documents. -<DT><A HREF="mod_info.html">mod_info</A> -<DD>Server configuration information -<DT><A HREF="mod_isapi.html">mod_isapi</A> -<DD>Windows ISAPI Extension support -<DT><A HREF="mod_log_agent.html">mod_log_agent</A> -<DD>Logging of User Agents. -<DT><A HREF="mod_log_common.html">mod_log_common</A> up to Apache 1.1.1 -<DD>Standard logging in the Common Logfile Format. Replaced by the -mod_log_config module in Apache 1.2 and up -<DT><A HREF="mod_log_config.html">mod_log_config</A> -<DD>User-configurable logging replacement for mod_log_common. -<DT><A HREF="mod_log_referer.html">mod_log_referer</A> -<DD>Logging of document references. -<DT><A HREF="mod_mime.html">mod_mime</A> -<DD>Determining document types using file extensions. -<DT><A HREF="mod_mime_magic.html">mod_mime_magic</A> -<DD>Determining document types using "magic numbers". -<DT><A HREF="mod_mmap_static.html">mod_mmap_static</A> -<DD>Mapping files into memory for faster serving. -<DT><A HREF="mod_negotiation.html">mod_negotiation</A> -<DD>Content negotiation. -<DT><A HREF="mod_proxy.html">mod_proxy</A> -<DD>Caching proxy abilities -<DT><A HREF="mod_rewrite.html">mod_rewrite</A> Apache 1.2 and up -<DD>Powerful URI-to-filename mapping using regular expressions -<DT><A HREF="mod_setenvif.html">mod_setenvif</A> Apache 1.3 and up -<DD>Set environment variables based on client information -<DT><A HREF="mod_so.html">mod_so</A> Apache 1.3 and up -<DD>Experimental support for loading modules (DLLs on Windows) at runtime -<DT><A HREF="mod_speling.html">mod_speling</A> Apache 1.3 and up -<DD>Automatically correct minor typos in URLs -<DT><A HREF="mod_status.html">mod_status</A> -<DD>Server status display -<DT><A HREF="mod_userdir.html">mod_userdir</A> -<DD>User home directories. -<DT><A HREF="mod_unique_id.html">mod_unique_id</A> Apache 1.3 and up -<DD>Generate unique request identifier for every request -<DT><A HREF="mod_usertrack.html">mod_usertrack</A> Apache 1.2 and up -<DD>User tracking using Cookies (replacement for mod_cookies.c) -</DL> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_access.html b/docs/manual/mod/mod_access.html deleted file mode 100644 index 82cd71c69f..0000000000 --- a/docs/manual/mod/mod_access.html +++ /dev/null @@ -1,312 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_access</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> - -<H1 ALIGN="CENTER">Module mod_access</H1> -<P> -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. -</P> - -<UL> -<LI><A HREF="#allow">allow</A> -<LI><A HREF="#allowfromenv">allow from env=</A> -<LI><A HREF="#deny">deny</A> -<LI><A HREF="#denyfromenv">deny from env=</A> -<LI><A HREF="#order">order</A> -</UL> -<HR> - - -<H2><A NAME="allow">allow directive</A></H2> -<P> -<!--%plaintext <?INDEX {\tt allow} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> allow from <EM>host host ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Limit<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_access -</P> -<P> -The allow directive affects which hosts can access a given directory. -<EM>Host</EM> is one of the following: -</P> -<DL> -<DT><CODE>all</CODE> -<DD>All hosts are allowed access -<DT>A (partial) domain-name -<DD>Hosts whose names match, or end 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. -<DT>A network/netmask pair (<STRONG>Apache 1.3 and later</STRONG>) -<DD>A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet - restriction. (<EM>i.e.</EM>, 10.1.0.0/255.255.0.0) -<DT>A network/nnn CIDR specification (<STRONG>Apache 1.3 and later</STRONG>) -<DD>Similar to the previous case, except the netmask consists of nnn - high-order 1 bits. (<EM>i.e.</EM>, 10.1.0.0/16 is the same as 10.1.0.0/255.255.0.0) -</DL> -<P> -Example: -</P> -<BLOCKQUOTE><CODE>allow from .ncsa.uiuc.edu</CODE></BLOCKQUOTE> -<P> -All hosts in the specified domain are allowed access. -</P> -<P> -Note that this compares whole components; <CODE>bar.edu</CODE> -would not match <CODE>foobar.edu</CODE>. -</P> -<P> -See also <A HREF="#deny">deny</A>, <A HREF="#order">order</A>, and -<A HREF="mod_browser.html#browsermatch">BrowserMatch</A>. -</P> - -<P> -<A NAME="allowfromenv"><STRONG>Syntax:</STRONG> allow from - env=<EM>variablename</EM></A><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Limit<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_access<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2 and above -</P> -<P> -The allow from env directive controls access to a directory by the -existence (or non-existence) of an environment variable. -</P> -<P> -Example: -</P> -<BLOCKQUOTE><PRE> -BrowserMatch ^KnockKnock/2.0 let_me_in -<Directory /docroot> - order deny,allow - deny from all - allow from env=let_me_in -</Directory> -</PRE></BLOCKQUOTE> -In this case browsers with the user-agent string <TT>KnockKnock/2.0</TT> will -be allowed access, and all others will be denied. -<P> -See also <A HREF="#denyfromenv">deny from env</A> -and <A HREF="#order">order</A>. -</P> -<HR> - -<H2><A NAME="deny">deny directive</A></H2> -<P> -<!--%plaintext <?INDEX {\tt deny} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> deny from <EM>host host ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Limit<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_access -</P> -<P> -The deny directive affects which hosts can access a given directory. -<EM>Host</EM> is one of the following: -</P> -<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. -<DT>A network/netmask pair (<STRONG>Apache 1.3 and later</STRONG>) -<DD>A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet - restriction. (<EM>i.e.</EM>, 10.1.0.0/255.255.0.0) -<DT>A network/nnn CIDR specification (<STRONG>Apache 1.3 and later</STRONG>) -<DD>Similar to the previous case, except the netmask consists of nnn - high-order 1 bits. (<EM>i.e.</EM>, 10.1.0.0/16 is the same as 10.1.0.0/255.255.0.0) -</DL> -<P> -Example: -</P> -<BLOCKQUOTE><CODE>deny from 16</CODE></BLOCKQUOTE> -<P> -All hosts in the specified network are denied access. -</P> -<P> -Note that this compares whole components; <CODE>bar.edu</CODE> -would not match <CODE>foobar.edu</CODE>. -</P> -<P> -See also <A HREF="#allow">allow</A> and <A HREF="#order">order</A>. -</P> - -<P> -<A NAME="denyfromenv"><STRONG>Syntax:</STRONG> deny from - env=<EM>variablename</EM></A><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Limit<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_access<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2 and above -</P> -<P> -The deny from env directive controls access to a directory by the -existence (or non-existence) of an environment variable. -</P> -<P> -Example: -</P> -<BLOCKQUOTE><PRE> -BrowserMatch ^BadRobot/0.9 go_away -<Directory /docroot> - order allow,deny - allow from all - deny from env=go_away -</Directory> -</PRE></BLOCKQUOTE> -In this case browsers with the user-agent string <TT>BadRobot/0.9</TT> will -be denied access, and all others will be allowed. - -<P> -See also <A HREF="#allowfromenv">allow from env</A> -and <A HREF="#order">order</A>. -</P> -<HR> - -<H2><A NAME="order">order directive</A></H2> -<P> -<!--%plaintext <?INDEX {\tt order} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> order <EM>ordering</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>order deny,allow</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Limit<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_access -</P> -<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 -</P> -<DL> -<DT>deny,allow -<DD>the deny directives are evaluated before the allow directives. (The -initial state is OK.) -<DT>allow,deny -<DD>the allow directives are evaluated before the deny directives. (The -initial state is FORBIDDEN.) -<DT>mutual-failure -<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.) -</DL> -<P> -Keywords may only be separated by a comma; no whitespace is allowed between -them. -<STRONG>Note that in all cases every <CODE>allow</CODE> and <CODE>deny</CODE> -statement is evaluated, there is no "short-circuiting".</STRONG> -</P> -<P> -Example: -</P> -<BLOCKQUOTE><CODE> - order deny,allow<BR> - deny from all<BR> - allow from .ncsa.uiuc.edu<BR> -</CODE></BLOCKQUOTE> -<P> -Hosts in the ncsa.uiuc.edu domain are allowed access; all other hosts are -denied access. -</P> -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_actions.html b/docs/manual/mod/mod_actions.html deleted file mode 100644 index 43174f7701..0000000000 --- a/docs/manual/mod/mod_actions.html +++ /dev/null @@ -1,126 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Module mod_actions</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_actions</H1> -<P> -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. -</P> -<H2>Summary</H2> -<P> -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. -</P> -<H2>Directives</H2> -<UL> -<LI><A HREF="#action">Action</A> -<LI><A HREF="#script">Script</A> -</UL> - -<HR> - -<H2><A NAME="action">Action directive</A></H2> -<P> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Action <EM>action-type cgi-script</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_actions<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Action is only available in Apache 1.1 -and later -</P> -<P> -This directive adds an action, which will activate <EM>cgi-script</EM> when -<EM>action-type</EM> is triggered by the request. The <EM>action-type</EM> can -be either a <A HREF="../handler.html">handler</A> or a MIME content type. It -sends the URL and file path of the requested document using the standard CGI -PATH_INFO and PATH_TRANSLATED environment variables. -</P> -<HR> - -<H2><A NAME="script">Script directive</A></H2> -<P> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Script <EM>method cgi-script</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_actions<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> 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> -<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 (<EM>e.g.</EM>, foo.html?hi). Otherwise, the request -will proceed normally. -</P> -<P> -Examples: -</P> -<PRE> - Script GET /cgi-bin/search #<EM>e.g.</EM> for <ISINDEX>-style searching - Script PUT /~bob/put.cgi -</PRE> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_alias.html b/docs/manual/mod/mod_alias.html deleted file mode 100644 index a6116b851e..0000000000 --- a/docs/manual/mod/mod_alias.html +++ /dev/null @@ -1,404 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_alias</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> - -<H1 ALIGN="CENTER">Module mod_alias</H1> -<P> -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. -</P> - -<H2>Directives</H2> -<UL> -<LI><A HREF="#alias">Alias</A> -<LI><A HREF="#aliasmatch">AliasMatch</A> -<LI><A HREF="#redirect">Redirect</A> -<LI><A HREF="#redirectmatch">RedirectMatch</A> -<LI><A HREF="#redirecttemp">RedirectTemp</A> -<LI><A HREF="#redirectperm">RedirectPermanent</A> -<LI><A HREF="#scriptalias">ScriptAlias</A> -<LI><A HREF="#scriptaliasmatch">ScriptAliasMatch</A> -</UL> -<HR> - - -<H2><A NAME="alias">Alias directive</A></H2> -<P> -<!--%plaintext <?INDEX {\tt Alias} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Alias <EM>url-path directory-filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_alias -</P> -<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>. -<P> -Example: -</P> -<BLOCKQUOTE><CODE>Alias /image /ftp/pub/image</CODE></BLOCKQUOTE> -<P> -A request for http://myserver/image/foo.gif would cause the server to -return the file /ftp/pub/image/foo.gif. -</P> -<P> -Note that if you include a trailing / on the <EM>url-path</EM> then the -server will require a trailing / in order to expand the alias. That is, -if you use <CODE>Alias /icons/ /usr/local/apache/icons/</CODE> then -the url <CODE>/icons</CODE> will not be aliased. -</P> -<P> -Note that you may need to specify additional -<A HREF="core.html#directory"><CODE><Directory></CODE></A> sections -which cover the <EM>destination</EM> of aliases. Aliasing occurs -before <CODE><Directory></CODE> sections are checked, so only -the destination of aliases are affected. (Note however -<A HREF="core.html#location"><CODE><Location></CODE></A> -sections are run through once before aliases are performed, so they -will apply.) -<P> -See also <A HREF="#scriptalias">ScriptAlias</A>. -</P> -<HR> - -<H2><A NAME="aliasmatch">AliasMatch</A></H2> -<P> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AliasMatch <EM>regex directory-filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_alias<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Available in Apache 1.3 and later -</P> - -<P>This directive is equivalent to <A HREF="#alias">Alias</A>, but -makes use of standard regular expressions, instead of simple prefix -matching. The supplied regular expression is matched against the URL, -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 <CODE>/icons</CODE> directory, one might use: -<PRE> - AliasMatch ^/icons(.*) /usr/local/apache/icons$1 -</PRE> -</P> - -<HR> - -<H2><A NAME="redirect">Redirect directive</A></H2> -<P> -<!--%plaintext <?INDEX {\tt Redirect} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Redirect [ <EM>status</EM> ] - <EM>url-path url</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_alias<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> The directory and .htaccess context's -are only available in versions 1.1 and later. The <EM>status</EM> -argument is only available in Apache 1.2 or later. -</P> -<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>. -</P> -<P> -Example: -</P> -<BLOCKQUOTE><CODE>Redirect /service -http://foo2.bar.com/service</CODE></BLOCKQUOTE> -<P> -If the client requests http://myserver/service/foo.txt, it will be told to -access http://foo2.bar.com/service/foo.txt instead. -</P> -<P> -<STRONG>Note:</STRONG> Redirect directives take precedence over Alias -and ScriptAlias -directives, irrespective of their ordering in the configuration file. Also, -<EM>Url-path</EM> must be an absolute path, not a relative path, even -when used with .htaccess files or inside of <Directory> sections. -</P> -<P> -If no <EM>status</EM> argument is given, the redirect will be -"temporary" (HTTP status 302). This indicates to the client that the -resources is has moved temporarily. The <EM>status</EM> -argument can be used to return other HTTP status codes: -<P> -<DL> -<DT>permanent -<DD>Returns a permanent redirect status (301) indicating that -the resource has moved permanently. -<DT>temp -<DD>Returns a temporary redirect status (302). This is the -default. -<DT>seeother -<DD>Returns a "See Other" status (303) indicating that -the resource has been replaced. -<DT>gone -<DD>Returns a "Gone" status (410) indicating that the resource -has been permanently removed. When this status is used the <EM>url</EM> -argument should be omitted. -</DL> -<P> -Other status codes can be returned by giving the numeric status code -as the value of <EM>status</EM>. If the status is between 300 and 399, -the <EM>url</EM> argument must be present, otherwise it must be -omitted. Note that the status must be known to the Apache code (see -the function <CODE>send_error_response</CODE> in http_protocol.c). -</P> -<HR> - -<H2><A NAME="redirectmatch">RedirectMatch</A></H2> -<P> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> - RedirectMatch [<EM>status</EM>] <EM>regex url</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_alias<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Available in Apache 1.3 and later -</P> - -<P>This directive is equivalent to <A HREF="#alias">Redirect</A>, but -makes use of standard regular expressions, instead of simple prefix -matching. The supplied regular expression is matched against the URL, -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: -<PRE> - RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg -</PRE> -</P> - -<HR> - -<H2><A NAME="redirecttemp">RedirectTemp directive</A></H2> -<P> -<!--%plaintext <?INDEX {\tt Redirect} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> RedirectTemp <EM>url-path url</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_alias<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> This directive is only available in 1.2 -</P> -<P> -This directive makes the client know that the Redirect is only -temporary (status 302). Exactly equivalent to <CODE>Redirect -temp</CODE>. -</P> -<HR> - -<H2><A NAME="redirectperm">RedirectPermanent directive</A></H2> -<P> -<!--%plaintext <?INDEX {\tt Redirect} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> RedirectPermanent <EM>url-path url</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_alias<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> This directive is only available in 1.2 -</P> -<P> -This directive makes the client know that the Redirect is permanent -(status 301). Exactly equivalent to <CODE>Redirect permanent</CODE>. -</P> -<HR> - -<H2><A NAME="scriptalias">ScriptAlias directive</A></H2> -<P> -<!--%plaintext <?INDEX {\tt ScriptAlias} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ScriptAlias <EM>url-path directory-filename</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_alias -</P> -<P> -The ScriptAlias directive has the same behavior 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>. -<P> -Example: -</P> -<BLOCKQUOTE><CODE>ScriptAlias /cgi-bin/ /web/cgi-bin/</CODE></BLOCKQUOTE> -<P> -A request for http://myserver/cgi-bin/foo would cause the server to -run the script /web/cgi-bin/foo. -</P> - -<HR> - -<H2><A NAME="scriptaliasmatch">ScriptAliasMatch</A></H2> -<P> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ScriptAliasMatch - <EM>regex directory-filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_alias<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Available in Apache 1.3 and later -</P> - -<P>This directive is equivalent to <A HREF="#scriptalias">ScriptAlias</A>, but -makes use of standard regular expressions, instead of simple prefix -matching. The supplied regular expression is matched against the URL, -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 <CODE>/cgi-bin</CODE>, one might use: -<PRE> - ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -</PRE> -</P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_asis.html b/docs/manual/mod/mod_asis.html deleted file mode 100644 index 3ca8e7e906..0000000000 --- a/docs/manual/mod/mod_asis.html +++ /dev/null @@ -1,68 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_asis</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> - -<H1 ALIGN="CENTER">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 <?INDEX {\tt httpd/send-as-is} mime type> --> - -<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> <EM>e.g.</EM> -<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: 301 Now where did I leave that URL <BR> -Location: http://xyz.abc.com/foo/bar.html <BR> -Content-type: text/html <BR> -<BR> -<HTML> <BR> -<HEAD> <BR> -<TITLE>Lame excuses'R'us</TITLE> <BR> -</HEAD> <BR> -<BODY> <BR> -<H1>Fred's exceptionally wonderful page has moved to <BR> -<A HREF="http://xyz.abc.com/foo/bar.html">Joe's</A> site. <BR> -</H1> <BR> -</BODY> <BR> -</HTML> -</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> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_auth.html b/docs/manual/mod/mod_auth.html deleted file mode 100644 index e81babc5e1..0000000000 --- a/docs/manual/mod/mod_auth.html +++ /dev/null @@ -1,201 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_auth</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> - -<H1 ALIGN="CENTER">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. - - -<MENU> -<LI><A HREF="#authgroupfile">AuthGroupFile</A> -<LI><A HREF="#authuserfile">AuthUserFile</A> -<LI><A HREF="#authauthoritative">AuthAuthoritative</A> -</MENU> -<HR> - - -<H2><A NAME="authgroupfile">AuthGroupFile</A></H2> -<!--%plaintext <?INDEX {\tt AuthGroupFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthGroupFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> 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 path -to the group file. If it is not absolute (<EM>i.e.</EM>, if it -doesn't begin with a slash), it is treated as relative to the ServerRoot. -<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 text 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 web-server; 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> - -<H2><A NAME="authuserfile">AuthUserFile</A></H2> -<!--%plaintext <?INDEX {\tt AuthUserFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthUserFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> 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 path to the user -file. If it is not absolute (<EM>i.e.</EM>, if it doesn't begin with a -slash), it is treated as relative to the ServerRoot. -<P> 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. -<P> Note that -searching large text files is <EM>very</EM> 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 web-server; 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> -<HR> -<H2><A NAME="authauthoritative">AuthAuthoritative</A></H2> -<!--%plaintext <?INDEX {\tt AuthAuthoritative} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthAuthoritative < - <STRONG> on</STRONG>(default) | off > <BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth<P> - -Setting the AuthAuthoritative directive explicitly to <STRONG>'off'</STRONG> -allows for both authentication and authorization to be passed on to -lower level modules (as defined in the <CODE>Configuration</CODE> and -<CODE>modules.c</CODE> files) if there is <STRONG>no userID</STRONG> or -<STRONG>rule</STRONG> 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. - -<P> - -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. - -<P> - -A common use for this is in conjunction with one of the database -modules; such as <A -HREF="mod_auth_db.html"><CODE>mod_auth_db.c</CODE></A>, <A -HREF="mod_auth_dbm.html"><CODE>mod_auth_dbm.c</CODE></A>, -<CODE>mod_auth_msql.c</CODE>, and <A -HREF="mod_auth_anon.html"><CODE>mod_auth_anon.c</CODE></A>. 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. - -<P> - -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> 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. - -<P> - -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 <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> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_auth_anon.html b/docs/manual/mod/mod_auth_anon.html deleted file mode 100644 index bbf6ce5357..0000000000 --- a/docs/manual/mod/mod_auth_anon.html +++ /dev/null @@ -1,363 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_auth_anon.c</TITLE> -</HEAD> -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_auth_anon</H1> - -This module is contained in the <CODE>mod_auth_anon.c</CODE> file and -is not compiled in by default. It is only available in Apache 1.1 and -later. It allows "anonymous" user access to authenticated areas. - -<H2>Summary</H2> - -It does access control in a manner similar to anonymous-ftp sites; <EM>i.e.</EM> -have a 'magic' user id 'anonymous' and the email address as a password. -These email addresses can be logged. -<P> -Combined with other (database) access control methods, this allows for -effective user tracking and customization according to a user profile -while still keeping the site open for 'unregistered' users. One advantage -of using Auth-based user tracking is that, unlike magic-cookies and -funny URL pre/postfixes, it is completely browser independent and it -allows users to share URLs. -<P> - -<A HREF="#Directives">Directives</A> / -<A HREF="#Example">Example</A> / -<A HREF="#CompileTimeOptions">Compile time options</A> / -<A HREF="#RevisionHistory">RevisionHistory</A> / -<A HREF="#Person">Person to blame</A> / -<A HREF="#Sourcecode">Sourcecode</A> -<P> - -<H2><A NAME="Directives">Directives</A></H2> -<UL> -<LI><A HREF="#anonymous">Anonymous</A> -<LI><A HREF="#Authoritative">Anonymous_Authoritative</A> -<LI><A HREF="#LogEmail">Anonymous_LogEmail</A> -<LI><A HREF="#MustGiveEmail">Anonymous_MustGiveEmail</A> -<LI><A HREF="#NoUserID">Anonymous_NoUserID</A> -<LI><A HREF="#VerifyEmail">Anonymous_VerifyEmail</A> -</UL> - -<HR> - -<H2><A NAME="anonymous">Anonymous directive</A></H2> -<!--%plaintext <?INDEX {\tt Anonymous} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Anonymous <EM>user user ...</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> none<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_anon<P> - - A list of one or more 'magic' userIDs which are allowed access - without password verification. The userIDs are space separated. - It is possible to use the ' and " quotes to allow a space in - a userID as well as the \ escape character. - <P> - Please note that the comparison is <STRONG>case-IN-sensitive</STRONG>. - <BR> - I strongly suggest that the magic username '<CODE>anonymous</CODE>' - is always one of the allowed userIDs. - <P> - Example:<BR> - <CODE> - Anonymous anonymous "Not Registered" 'I don\'t know' - </CODE><P> - This would allow the user to enter without password verification - by using the userId's 'anonymous', 'AnonyMous','Not Registered' and - 'I Don't Know'. -<HR> - -<H2><A NAME="Authoritative">Anonymous_Authoritative directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Anonymous_Authoritative <EM>on | off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>Anonymous_Authoritative off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_anon<P> - - When set 'on', there is no - fall-through to other authorization methods. So if a - userID does not match the values specified in the - <CODE>Anonymous</CODE> directive, access is denied. - <P> - Be sure you know what you are doing when you decide to switch - it on. And remember that it is the linking order of the modules - (in the Configuration / Make file) which details the order - in which the Authorization modules are queried. -<HR> - -<H2><A NAME="LogEmail">Anonymous_LogEmail directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Anonymous_LogEmail <EM>on | off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>Anonymous_LogEmail on</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_anon<P> - - When set 'on', the default, the 'password' entered (which hopefully - contains a sensible email address) is logged in the error log. -<HR> - -<H2><A NAME="MustGiveEmail">Anonymous_MustGiveEmail directive</A></H2> -<!--%plaintext <?INDEX {\tt Anonymous_MustGiveEmail} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Anonymous_MustGiveEmail <EM>on</EM> - | <EM>off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>Anonymous_MustGiveEmail on</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_anon<P> - - Specifies whether the user must specify an email - address as the password. This prohibits blank passwords. -<HR> - -<H2><A NAME="NoUserID">Anonymous_NoUserID directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Anonymous_NoUserID <EM>on | off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>Anonymous_NoUserID off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_anon<P> - - When set 'on', users can leave - the userID (and perhaps the password field) empty. This - can be very convenient for MS-Explorer users who can - just hit return or click directly on the OK button; which - seems a natural reaction. - -<HR> - -<H2><A NAME="VerifyEmail">Anonymous_VerifyEmail directive</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Anonymous_VerifyEmail <EM>on | off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>Anonymous_VerifyEmail off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_anon<P> - - When set 'on' the 'password' entered is - checked for at least one '@' and a '.' to encourage users to enter - valid email addresses (see the above <CODE>Auth_LogEmail</CODE>). - -<HR> -<H2><A NAME="Example">Example</A></H2> - -The example below (when combined with the Auth directives -of a htpasswd-file based (or GDM, mSQL <EM>etc.</EM>) base access -control system allows users in as 'guests' with the -following properties: -<UL> -<LI> -It insists that the user enters a userId. (<CODE>Anonymous_NoUserId</CODE>) -<LI> -It insists that the user enters a password. -(<CODE>Anonymous_MustGiveEmail</CODE>) -<LI> -The password entered must be a valid email address, ie. contain at least one -'@' and a '.'. (<CODE>Anonymous_VerifyEmail</CODE>) -<LI> -The userID must be one of <CODE>anonymous guest www test welcome</CODE> -and comparison is <STRONG>not</STRONG> case sensitive. -<LI> -And the Email addresses entered in the passwd field are logged to -the error log file -(<CODE>Anonymous_LogEmail</CODE>) -</UL> -<P> -Excerpt of access.conf: -<BLOCKQUOTE><CODE> -Anonymous_NoUserId off<BR> -Anonymous_MustGiveEmail on<BR> -Anonymous_VerifyEmail on<BR> -Anonymous_LogEmail on<BR> -Anonymous anonymous guest www test welcome<P> -<P> -AuthName "Use 'anonymous' & Email address for guest entry"<BR> -AuthType basic -<P> -# An AuthUserFile/AuthDBUserFile/AuthDBMUserFile<BR> -# directive must be specified, or use<BR> -# Anonymous_Authoritative for public access.<BR> -# In the .htaccess for the public directory, add:<BR> -<Files *><BR> -order deny,allow <BR> -allow from all <BR> -<P> -require valid-user <BR> -</Files><BR> -</CODE></BLOCKQUOTE> - - -<HR> -<H2><A NAME="CompileTimeOptions">Compile Time Options</A></H2> - -Currently there are no Compile options. - -<HR> -<H2><A NAME="RevisionHistory">Revision History</A></H2> - -This version: 23 Nov 1995, 24 Feb 1996, 16 May 1996. - -<DL> - -<DT>Version 0.4<BR></DT> - <DD>First release - </DD> -<DT>Version 0.5<BR></DT> - <DD>Added 'VerifyEmail' and 'LogEmail' options. Multiple - 'anonymous' tokens allowed. more docs. Added Authoritative - functionality. - </DD> -</DL> - - -<HR> -<H2><A NAME="Person">Contact/person to blame</A></H2> - -This module was written for the -<A HREF="http://ewse.ceo.org">European Wide Service Exchange</A> by -<<A - HREF="mailto:Dirk.vanGulik@jrc.it" - ><CODE>Dirk.vanGulik@jrc.it</CODE></A>>. -Feel free to contact me if you have any problems, ice-creams or bugs. This -documentation, courtesy of Nick Himba, <A HREF="mailto:himba@cs.utwente.nl"> -<CODE><himba@cs.utwente.nl></CODE></A>. -<P> - - -<HR> -<H2><A NAME="Sourcecode">Sourcecode</A></H2> - -The source code can be found at <A HREF="http://www.apache.org"><CODE> -http://www.apache.org</CODE></A>. A snapshot of a development version -usually resides at <A HREF="http://me-www.jrc.it/~dirkx/mod_auth_anon.c"><CODE> -http://me-www.jrc.it/~dirkx/mod_auth_anon.c</CODE></A>. Please make sure -that you always quote the version you use when filing a bug report. -<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_auth_db.html b/docs/manual/mod/mod_auth_db.html deleted file mode 100644 index 2df31ba261..0000000000 --- a/docs/manual/mod/mod_auth_db.html +++ /dev/null @@ -1,220 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_auth_db</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_auth_db</H1> - -This module is contained in the <CODE>mod_auth_db.c</CODE> file, and -is not compiled in by default. It provides for user authentication using -Berkeley DB files. It is an alternative to <A HREF="mod_auth_dbm.html">DBM</A> -files for those systems which support DB and not DBM. It is only -available in Apache 1.1 and later. - -<P> -On some BSD systems (<EM>e.g.</EM>, FreeBSD and NetBSD) dbm is automatically mapped to -Berkeley DB. You can use either <A HREF="mod_auth_dbm.html">mod_auth_dbm</A> -or mod_auth_db. The latter makes it more obvious that it's Berkeley DB. On -other platforms where you want to use the DB library you usually have to -install it first. See -<A HREF="http://www.sleepycat.com/">http://www.sleepycat.com/</A> for the -distribution. The interface this module uses is the one from DB version 1.85 -and 1.86, but DB version 2.x can also be used when compatibility mode is -enabled. - -<MENU> -<LI><A HREF="#authdbgroupfile">AuthDBGroupFile</A> -<LI><A HREF="#authdbuserfile">AuthDBUserFile</A> -<LI><A HREF="#authdbauthoritative">AuthDBAuthoritative</A> -</MENU> -<HR> - - -<H2><A NAME="authdbgroupfile">AuthDBGroupFile</A></H2> -<!--%plaintext <?INDEX {\tt AuthDBGroupFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthDBGroupFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_db<P> - -The AuthDBGroupFile directive sets the name of a DB file containing the list -of user groups for user authentication. <EM>Filename</EM> is the absolute path -to the group file.<P> - -The group file is keyed on the username. The value for a user is a -comma-separated list of the groups to which the users belongs. There must -be no whitespace within the value, and it must never contain any colons.<P> - -Security: make sure that the AuthDBGroupFile is stored outside the -document tree of the web-server; do <EM>not</EM> put it in the directory that -it protects. Otherwise, clients will be able to download the -AuthDBGroupFile unless otherwise protected.<P> - -Combining Group and Password DB files: In some cases it is easier to -manage a single database which contains both the password and group -details for each user. This simplifies any support programs that need -to be written: they now only have to deal with writing to and locking -a single DBM file. This can be accomplished by first setting the group -and password files to point to the same DB file:<P> - -<BLOCKQUOTE><CODE> -AuthDBGroupFile /www/userbase<BR> -AuthDBUserFile /www/userbase -</CODE></BLOCKQUOTE> - -The key for the single DB record is the username. The value consists of <P> - -<BLOCKQUOTE><CODE> -Unix Crypt-ed Password : List of Groups [ : (ignored) ] -</CODE></BLOCKQUOTE> - -The password section contains the Unix crypt() password as before. This is -followed by a colon and the comma separated list of groups. Other data may -optionally be left in the DB file after another colon; it is ignored by the -authentication module. <P> - -See also <A HREF="core.html#authname">AuthName</A>, -<A HREF="core.html#authtype">AuthType</A> and -<A HREF="#authdbuserfile">AuthDBUserFile</A>.<P><HR> - -<H2><A NAME="authdbuserfile">AuthDBUserFile</A></H2> -<!--%plaintext <?INDEX {\tt AuthDBUserFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthDBUserFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_db<P> - -The AuthDBUserFile directive sets the name of a DB file containing the list -of users and passwords for user authentication. <EM>Filename</EM> is the -absolute path to the user file.<P> - -The user file is keyed on the username. The value for a user is the -crypt() encrypted password, optionally followed by a colon and -arbitrary data. The colon and the data following it will be ignored -by the server.<P> - -Security: make sure that the AuthDBUserFile is stored outside the -document tree of the web-server; do <EM>not</EM> put it in the directory that -it protects. Otherwise, clients will be able to download the -AuthDBUserFile.<P> - -Important compatibility note: The implementation of "dbmopen" in the -apache modules reads the string length of the hashed values from the -DB data structures, rather than relying upon the string being -NULL-appended. Some applications, such as the Netscape web server, -rely upon the string being NULL-appended, so if you are having trouble -using DB files interchangeably between applications this may be a -part of the problem. <P> - -See also <A HREF="core.html#authname">AuthName</A>, -<A HREF="core.html#authtype">AuthType</A> and -<A HREF="#authdbgroupfile">AuthDBGroupFile</A>.<P> -<HR> -<H2><A NAME="authdbauthoritative">AuthDBAuthoritative</A></H2> -<!--%plaintext <?INDEX {\tt AuthDBAuthoritative} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthDBAuthoritative < - <STRONG> on</STRONG>(default) | off > <BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth<P> - -Setting the AuthDBAuthoritative directive explicitly to <STRONG>'off'</STRONG> -allows for both authentication and authorization to be passed on -to lower level modules (as defined in the <CODE>Configuration</CODE> -and <CODE>modules.c</CODE> file if there is <STRONG>no userID</STRONG> or -<STRONG>rule</STRONG> 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. -<P> -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. <P> - -A common use for this is in conjunction with one of the basic auth -modules; such as <A HREF="mod_auth.html"><CODE>mod_auth.c</CODE></A>. -Whereas this DB module supplies the bulk of the user credential -checking; a few (administrator) related accesses fall through to -a lower level with a well protected .htpasswd file. <P> - -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> 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. <P> -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 which might have -more access interfaces. - -<P> -See also <A HREF="core.html#authname">AuthName</A>, -<A HREF="core.html#authtype">AuthType</A> and -<A HREF="#authdbgroupfile">AuthDBGroupFile</A>.<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_auth_dbm.html b/docs/manual/mod/mod_auth_dbm.html deleted file mode 100644 index 36218ef8ee..0000000000 --- a/docs/manual/mod/mod_auth_dbm.html +++ /dev/null @@ -1,210 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_auth_dbm</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> - -<H1 ALIGN="CENTER">Module mod_auth_dbm</H1> - -This module is contained in the <CODE>mod_auth_dbm.c</CODE> file, and -is not compiled in by default. It provides for user authentication using -DBM files. - - -<MENU> -<LI><A HREF="#authdbmgroupfile">AuthDBMGroupFile</A> -<LI><A HREF="#authdbmuserfile">AuthDBMUserFile</A> -<LI><A HREF="#authdbmauthoritative">AuthDBMAuthoritative</A> -</MENU> -<HR> - - -<H2><A NAME="authdbmgroupfile">AuthDBMGroupFile</A></H2> -<!--%plaintext <?INDEX {\tt AuthDBMGroupFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthDBMGroupFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_dbm<P> - -The AuthDBMGroupFile directive sets the name of a DBM file containing the list -of user groups for user authentication. <EM>Filename</EM> is the absolute path -to the group file.<P> - -The group file is keyed on the username. The value for a user is a -comma-separated list of the groups to which the users belongs. There must -be no whitespace within the value, and it must never contain any colons.<P> - -Security: make sure that the AuthDBMGroupFile is stored outside the -document tree of the web-server; do <EM>not</EM> put it in the directory that -it protects. Otherwise, clients will be able to download the -AuthDBMGroupFile unless otherwise protected.<P> - -Combining Group and Password DBM files: In some cases it is easier to -manage a single database which contains both the password and group -details for each user. This simplifies any support programs that need -to be written: they now only have to deal with writing to and locking -a single DBM file. This can be accomplished by first setting the group -and password files to point to the same DBM:<P> - -<BLOCKQUOTE><CODE> -AuthDBMGroupFile /www/userbase<BR> -AuthDBMUserFile /www/userbase -</CODE></BLOCKQUOTE> - -The key for the single DBM is the username. The value consists of <P> - -<BLOCKQUOTE><CODE> -Unix Crypt-ed Password : List of Groups [ : (ignored) ] -</CODE></BLOCKQUOTE> - -The password section contains the Unix crypt() password as before. This is -followed by a colon and the comma separated list of groups. Other data may -optionally be left in the DBM file after another colon; it is ignored by the -authentication module. This is what www.telescope.org uses for its combined -password and group database. <P> - -See also <A HREF="core.html#authname">AuthName</A>, -<A HREF="core.html#authtype">AuthType</A> and -<A HREF="#authdbmuserfile">AuthDBMUserFile</A>.<P><HR> - -<H2><A NAME="authdbmuserfile">AuthDBMUserFile</A></H2> -<!--%plaintext <?INDEX {\tt AuthDBMUserFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthDBMUserFile <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth_dbm<P> - -The AuthDBMUserFile directive sets the name of a DBM file containing the list -of users and passwords for user authentication. <EM>Filename</EM> is the -absolute path to the user file.<P> - -The user file is keyed on the username. The value for a user is the -crypt() encrypted password, optionally followed by a colon and -arbitrary data. The colon and the data following it will be ignored -by the server.<P> - -Security: make sure that the AuthDBMUserFile is stored outside the -document tree of the web-server; do <EM>not</EM> put it in the directory that -it protects. Otherwise, clients will be able to download the -AuthDBMUserFile.<P> - -Important compatibility note: The implementation of "dbmopen" in the -apache modules reads the string length of the hashed values from the -DBM data structures, rather than relying upon the string being -NULL-appended. Some applications, such as the Netscape web server, -rely upon the string being NULL-appended, so if you are having trouble -using DBM files interchangeably between applications this may be a -part of the problem. <P> - -See also <A HREF="core.html#authname">AuthName</A>, -<A HREF="core.html#authtype">AuthType</A> and -<A HREF="#authdbmgroupfile">AuthDBMGroupFile</A>.<P> - -<HR> -<H2><A NAME="authdbmauthoritative">AuthDBMAuthoritative</A></H2> -<!--%plaintext <?INDEX {\tt AuthDBMAuthoritative} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AuthDBMAuthoritative < <STRONG> on</STRONG>(default) | off > <BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> AuthConfig<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_auth<P> - -Setting the AuthDBMAuthoritative directive explicitly to <STRONG>'off'</STRONG> -allows for both authentication and authorization to be passed on -to lower level modules (as defined in the <CODE>Configuration</CODE> -and <CODE>modules.c</CODE> file if there is <STRONG>no userID</STRONG> or -<STRONG>rule</STRONG> 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. -<P> -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. <P> - -A common use for this is in conjunction with one of the basic auth -modules; such as <A HREF="mod_auth.html"><CODE>mod_auth.c</CODE></A>. -Whereas this DBM module supplies the bulk of the user credential -checking; a few (administrator) related accesses fall through to -a lower level with a well protected .htpasswd file. <P> - -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> 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. <P> - -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 which might have -more access interfaces. - -<P> -See also <A HREF="core.html#authname">AuthName</A>, -<A HREF="core.html#authtype">AuthType</A> and -<A HREF="#authdbmgroupfile">AuthDBMGroupFile</A>.<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_autoindex.html b/docs/manual/mod/mod_autoindex.html deleted file mode 100644 index 7fedd69c48..0000000000 --- a/docs/manual/mod/mod_autoindex.html +++ /dev/null @@ -1,814 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_autoindex</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_autoindex</H1> - -This module is contained in the <CODE>mod_autoindex.c</CODE> file, and -is compiled in by default. It provides for automatic directory indexing. - -<H2>Summary</H2> -The index of a directory can come from one of two sources: -<UL> -<LI>A file written by the user, typically called <CODE>index.html</CODE>. -The <A HREF="mod_dir.html#directoryindex">DirectoryIndex</A> directive sets -the name of this file. -This is controlled by <A HREF="mod_dir.html"><CODE>mod_dir</CODE></A>. -<LI>Otherwise, a listing generated by the server. The other directives -control the format of this listing. The <A HREF="#addicon">AddIcon</A>, -<A HREF="#addiconbyencoding">AddIconByEncoding</A> and -<A HREF="#addiconbytype">AddIconByType</A> are used to set a list of -icons to display for various file types; for each file listed, the -first icon listed that matches the file is displayed. These -are controlled by <CODE>mod_autoindex</CODE>. -</UL> -The two functions are separated so that you can completely remove -(or replace) automatic index generation should you want to. -<P> -If -<A - HREF="#fancyindexing" -><SAMP>FancyIndexing</SAMP></A> -is enabled, or the <SAMP>FancyIndexing</SAMP> keyword is present on the -<A - HREF="#indexoptions" -><SAMP>IndexOptions</SAMP></A> -directive, the column headers are links that control the -order of the display. If you select a header link, the -listing will be regenerated, sorted by the values in that -column. Selecting the same header repeatedly toggles -between ascending and descending order. -</P> -<P> -Note that when the display is sorted by "Size", -it's the <EM>actual</EM> size of the files that's used, -not the displayed value - so a 1010-byte file will -always be displayed before a 1011-byte file (if in ascending -order) even though they both are shown as "1K". -</P> - - -<H2>Directives</H2> - -<MENU> -<LI><A HREF="#addalt">AddAlt</A> -<LI><A HREF="#addaltbyencoding">AddAltByEncoding</A> -<LI><A HREF="#addaltbytype">AddAltByType</A> -<LI><A HREF="#adddescription">AddDescription</A> -<LI><A HREF="#addicon">AddIcon</A> -<LI><A HREF="#addiconbyencoding">AddIconByEncoding</A> -<LI><A HREF="#addiconbytype">AddIconByType</A> -<LI><A HREF="#defaulticon">DefaultIcon</A> -<LI><A HREF="#fancyindexing">FancyIndexing</A> -<LI><A HREF="#headername">HeaderName</A> -<LI><A HREF="#indexignore">IndexIgnore</A> -<LI><A HREF="#indexoptions">IndexOptions</A> -<LI><A HREF="#indexorderdefault">IndexOrderDefault</A> -<LI><A HREF="#readmename">ReadmeName</A> -</MENU> -<HR> - -<H2><A NAME="addalt">AddAlt</A></H2> -<!--%plaintext <?INDEX {\tt AddAlt} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddAlt <EM>string file file...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -This sets the alternate text to display for a file, instead of an icon, for -<A HREF="#fancyindexing">FancyIndexing</A>. <EM>File</EM> is a file -extension, partial filename, wild-card expression or full filename for files -to describe. <EM>String</EM> is enclosed in double quotes -(<CODE>"</CODE>). This alternate text is displayed if the client is -image-incapable or has image loading disabled. - -<HR> -<H2><A NAME="addaltbyencoding">AddAltByEncoding</A></H2> -<!--%plaintext <?INDEX {\tt AddAltByEncoding} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddAltByEncoding <EM>string MIME-encoding - MIME-encoding...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -This sets the alternate text to display for a file, instead of an icon, for -<A HREF="#fancyindexing">FancyIndexing</A>. <EM>MIME-encoding</EM> is a -valid content-encoding, such as <SAMP>x-compress</SAMP>. -<EM>String</EM> is enclosed in double quotes -(<CODE>"</CODE>). This alternate text is displayed if the client is -image-incapable or has image loading disabled. - -<HR> -<H2><A NAME="addaltbytype">AddAltByType</A></H2> -<!--%plaintext <?INDEX {\tt AddAltByType} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddAltByType <EM>string MIME-type MIME-type - ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -This sets the alternate text to display for a file, instead of an icon, for -<A HREF="#fancyindexing">FancyIndexing</A>. <EM>MIME-type</EM> is a -valid content-type, such as <SAMP>text/html</SAMP>. -<EM>String</EM> is enclosed in double quotes -(<CODE>"</CODE>). This alternate text is displayed if the client is -image-incapable or has image loading disabled. - -<HR> - -<H2><A NAME="adddescription">AddDescription</A></H2> -<!--%plaintext <?INDEX {\tt AddDescription} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddDescription <EM>string file file...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -This sets the description to display for a file, for -<A HREF="#fancyindexing">FancyIndexing</A>. <EM>File</EM> is a file -extension, partial filename, wild-card expression or full filename for files -to describe. <EM>String</EM> is enclosed in double quotes -(<CODE>"</CODE>). Example: -<BLOCKQUOTE><CODE>AddDescription "The planet Mars" /web/pics/mars.gif -</CODE></BLOCKQUOTE> -<P> -The description field is 23 bytes wide. 7 more bytes may be -added if the directory is covered by an -<CODE>IndexOptions SuppressSize</CODE>, and 19 bytes may be -added if <CODE>IndexOptions SuppressLastModified</CODE> is -in effect. The widest this column can be is therefore 49 bytes. -</P> -<HR> - -<H2><A NAME="addicon">AddIcon</A></H2> -<!--%plaintext <?INDEX {\tt AddIcon} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddIcon <EM>icon name name ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -This sets the icon to display next to a file ending in <EM>name</EM> for -<A HREF="#fancyindexing">FancyIndexing</A>. <EM>Icon</EM> is either a -(%-escaped) relative URL to the icon, or of the format -(<EM>alttext</EM>,<EM>url</EM>) where <EM>alttext</EM> is the text tag given -for an icon for non-graphical browsers.<P> - -<EM>Name</EM> is either ^^DIRECTORY^^ for directories, ^^BLANKICON^^ for -blank lines (to format the list correctly), a file extension, a wildcard -expression, a partial filename or a complete filename. Examples: -<BLOCKQUOTE><CODE> -AddIcon (IMG,/icons/image.xbm) .gif .jpg .xbm <BR> -AddIcon /icons/dir.xbm ^^DIRECTORY^^ <BR> -AddIcon /icons/backup.xbm *~ -</CODE></BLOCKQUOTE> -<A HREF="#addiconbytype">AddIconByType</A> should be used in preference to -AddIcon, when possible.<P><HR> - -<H2><A NAME="addiconbyencoding">AddIconByEncoding</A></H2> -<!--%plaintext <?INDEX {\tt AddIconByEncoding} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddIconByEncoding <EM>icon MIME-encoding - MIME-encoding ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -This sets the icon to display next to files with -<EM>MIME-encoding</EM> for <A HREF="#fancyindexing">FancyIndexing</A>. -<EM>Icon</EM> is either a (%-escaped) relative URL to the icon, or of the -format (<EM>alttext</EM>,<EM>url</EM>) where <EM>alttext</EM> is the text tag -given for an icon for non-graphical browsers.<P> - -<EM>Mime-encoding</EM> is a wildcard expression matching required the -content-encoding. Examples: -<BLOCKQUOTE><CODE> -AddIconByEncoding /icons/compress.xbm x-compress -</CODE></BLOCKQUOTE><P><HR> - -<H2><A NAME="addiconbytype">AddIconByType</A></H2> -<!--%plaintext <?INDEX {\tt AddIconByType} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddIconByType <EM>icon MIME-type MIME-type - ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -This sets the icon to display next to files of type <EM>MIME-type</EM> for -<A HREF="#fancyindexing">FancyIndexing</A>. <EM>Icon</EM> is either a -(%-escaped) relative URL to the icon, or of the format -(<EM>alttext</EM>,<EM>url</EM>) where <EM>alttext</EM> is the text tag given -for an icon for non-graphical browsers.<P> -<EM>Mime-type</EM> is a wildcard expression matching required the mime types. -Examples: -<BLOCKQUOTE><CODE> -AddIconByType (IMG,/icons/image.xbm) image/* -</CODE></BLOCKQUOTE><P><HR> - -<H2><A NAME="defaulticon">DefaultIcon</A></H2> -<!--%plaintext <?INDEX {\tt DefaultIcon} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> DefaultIcon <EM>url</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -The DefaultIcon directive sets the icon to display for files when no -specific icon is known, for <A HREF="#fancyindexing">FancyIndexing</A>. -<EM>Url</EM> is a (%-escaped) relative URL to the icon. Examples: -<BLOCKQUOTE><CODE> -DefaultIcon /icon/unknown.xbm -</CODE></BLOCKQUOTE><P><HR> - -<H2><A NAME="fancyindexing">FancyIndexing</A></H2> -<!--%plaintext <?INDEX {\tt FancyIndexing} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> FancyIndexing <EM>boolean</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex -<P> -The FancyIndexing directive sets the FancyIndexing option for a directory. -<EM>Boolean</EM> can be <CODE>on</CODE> or <CODE>off</CODE>. The -<A HREF="#indexoptions">IndexOptions</A> directive should be used in -preference. -</P> -<BLOCKQUOTE> - <STRONG>Note that in versions of Apache prior to 1.3.2, the - <SAMP>FancyIndexing</SAMP> and - <SAMP>IndexOptions</SAMP> directives will override each other. You - should use <SAMP>IndexOptions FancyIndexing</SAMP> in preference - to the standalone <SAMP>FancyIndexing</SAMP> directive. - As of Apache 1.3.2, a standalone <SAMP>FancyIndexing</SAMP> directive - is combined with any <SAMP>IndexOptions</SAMP> directive already - specified for the current scope.</STRONG> -</BLOCKQUOTE> -<HR> - -<H2><A NAME="headername">HeaderName</A></H2> -<!--%plaintext <?INDEX {\tt HeaderName} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> HeaderName <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> some features only available after - 1.3.6; see text - -<P> -The HeaderName directive sets the name of the file that will be inserted -at the top of the index listing. <EM>Filename</EM> is the name of the file -to include. -</P> -<BLOCKQUOTE><STRONG>Apache 1.3.6 and earlier:</STRONG> -The module first attempts to include <EM>filename</EM><CODE>.html</CODE> -as an HTML document, otherwise it will try to include <EM>filename</EM> as -plain text. <EM>Filename</EM> is treated as a filesystem path relative -to the directory being indexed. In no case is SSI processing done. -Example: -<BLOCKQUOTE><CODE>HeaderName HEADER</CODE></BLOCKQUOTE> -when indexing the directory <CODE>/web</CODE>, the server will first look for -the HTML file <CODE>/web/HEADER.html</CODE> and include it if found, otherwise -it will include the plain text file <CODE>/web/HEADER</CODE>, if it exists. -</BLOCKQUOTE> -<BLOCKQUOTE><STRONG>Apache versions after 1.3.6:</STRONG> -<EM>Filename</EM> is treated as a URI path relative to the one used -to access the directory being indexed, and must resolve to a document -with a major content type of "<SAMP>text</SAMP>" (<EM>e.g.</EM>, -<SAMP>text/html</SAMP>, <SAMP>text/plain</SAMP>, <EM>etc.</EM>). -This means that <EM>filename</EM> may refer to a CGI script if the -script's actual file type (as opposed to its output) is marked as -<SAMP>text/html</SAMP> such as with a directive like: -<PRE> - AddType text/html .cgi -</PRE> -<A HREF="../content-negotiation.html">Content negotiation</A> -will be performed if the <SAMP>MultiViews</SAMP> -<A HREF="core.html#options">option</A> is enabled. -If <EM>filename</EM> resolves to a static <SAMP>text/html</SAMP> document -(not a CGI script) and the -<SAMP>Includes</SAMP> <A HREF="core.html#options">option</A> is enabled, -the file will be processed for server-side includes (see the -<A HREF="mod_include.html"><SAMP>mod_include</SAMP></A> documentation). -</BLOCKQUOTE> -<P> -See also <A HREF="#readmename">ReadmeName</A>. -<P><HR> - -<H2><A NAME="indexignore">IndexIgnore</A></H2> -<!--%plaintext <?INDEX {\tt IndexIgnore} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> IndexIgnore <EM>file file ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex<P> - -The IndexIgnore directive adds to the list of files to hide when listing -a directory. <EM>File</EM> is a file extension, partial filename, -wildcard expression or full filename for files to ignore. Multiple -IndexIgnore directives add to the list, rather than the replacing the list -of ignored files. By default, the list contains `<CODE>.</CODE>'. Example: -<BLOCKQUOTE><CODE> -IndexIgnore README .htaccess *~ -</CODE></BLOCKQUOTE><P><HR> - -<H2><A NAME="indexoptions">IndexOptions</A></H2> -<!--%plaintext <?INDEX {\tt IndexOptions} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> IndexOptions <EM>option option ...</EM> - (Apache 1.3.2 and earlier) -<BR> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> IndexOptions <EM>[+|-]option [+|-]option - ...</EM> - (Apache 1.3.3 and later) -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex -<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> '+/-' syntax and merging of multiple - <SAMP>IndexOptions</SAMP> directives is only available with - Apache 1.3.3 and later -<P> - -The IndexOptions directive specifies the behavior of the directory indexing. -<EM>Option</EM> can be one of -<DL> -<DT><A NAME="indexoptions:fancyindexing">FancyIndexing</A> -<DD><!--%plaintext <?INDEX {\tt FancyIndexing} index option> --> -This turns on fancy indexing of directories. -<BLOCKQUOTE> - <STRONG>Note that in versions of Apache prior to 1.3.2, the - <SAMP>FancyIndexing</SAMP> and - <SAMP>IndexOptions</SAMP> directives will override each other. You - should use <SAMP>IndexOptions FancyIndexing</SAMP> in preference - to the standalone <SAMP>FancyIndexing</SAMP> directive. - As of Apache 1.3.2, a standalone <SAMP>FancyIndexing</SAMP> directive - is combined with any <SAMP>IndexOptions</SAMP> directive already - specified for the current scope.</STRONG> -</BLOCKQUOTE> -<DT><A NAME="indexoptions:iconheight">IconHeight[=pixels] (<EM>Apache 1.3 and later</EM>)</A> -<DD> -<!--%plaintext <?INDEX {\tt IconHeight} index option> --> -Presence of this option, when used with IconWidth, will cause the server -to include <SAMP>HEIGHT</SAMP> and <SAMP>WIDTH</SAMP> attributes in the -<SAMP>IMG</SAMP> tag for the file icon. This allows browser to -precalculate the page layout without having to wait until all the -images have been loaded. If no value is given for the option, it -defaults to the standard height of the icons supplied with the Apache -software. -<DT><A NAME="indexoptions:iconsarelinks">IconsAreLinks</A> -<DD> -<!--%plaintext <?INDEX {\tt IconsAreLinks} index option> --> -This makes the icons part of the anchor for the filename, for -fancy indexing. -<DT><A NAME="indexoptions:iconwidth">IconWidth[=pixels] (<EM>Apache 1.3 and later</EM>)</A> -<DD> -<!--%plaintext <?INDEX {\tt IconWidth} index option> --> -Presence of this option, when used with IconHeight, will cause the server -to include <SAMP>HEIGHT</SAMP> and <SAMP>WIDTH</SAMP> attributes in the -<SAMP>IMG</SAMP> tag for the file icon. This allows browser to -precalculate the page layout without having to wait until all the -images have been loaded. If no value is given for the option, it -defaults to the standard width of the icons supplied with the Apache -software. -<DT><A NAME="indexoptions:namewidth">NameWidth=[<EM>n</EM> | *] (<EM>Apache 1.3.2 and later</EM>)</A> -<DD> -The NameWidth keyword allows you to specify the width of the -filename column in bytes. If the keyword value is '<SAMP>*</SAMP>', -then the column is automatically sized to the length of the longest -filename in the display. -<DT><A NAME="indexoptions:scanhtmltitles">ScanHTMLTitles</A> -<DD><!--%plaintext <?INDEX {\tt ScanHTMLTitles} index option> --> -This enables the extraction of the title from HTML documents for fancy -indexing. If the file does not have a description given by -<A HREF="#adddescription">AddDescription</A> then httpd will read the -document for the value of the TITLE tag. This is CPU and disk intensive. -<DT><A NAME="indexoptions:suppresscolumnsorting">SuppressColumnSorting</A> -<DD> -<!--%plaintext <?INDEX {\tt SuppressColumnSorting} index option> --> -If specified, Apache will not make the column headings in a FancyIndexed -directory listing into links for sorting. The default behaviour is -for them to be links; selecting the column heading will sort the directory -listing by the values in that column. -<STRONG>Only available in Apache 1.3 and later.</STRONG> -<DT><A NAME="indexoptions:suppressdescription">SuppressDescription</A> -<DD> -<!--%plaintext <?INDEX {\tt SuppressDescription} index option> --> -This will suppress the file description in fancy indexing listings. -<DT><A NAME="indexoptions:suppresshtmlpreamble">SuppressHTMLPreamble</A> - (<EM>Apache 1.3 and later</EM>) -<DD> -<!--%plaintext <?INDEX {\tt SuppressHTMLPreamble} index option> --> -If the directory actually contains a file specified by the -<A - HREF="#headername" ->HeaderName</A> -directive, the module usually includes the contents of the file -after a standard HTML preamble (<HTML>, <HEAD>, <EM>et -cetera</EM>). The SuppressHTMLPreamble option disables this behaviour, -causing the module to start the display with the header file contents. -The header file must contain appropriate HTML instructions in this case. -If there is no header file, the preamble is generated as usual. -<DT><A NAME="indexoptions:suppresslastmodified">SuppressLastModified</A> -<DD> -<!--%plaintext <?INDEX {\tt SuppressLastModified} index option> --> -This will suppress the display of the last modification date, in fancy -indexing listings. -<DT><A NAME="indexoptions:suppresssize">SuppressSize</A> -<DD> -<!--%plaintext <?INDEX {\tt SuppressSize} index option> --> -This will suppress the file size in fancy indexing listings. -</DL> -<P> -There are some noticeable differences in the behaviour of this -directive in recent (post-1.3.0) versions of Apache. -</P> -<DL> -<DT>Apache 1.3.2 and earlier:</DT> -<DD> -<P> -The default is that no options are enabled. If multiple IndexOptions -could apply to a directory, then the most specific one is taken complete; -the options are not merged. For example: -<BLOCKQUOTE><CODE> -<Directory /web/docs> <BR> -IndexOptions FancyIndexing <BR> -</Directory><BR> -<Directory /web/docs/spec> <BR> -IndexOptions ScanHTMLTitles <BR> -</Directory> -</CODE></BLOCKQUOTE> -then only <CODE>ScanHTMLTitles</CODE> will be set for the /web/docs/spec -directory. -</P> -</DD> -<DT>Apache 1.3.3 and later:</DT> -<DD> -<P> -Apache 1.3.3 introduced some significant changes in the handling of -<SAMP>IndexOptions</SAMP> directives. In particular, -</P> -<UL> - <LI>Multiple <SAMP>IndexOptions</SAMP> directives for a single - directory are now merged together. The result of the example above - will now be the equivalent of - <CODE>IndexOptions FancyIndexing ScanHTMLTitles</CODE>. - </LI> - <LI>The addition of the incremental syntax (<EM>i.e.</EM>, prefixing - keywords with '+' or '-'). - </LI> -</UL> -<P> -Whenever a '+' or '-' prefixed keyword is encountered, it is applied -to the current <SAMP>IndexOptions</SAMP> settings (which may have been -inherited from an upper-level directory). However, whenever an unprefixed -keyword is processed, it clears all inherited options and any incremental -settings encountered so far. Consider the following example: -</P> -<BLOCKQUOTE><CODE>IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing -<BR> -IndexOptions +SuppressSize -<BR> -</CODE></BLOCKQUOTE> -<P> -The net effect is equivalent to -<CODE>IndexOptions FancyIndexing +SuppressSize</CODE>, because -the unprefixed <CODE>FancyIndexing</CODE> discarded the incremental -keywords before it, but allowed them to start accumulating again -afterward. -</P> -<P> -To unconditionally set the <CODE>IndexOptions</CODE> for a -particular directory, clearing the inherited settings, specify -keywords without either '+' or '-' prefixes. -</P> -</DD> -</DL> - -<HR> - -<H2><A NAME="indexorderdefault">IndexOrderDefault</A></H2> -<!--%plaintext <?INDEX {\tt IndexOrderDefault} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> IndexOrderDefault - <EM>Ascending|Descending</EM> <EM>Name|Date|Size|Description</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess -<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes -<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base -<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex -<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> IndexOrderDefault is only available in -Apache 1.3.4 and later. - -<P> -The <SAMP>IndexOrderDefault</SAMP> directive is used in combination with -the <A HREF="#indexoptions:fancyindexing"><SAMP>FancyIndexing</SAMP></A> -index option. By default, fancyindexed directory listings are displayed in ascending order by filename; the <SAMP>IndexOrderDefault</SAMP> allows -you to change this initial display order. -</P> -<P> -<SAMP>IndexOrderDefault</SAMP> takes two arguments. The first must be either -<SAMP>Ascending</SAMP> or <SAMP>Descending</SAMP>, indicating the direction -of the sort. The second argument must be one of the keywords -<SAMP>Name</SAMP>, <SAMP>Date</SAMP>, <SAMP>Size</SAMP>, or -<SAMP>Description</SAMP>, and identifies the primary key. The secondary -key is <EM>always</EM> the ascending filename. -</P> -<P> -You can force a directory listing to only be displayed in a particular -order by combining this directive with the -<A HREF="#indexoptions:suppresscolumnsorting" -><SAMP>SuppressColumnSorting</SAMP></A> index option; this will prevent -the client from requesting the directory listing in a different order. -</P> - -<HR> - -<H2><A NAME="readmename">ReadmeName</A></H2> -<!--%plaintext <?INDEX {\tt ReadmeName} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ReadmeName <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_autoindex - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> some features only available after - 1.3.6; see text - -<P> -The ReadmeName directive sets the name of the file that will be appended -to the end of the index listing. <EM>Filename</EM> is the name of the file -to include, and is taken to be relative to the location being indexed. -</P> -<BLOCKQUOTE> -<STRONG>The <EM>filename</EM> argument is treated as a stub filename -in Apache 1.3.6 and earlier, and as a relative URI in later versions. -Details of how it is handled may be found under the description of -the <A HREF="#headername">HeaderName</A> directive, which uses the -same mechanism and changed at the same time as ReadmeName.</STRONG> -</BLOCKQUOTE> -<P>See also <A HREF="#headername">HeaderName</A>.<P> - - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_cern_meta.html b/docs/manual/mod/mod_cern_meta.html deleted file mode 100644 index 0ac5282421..0000000000 --- a/docs/manual/mod/mod_cern_meta.html +++ /dev/null @@ -1,143 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Module mod_cern_meta</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Apache module mod_cern_meta</H1> - -This module is contained in the <CODE>mod_cern_meta.c</CODE> file, and -is not compiled in by default. It provides for CERN httpd metafile -semantics. It is only available in Apache 1.1 and later. - -<H2>Summary</H2> - -Emulate the CERN HTTPD Meta file semantics. Meta files are HTTP -headers that can be output in addition to the normal range of headers -for each file accessed. They appear rather like the Apache -.asis files, and are able to provide a crude way of influencing -the Expires: header, as well as providing other curiosities. -There are many ways to manage meta information, this one was -chosen because there is already a large number of CERN users -who can exploit this module. - -<P>More information on the -<A HREF="http://www.w3.org/pub/WWW/Daemon/User/Config/General.html#MetaDir" ->CERN metafile semantics</A> is available. - -<H2>Directives</H2> -<UL> -<LI><A HREF="#metafiles">MetaFiles</A> -<LI><A HREF="#metadir">MetaDir</A> -<LI><A HREF="#metasuffix">MetaSuffix</A> -</UL> - -<HR> - -<H2><A NAME="metafiles">MetaFiles</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> MetaFiles <EM>on/off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>MetaFiles off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> per-directory config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_cern_meta<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> MetaFiles is only available in Apache 1.3 -and later.<P> - -Turns on/off Meta file processing on a per-directory basis. This option was introduced in Apache 1.3. - -<H2><A NAME="metadir">MetaDir</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> MetaDir <EM>directory name</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>MetaDir .web</CODE><BR> -<STRONG>Context: (Apache prior to 1.3)</STRONG> server config<BR> -<STRONG>Context: (Apache 1.3)</STRONG> per-directory config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_cern_meta<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> MetaDir is only available in Apache 1.1 -and later.<P> - -Specifies the name of the directory in which Apache can find -meta information files. The directory is usually a 'hidden' -subdirectory of the directory that contains the file being -accessed. Set to "<CODE>.</CODE>" to look in the same directory as the -file. - -<H2><A NAME="metasuffix">MetaSuffix</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> MetaSuffix <EM>suffix</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>MetaSuffix .meta</CODE><BR> -<STRONG>Context: (Apache prior to 1.3)</STRONG> server config<BR> -<STRONG>Context: (Apache 1.3)</STRONG> per-directory config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_cern_meta<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> MetaSuffix is only available in Apache 1.1 -and later.<P> - -Specifies the file name suffix for the file containing the -meta information. For example, the default values for the two -directives will cause a request to <CODE> -DOCUMENT_ROOT/somedir/index.html</CODE> to look in -<CODE>DOCUMENT_ROOT/somedir/.web/index.html.meta</CODE> and will use -its contents to generate additional MIME header information. - -<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_cgi.html b/docs/manual/mod/mod_cgi.html deleted file mode 100644 index 1d5df58f60..0000000000 --- a/docs/manual/mod/mod_cgi.html +++ /dev/null @@ -1,216 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_cgi</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> - -<H1 ALIGN="CENTER">Module mod_cgi</H1> - -This module is contained in the <CODE>mod_cgi.c</CODE> file, and -is compiled in by default. It provides for execution of CGI scripts. -Any file with mime type <CODE>application/x-httpd-cgi</CODE> will be -processed by this module. -<!--%plaintext <?INDEX {\tt application/x-httpd-cgi} mime type> --> -<!--%plaintext <?INDEX CGI scripts> --> - -<H2>Summary</H2> -Any file that has the mime type <CODE>application/x-httpd-cgi</CODE> -or handler <CODE>cgi-script</CODE> (Apache 1.1 or later) -will be treated as a CGI script, and run by the server, with its output -being returned to the client. Files acquire this type either by -having a name containing an extension defined by the -<A HREF="mod_mime.html#addtype">AddType</A> directive, or by being in -a <A HREF="mod_alias.html#scriptalias">ScriptAlias</A> directory. <P> - -When the server invokes a CGI script, it will add a variable called -<CODE>DOCUMENT_ROOT</CODE> to the environment. This variable will contain the -value of the <A HREF="core.html#documentroot">DocumentRoot</A> -configuration variable. - -<H2>CGI Environment variables</H2> -The server will set the CGI environment variables as described in the -<A HREF="http://hoohoo.ncsa.uiuc.edu/cgi/">CGI specification</A>, with the -following provisions: -<DL> -<DT>REMOTE_HOST -<DD>This will only be set if <A HREF="core.html#hostnamelookups"><CODE>HostnameLookups</CODE></A> -is set to <CODE>on</CODE> (it is off by default), and if a reverse DNS -lookup of the accessing host's address indeed finds a host name. -<DT>REMOTE_IDENT -<DD>This will only be set if -<A HREF="core.html#identitycheck">IdentityCheck</A> is set to <CODE>on</CODE> -and the accessing host supports the ident protocol. Note that the contents -of this variable cannot be relied upon because it can easily be faked, and if -there is a proxy between the client and the server, it is usually -totally useless. -<DT>REMOTE_USER -<DD>This will only be set if the CGI script is subject to authentication. -</DL> -<P> - -<HR> - -<H2><A NAME="cgi_debug">CGI Debugging</A></H2> - -Debugging CGI scripts has traditionally been difficult, mainly because -it has -not -been possible to study the output (standard output and error) for -scripts -which are failing to run properly. These directives, included in -Apache 1.2 and later, provide -more detailed logging of errors when they occur. - -<HR> - -<H2>CGI Logfile Format</H2> - -When configured, the CGI error log logs any CGI which does not execute -properly. Each CGI script which fails to operate causes several lines -of information to be logged. The first two lines are always of the -format: - -<PRE> - %% [<EM>time</EM>] <EM>request-line</EM> - %% <EM>HTTP-status</EM> <EM>CGI-script-filename</EM> -</PRE> - -If the error is that CGI script cannot be run, the log file will -contain -an extra two lines: - -<PRE> - %%error - <EM>error-message</EM> -</PRE> - -Alternatively, if the error is the result of the script returning -incorrect header information (often due to a bug in the script), the -following information is logged: - -<PRE> - %request - <EM>All HTTP request headers received</EM> - <EM>POST or PUT entity (if any)</EM> - %response - <EM>All headers output by the CGI script</EM> - %stdout - <EM>CGI standard output</EM> - %stderr - <EM>CGI standard error</EM> -</PRE> - -(The %stdout and %stderr parts may be missing if the script did not -output -anything on standard output or standard error). - -<HR> - -<H2>Directives</H2> - -<H3><A NAME="scriptlog">ScriptLog</A></H3> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ScriptLog <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> none<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> mod_cgi -<P> - -The <TT>ScriptLog</TT> directive sets the CGI script error logfile. -If no ScriptLog is given, no error log is created. If given, any -CGI errors are logged into the filename given as argument. If this -is a relative file or path it is taken relative to the server root. - -<P>This log will be opened as the user the child processes run as, -ie. the user specified in the main <A HREF="core.html#User">User</A> -directive. This means that either the directory the script log is -in needs to be writable by that user or the file needs to be manually -created and set to be writable by that user. If you place the -script log in your main logs directory, do <STRONG>NOT</STRONG> -change the directory permissions to make it writable by the user -the child processes run as.</P> - -<P>Note that script logging is meant to be a debugging feature when -writing CGI scripts, and is not meant to be activated continuously on -running servers. It is not optimized for speed or efficiency, and may -have security problems if used in a manner other than that for which -it was designed.</P> - -<H3><A NAME="scriptloglength">ScriptLogLength</A></H3> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ScriptLogLength <EM>size</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> 10385760<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> mod_cgi -<P> - -<TT>ScriptLogLength</TT> can be used to limit the size of the CGI -script logfile. Since the logfile logs a lot of information per CGI -error (all request headers, all script output) it can grow to be a big -file. To prevent problems due to unbounded growth, this directive can -be used to set an maximum file-size for the CGI logfile. If the file -exceeds this size, no more information will be written to it. - -<H3><A NAME="scriptlogbuffer">ScriptLogBuffer</A></H3> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ScriptLogBuffer <EM>size</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> 1024<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> mod_cgi -<P> - -The size of any PUT or POST entity body that is logged to the file is -limited, to prevent the log file growing too big too quickly if large -bodies are being received. By default, up to 1024 bytes are logged, -but this can be changed with this directive. - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_dir.html b/docs/manual/mod/mod_dir.html deleted file mode 100644 index f150aa2e11..0000000000 --- a/docs/manual/mod/mod_dir.html +++ /dev/null @@ -1,103 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_dir</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_dir</H1> - -This module is contained in the <CODE>mod_dir.c</CODE> file, and -is compiled in by default. It provides for "trailing slash" redirects and -serving directory index files. - -<H2>Summary</H2> -The index of a directory can come from one of two sources: -<UL> -<LI>A file written by the user, typically called <CODE>index.html</CODE>. -The <A HREF="#directoryindex">DirectoryIndex</A> directive sets -the name of this file. -This is controlled by <CODE>mod_dir</CODE>. -<LI>Otherwise, a listing generated by the server. This is provided by -<A HREF="mod_autoindex.html"><CODE>mod_autoindex</CODE></A>. -</UL> -The two functions are separated so that you can completely remove -(or replace) automatic index generation should you want to. -<P>A "trailing slash" redirect is issued when the server receives a -request for a URL <SAMP>http://servername/foo/dirname</SAMP> where -<SAMP>dirname</SAMP> is a directory. Directories require a trailing -slash, so <CODE>mod_dir</CODE> issues a redirect to -<SAMP>http://servername/foo/dirname/</SAMP>. - -<H2>Directives</H2> - -<MENU> -<LI><A HREF="#directoryindex">DirectoryIndex</A> -</MENU> -<HR> - -<H2><A NAME="directoryindex">DirectoryIndex</A></H2> -<!--%plaintext <?INDEX {\tt DirectoryIndex} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> DirectoryIndex <EM>local-url local-url ...</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>DirectoryIndex index.html</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_dir<P> - -The DirectoryIndex directive sets the list of resources to look for, -when the client requests an index of the directory by specifying a / -at the end of the a directory name. <EM>Local-url</EM> is the -(%-encoded) URL of a document on the server relative to the requested -directory; it is usually the name of a file in the directory. Several -URLs may be given, in which case the server will return the first one -that it finds. If none of the resources exist and the -<CODE>Indexes</CODE> option is set, the server will generate its own -listing of the directory. -<P> - -Example: -<BLOCKQUOTE><CODE> -DirectoryIndex index.html -</CODE></BLOCKQUOTE> -then a request for <CODE>http://myserver/docs/</CODE> would return -<CODE>http://myserver/docs/index.html</CODE> if it exists, or would list -the directory if it did not. <P> - -Note that the documents do not need to be relative to the directory; -<BLOCKQUOTE><CODE> -DirectoryIndex index.html index.txt /cgi-bin/index.pl</CODE></BLOCKQUOTE> -would cause the CGI script <CODE>/cgi-bin/index.pl</CODE> to be executed -if neither <CODE>index.html</CODE> or <CODE>index.txt</CODE> existed in -a directory.<P><HR> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_env.html b/docs/manual/mod/mod_env.html deleted file mode 100644 index abe1fbf795..0000000000 --- a/docs/manual/mod/mod_env.html +++ /dev/null @@ -1,137 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_env</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Apache module mod_env</H1> - -This module is contained in the <CODE>mod_env.c</CODE> file, and -is compiled in by default. It provides for -passing environment variables to CGI/SSI scripts. Is is only available -in Apache 1.1 and later. - -<H2>Summary</H2> - -This module allows Apache's CGI and SSI environment to inherit -environment variables from the shell which invoked the httpd process. -CERN web-servers are able to do this, so this module is especially -useful to web-admins who wish to migrate from CERN to Apache without -rewriting all their scripts - -<H2>Directives</H2> -<UL> -<LI><A HREF="#passenv">PassEnv</A> -<LI><A HREF="#setenv">SetEnv</A> -<LI><A HREF="#unsetenv">UnsetEnv</A> -</UL> - -<HR> - -<H2><A NAME="passenv">PassEnv</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> PassEnv <EM>variable variable ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_env<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> PassEnv is only available in -Apache 1.1 and later.<P> - -Specifies one or more environment variables to pass to CGI scripts -from the server's own environment. Example: -<PRE> - PassEnv LD_LIBRARY_PATH -</PRE> - -<HR> - -<H2><A NAME="setenv">SetEnv</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> SetEnv <EM>variable value</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_env<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> SetEnv is only available in -Apache 1.1 and later.<P> - -Sets an environment variable, which is then passed on to CGI -scripts. Example: -<PRE> - SetEnv SPECIAL_PATH /foo/bin -</PRE> - -<HR> - -<H2><A NAME="unsetenv">UnsetEnv</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> UnsetEnv <EM>variable variable ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_env<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> UnsetEnv is only available in -Apache 1.1 and later.<P> - -Removes one or more environment variables from those passed on to -CGI scripts. Example: -<PRE> - UnsetEnv LD_LIBRARY_PATH -</PRE> - - - -<P> -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_example.html b/docs/manual/mod/mod_example.html deleted file mode 100644 index f582dd45d2..0000000000 --- a/docs/manual/mod/mod_example.html +++ /dev/null @@ -1,167 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Apache module mod_example</TITLE> - </HEAD> - <!-- Background white, links blue (unvisited), navy (visited), red (active) --> - <BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" - > - <!--#include virtual="header.html" --> - <H1 ALIGN="CENTER">Module mod_example</H1> - <P> - This module is contained in the <CODE>modules/mod_example.c</CODE> file, and - <STRONG>is not</STRONG> compiled in by default. It illustrates many of - the aspects of the - <A - HREF="../misc/API.html" - REL="Help" - >Apache 1.2 API</A> - and, when used, demonstrates the manner in which module callbacks are - triggered by the server. - </P> - <H2>Summary</H2> - <P> - The files in the <CODE>src/modules/example directory</CODE> under the - Apache distribution directory tree are provided as an example to those - that wish to write modules that use the Apache API. - </P> - <P> - The main file is <CODE>mod_example.c</CODE>, which illustrates all - the different callback mechanisms and call syntaxes. By no means does - an add-on module need to include routines for all of the callbacks - - quite the contrary! - </P> - <P> - The example module is an actual working module. If you link it into - your server, enable the "example-handler" handler for a location, and - then browse to that location, you will see a display of - some of the tracing the example module did as the various callbacks - were made. - </P> - <P> - To include the example module in your server, follow the steps below: - </P> - <OL> - <LI>Uncomment the "AddModule modules/example/mod_example" line near - the bottom of - the <CODE>src/Configuration</CODE> file. If there isn't one, add - it; it should look like this: - <PRE> - AddModule modules/example/mod_example.o - </PRE> - </LI> - <LI>Run the <CODE>src/Configure</CODE> script - ("<SAMP>cd src; ./Configure</SAMP>"). This will - build the Makefile for the server itself, and update the - <CODE>src/modules/Makefile</CODE> for any additional modules you - have requested from beneath that subdirectory. - </LI> - <LI>Make the server (run "<SAMP>make</SAMP>" in the <CODE>src</CODE> - directory). - </LI> - </OL> - <P> - To add another module of your own: - </P> - <OL TYPE="A"> - <LI><SAMP>mkdir src/modules/<EM>mymodule</EM></SAMP> - </LI> - <LI><SAMP>cp src/modules/example/* src/modules/<EM>mymodule</EM></SAMP> - </LI> - <LI>Modify the files in the new directory. - </LI> - <LI>Follow steps [1] through [3] above, with appropriate changes. - </LI> - </OL> - <H3> - Using the <SAMP>mod_example</SAMP> Module - </H3> - <P> - To activate the example module, include a block similar to the - following in your <SAMP>srm.conf</SAMP> file: - </P> - <PRE> - <Location /example-info> - SetHandler example-handler - </Location> - </PRE> - <P> - As an alternative, you can put the following into a - <A - HREF="core.html#accessfilename" - ><SAMP>.htaccess</SAMP></A> - file and then request the file "test.example" from that - location: - </P> - <PRE> - AddHandler example-handler .example - </PRE> - <P> - After reloading/restarting your server, you should be able to browse - to this location and see the brief display mentioned earlier. - </P> - <H2>Directives</H2> - <P> - <UL> - <LI><A HREF="#example">Example</A> - </LI> - </UL> - </P> - <HR> - <H2><A NAME="example"> - Example - </A></H2> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> Example - <BR> - <A - HREF="directive-dict.html#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> None - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> Options - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Extension - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_example - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> <SAMP>Example</SAMP> is only - available in Apache 1.2 and later. - </P> - <P> - The <SAMP>Example</SAMP> directive activates the example module's - content handler - for a particular location or file type. It takes no arguments. If - you browse to an URL to which the example content-handler applies, you - will get a display of the routines within the module and how and in - what order they were called to service the document request. - </P> - <!--#include virtual="footer.html" --> - </BODY> -</HTML> diff --git a/docs/manual/mod/mod_expires.html b/docs/manual/mod/mod_expires.html deleted file mode 100644 index 141a969598..0000000000 --- a/docs/manual/mod/mod_expires.html +++ /dev/null @@ -1,327 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Apache module mod_expires</TITLE> - </HEAD> -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> - <BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" - > - <!--#include virtual="header.html" --> - <H1 ALIGN="CENTER">Module mod_expires</H1> - <P> - This module is contained in the <CODE>mod_expires.c</CODE> file, and - is <STRONG>not</STRONG> compiled in by default. It provides for the - generation of <CODE>Expires</CODE> headers according to user-specified - criteria. - </P> - <H2>Summary</H2> - <P> - This module controls the setting of the <CODE>Expires</CODE> HTTP - header in server responses. The expiration date can set to be - relative to either the time the source file was last modified, or to - the time of the client access. - </P> - <P> - The <CODE>Expires</CODE> HTTP header is an instruction to the client - about the document's validity and persistence. If cached, the document - may be fetched from the cache rather than from the source until this - time has passed. After that, the cache copy is considered - "expired" and invalid, and a new copy must be obtained from - the source. - </P> - <H2>Directives</H2> - <P> - <MENU> - <LI><A - HREF="#expiresactive" - >ExpiresActive</A> - </LI> - <LI><A - HREF="#expiresbytype" - >ExpiresByType</A> - </LI> - <LI><A - HREF="#expiresdefault" - >ExpiresDefault</A> - </LI> - </MENU> - <HR> - <H2><A NAME="expiresactive"> - ExpiresActive directive - </A></H2> - <!--%plaintext <?INDEX {\tt ExpiresActive} directive> --> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> ExpiresActive <EM>boolean</EM> - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> Indexes - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Extension - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_expires - </P> - <P> - This directive enables or disables the generation of the - <CODE>Expires</CODE> header for the document realm in question. (That - is, if found in an <CODE>.htaccess</CODE> file, for instance, it - applies only to documents generated from that directory.) If set to - <EM><CODE>Off</CODE></EM>, no <CODE>Expires</CODE> header will be - generated for any document in the realm (unless overridden at a lower - level, such as an <CODE>.htaccess</CODE> file overriding a server - config file). If set to <EM><CODE>On</CODE></EM>, the header will be - added to served documents according to the criteria defined by the - <A - HREF="#expiresbytype" - >ExpiresByType</A> - and - <A - HREF="#expiresdefault" - >ExpiresDefault</A> - directives (<EM>q.v.</EM>). - </P> - <P> - Note that this directive does not guarantee that an - <CODE>Expires</CODE> header will be generated. If the criteria aren't - met, no header will be sent, and the effect will be as though this - directive wasn't even specified. - </P> - <HR> - <H2><A NAME="expiresbytype"> - ExpiresByType directive - </A></H2> - <!--%plaintext <?INDEX {\tt ExpiresByType} directive> --> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> ExpiresByType <EM>MIME-type - <code>seconds</EM> - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> Indexes - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Extension - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_expires - </P> - <P> - This directive defines the value of the <CODE>Expires</CODE> header - generated for documents of the specified type (<EM>e.g.</EM>, - <CODE>text/html</CODE>). The second argument sets the number of - seconds that will be added to a base time to construct the expiration - date. - </P> - <P> - The base time is either the last modification time of the file, or the - time of the client's access to the document. Which should be used is - specified by the <CODE><EM><code></EM></CODE> field; - <STRONG>M</STRONG> means that the file's last modification time should - be used as the base time, and <STRONG>A</STRONG> means the client's - access time should be used. - </P> - <P> - The difference in effect is subtle. If <EM>M</EM> is used, all current - copies of the document in all caches will expire at the same time, - which can be good for something like a weekly notice that's always - found at the same URL. If <EM>A</EM> is used, the date of expiration - is different for each client; this can be good for image files that - don't change very often, particularly for a set of related documents - that all refer to the same images (<EM>i.e.</EM>, the images will be - accessed repeatedly within a relatively short timespan). - </P> - <P> - <STRONG>Example:</STRONG> - </P> - <P> - <PRE> - ExpiresActive On # enable expirations - ExpiresByType image/gif A2592000 # expire GIF images after a month - # in the client's cache - ExpiresByType text/html M604800 # HTML documents are good for a - # week from the time they were - # changed, period - </PRE> - </P> - <P> - Note that this directive only has effect if <CODE>ExpiresActive - On</CODE> has been specified. It overrides, for the specified MIME - type <EM>only</EM>, any expiration date set by the - <A - HREF="#expiresdefault" - >ExpiresDefault</A> - directive. - </P> - <P> - You can also specify the expiration time calculation using an - <A - HREF="#AltSyn" - >alternate syntax</A>, - described later in this document. - </P> - <HR> - <H2><A NAME="expiresdefault"> - ExpiresDefault directive - </A></H2> - <!--%plaintext <?INDEX {\tt ExpiresDefault} directive> --> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> ExpiresDefault <EM><code>seconds</EM> - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> Indexes - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Extension - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_expires - </P> - <P> - This directive sets the default algorithm for calculating the - expiration time for all documents in the affected realm. It can be - overridden on a type-by-type basis by the - <A - HREF="#expiresbytype" - >ExpiresByType</A> - directive. See the description of that directive for details about - the syntax of the argument, and the - <A - HREF="#AltSyn" - >alternate syntax</A> - description as well. - </P> - <HR> - <H2> - <A NAME="AltSyn">Alternate Interval Syntax</A> - </H2> - <P> - The - <A - HREF="#expiresdefault" - ><SAMP>ExpiresDefault</SAMP></A> - and - <A - HREF="#expiresbytype" - ><SAMP>ExpiresByType</SAMP></A> - directives can also be defined in a more readable syntax of the form: - </P> - <DL> - <DD><CODE>ExpiresDefault "<base> [plus] {<num> <type>}*" - <BR> - ExpiresByType type/encoding "<base> [plus] - {<num> <type>}*"</CODE> - </DD> - </DL> - <P> - where <base> is one of: - </P> - <MENU> - <LI><SAMP>access</SAMP> - </LI> - <LI><SAMP>now</SAMP> (equivalent to '<SAMP>access</SAMP>') - </LI> - <LI><SAMP>modification</SAMP> - </LI> - </MENU> - <P> - The '<SAMP>plus</SAMP>' keyword is optional. <num> should be an - integer value [acceptable to <SAMP>atoi()</SAMP>], and <type> - is one of: - </P> - <MENU> - <LI><SAMP>years</SAMP> - </LI> - <LI><SAMP>months</SAMP> - </LI> - <LI><SAMP>weeks</SAMP> - </LI> - <LI><SAMP>days</SAMP> - </LI> - <LI><SAMP>hours</SAMP> - </LI> - <LI><SAMP>minutes</SAMP> - </LI> - <LI><SAMP>seconds</SAMP> - </LI> - </MENU> - <P> - For example, any of the following directives can be used to make - documents expire 1 month after being accessed, by default: - </P> - <DL> - <DD><CODE>ExpiresDefault "access plus 1 month" - <BR> - ExpiresDefault "access plus 4 weeks" - <BR> - ExpiresDefault "access plus 30 days"</CODE> - </DD> - </DL> - <P> - The expiry time can be fine-tuned by adding several '<num> - <type>' clauses: - </P> - <DL> - <DD><CODE>ExpiresByType text/html "access plus 1 month 15 days 2 hours" - <BR> - ExpiresByType image/gif "modification plus 5 hours 3 minutes"</CODE> - </DD> - </DL> - <P> - Note that if you use a modification date based setting, the Expires - header will <STRONG>not</STRONG> be added to content that does - not come from a file on disk. This is due to the fact that there is - no modification time for such content. - - <!--#include virtual="footer.html" --> - </BODY> -</HTML> diff --git a/docs/manual/mod/mod_headers.html b/docs/manual/mod/mod_headers.html deleted file mode 100644 index 7d62d5d1fd..0000000000 --- a/docs/manual/mod/mod_headers.html +++ /dev/null @@ -1,121 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_headers</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_headers</H1> - -The optional headers module allows for the customization of HTTP -response headers. Headers can be merged, replaced or removed. The -directives described in this document are only available if Apache is -compiled with <STRONG>mod_headers.c</STRONG>. - -<HR> - -<H2>Directive</H2> -<UL> -<LI><A HREF="#header">Header</A> -</UL> - -<HR> - -<H2><A NAME="header">Header</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Header [ set | append | add ] - <EM>header</EM> <EM>value</EM><BR> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> Header unset <EM>header</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, access.conf, - .htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> optional<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_header<P> - -This directive can replace, merge or remove HTTP response headers. The -action it performs is determined by the first argument. This can be one -of the following values: - -<UL> -<LI><STRONG>set</STRONG><BR> - The response header is set, replacing any previous header with this name - -<LI><STRONG>append</STRONG><BR> - The response header is appended to any existing header of the same - name. When a new value is merged onto an existing header it is - separated from the existing header with a comma. This is the HTTP standard - way of giving a header multiple values. - -<LI><STRONG>add</STRONG><BR> - The response header is added to the existing set of headers, even if - this header already exists. This can result in two (or more) headers - having the same name. This can lead to unforeseen consequences, and in - general "append" should be used instead. - -<LI><STRONG>unset</STRONG><BR> - The response header of this name is removed, if it exists. If there are - multiple headers of the same name, only the first one set will be removed. -</UL> - -This argument is followed by a header name, which can include the -final colon, but it is not required. Case is ignored. For -add, append and set a value is given as the third argument. If this -value contains spaces, it should be surrounded by double quotes. -For unset, no value should be given. - -<H3>Order of Processing</H3> - -The Header directive can occur almost anywhere within the server -configuration. It is valid in the main server config and virtual host -sections, inside <Directory>, <Location> and <Files> -sections, and within .htaccess files. -<P> -The Header directives are processed in the following order: -<OL> -<LI>main server -<LI>virtual host -<LI><Directory> sections and .htaccess -<LI><Location> -<LI><Files> -</OL> - -Order is important. These two headers have a different effect if reversed: -<PRE> -Header append Author "John P. Doe" -Header unset Author -</PRE> - -This way round, the Author header is not set. If reversed, the Author -header is set to "John P. Doe". -<P> - -The Header directives are processed just before the response is sent -by its handler. These means that some headers that are added just -before the response is sent cannot be unset or overridden. This -includes headers such as "Date" and "Server". -<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_imap.html b/docs/manual/mod/mod_imap.html deleted file mode 100644 index 69517721ab..0000000000 --- a/docs/manual/mod/mod_imap.html +++ /dev/null @@ -1,329 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_imap</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_imap</H1> - -This module is contained in the <CODE>mod_imap.c</CODE> file, and is -compiled in by default. It provides for <CODE>.map</CODE> files, -replacing the functionality of the <CODE>imagemap</CODE> CGI -program. Any directory or document type configured to use the handler -<CODE>imap-file</CODE> (using either <CODE><A -HREF="mod_mime.html#addhandler">AddHandler</A> </CODE> or <CODE><A -HREF="mod_mime.html#sethandler">SetHandler</A></CODE>) will be -processed by this module. - -<H2>Summary</H2> - -This module is in the default Apache distribution. The following directive will -activate files ending with <CODE>.map</CODE> as imagemap files: - -<BLOCKQUOTE><CODE>AddHandler imap-file map</CODE></BLOCKQUOTE> - -Note that the following is still supported: - - <BLOCKQUOTE><CODE>AddType application/x-httpd-imap map</CODE></BLOCKQUOTE> - -However, we are trying to phase out "magic MIME types" so we are deprecating -this method. - -<H2>New Features</H2> -The imagemap module adds some new features that were not -possible with previously distributed imagemap programs.<P> - -<UL> -<LI>URL references relative to the Referer: information. -<LI>Default <BASE> assignment through a new map directive -<CODE>base</CODE>. -<LI>No need for <CODE>imagemap.conf</CODE> file. -<LI>Point references. -<LI>Configurable generation of imagemap menus. -</UL> -<P> - -<H2>Configuration Directives</H2> -<UL> -<LI><A HREF="#imapmenu">ImapMenu</A> -<LI><A HREF="#imapdefault">ImapDefault</A> -<LI><A HREF="#imapbase">ImapBase</A> -</UL> - - -<P> - -<H3><A NAME="imapmenu">ImapMenu</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ImapMenu <CODE>{none, formatted, semi-formatted, - unformatted}</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_imap.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ImapMenu is only available in Apache -1.1 and later.<P> - -The ImapMenu directive determines the action taken if an imagemap file -is called without valid coordinates. -<DL> - <DT><CODE>none</CODE> - <DD>If ImapMenu is - <CODE>none</CODE>, no menu is generated, and the <CODE>default</CODE> - action is performed. - <DT><CODE>formatted</CODE> - <DD>A <CODE>formatted</CODE> menu is the simplest menu. Comments - in the imagemap file are ignored. A level one header is - printed, then an hrule, then the links each on a separate line. - The menu has a consistent, plain look close to that of - a directory listing. - <DT><CODE>semiformatted</CODE> - <DD>In the <CODE>semiformatted</CODE> menu, comments are printed - where they occur in the imagemap file. Blank lines are turned - into HTML breaks. No header or hrule is printed, but otherwise - the menu is the same as a <CODE>formatted</CODE> menu. - <DT><CODE>unformatted</CODE> - <DD>Comments are printed, blank lines are ignored. Nothing is - printed that does not appear in the imagemap file. All breaks - and headers must be included as comments in the imagemap file. - This gives you the most flexibility over the appearance of your - menus, but requires you to treat your map files as HTML instead - of plaintext. -</DL> - -<P> - -<H3><A NAME="imapdefault">ImapDefault</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ImapDefault <CODE>{error, nocontent, - map, referer, URL}</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_imap.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ImapDefault is only available in Apache -1.1 and later.<P> - - -The ImapDefault directive sets the default <CODE>default</CODE> used in -the imagemap files. It's value is overridden by a <CODE>default</CODE> -directive within the imagemap file. If not present, the -<CODE>default</CODE> action is <CODE>nocontent</CODE>, which means -that a <CODE>204 No Content</CODE> is sent to the client. In this -case, the client should continue to display the original page. - -<P> - -<H3><A NAME="imapbase">ImapBase</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ImapBase <CODE>{map, referer, URL}</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Indexes<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_imap.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ImapBase is only available in Apache -1.1 and later.<P> - -The ImapBase directive sets the default <CODE>base</CODE> used in -the imagemap files. It's value is overridden by a <CODE>base</CODE> -directive within the imagemap file. If not present, the -<CODE>base</CODE> defaults to <CODE>http://servername/</CODE>. - -<HR> -<P> - -<H2>Imagemap File</H2> -The lines in the imagemap files can have one of several formats: -<BLOCKQUOTE> -<CODE>directive value [x,y ...]</CODE><BR> -<CODE>directive value "Menu text" [x,y ...]</CODE><BR> -<CODE>directive value x,y ... "Menu text"</CODE><BR> -</BLOCKQUOTE> -The directive is one of <CODE>base</CODE>, <CODE>default</CODE>, -<CODE>poly</CODE>, <CODE>circle</CODE>, <CODE>rect</CODE>, or -<CODE>point</CODE>. The value is an absolute or relative URL, or one -of the special values listed below. The coordinates are -<CODE>x,y</CODE> pairs separated by whitespace. The quoted text is -used as the text of the link if a imagemap menu is generated. Lines -beginning with '#' are comments. - -<H3>Imagemap File Directives</H3> -There are six directives allowed in the imagemap file. The directives -can come in any order, but are processed in the order they are found -in the imagemap file. -<DL> -<DT><CODE>base</CODE> Directive -<DD>Has the effect of <CODE><BASE HREF="value"></CODE>. The - non-absolute URLs of the map-file are taken relative to this value. - The <CODE>base</CODE> directive overrides ImapBase as set in a - .htaccess file or in the server configuration files. In the absence - of an ImapBase configuration directive, <CODE>base</CODE> defaults to - <CODE>http://server_name/</CODE>. <BR> - <CODE>base_uri</CODE> is synonymous with <CODE>base</CODE>. Note that - a trailing slash on the URL is significant. -<P> -<DT><CODE>default</CODE> Directive -<DD>The action taken if the coordinates given do not fit any of the - <CODE>poly</CODE>, <CODE>circle</CODE> or <CODE>rect</CODE> - directives, and there are no <CODE>point</CODE> directives. Defaults - to <CODE>nocontent</CODE> in the absence of an ImapDefault - configuration setting, causing a status code of <CODE>204 No - Content</CODE> to be returned. The client should keep the same - page displayed. -<P> -<DT><CODE>poly</CODE> Directive -<DD>Takes three to one-hundred points, and is obeyed if the user selected - coordinates fall within the polygon defined by these points. -<P> -<DT><CODE>circle</CODE> -<DD>Takes the center coordinates of a circle and a point on the circle. Is - obeyed if the user selected point is with the circle. -<P> -<DT><CODE>rect</CODE> Directive -<DD>Takes the coordinates of two opposing corners of a rectangle. Obeyed - if the point selected is within this rectangle. -<P> -<DT><CODE>point</CODE> Directive -<DD>Takes a single point. The point directive closest to the user - selected point is obeyed if no other directives are satisfied. - Note that <CODE>default</CODE> will not be followed if a - <CODE>point</CODE> directive is present and valid coordinates are - given. -</DL> - - - -<H3>Values</H3> -The values for each of the directives can any of the following: -<DL> - <DT>a URL - <DD>The URL can be relative or absolute URL. Relative URLs can - contain '..' syntax and will be resolved relative to the - <CODE>base</CODE> value. <BR> - <CODE>base</CODE> itself will not resolved according to the current - value. A statement <CODE>base mailto:</CODE> will work properly, though. -<P> - <DT><CODE>map</CODE> - <DD>Equivalent to the URL of the imagemap file itself. No - coordinates are sent with this, so a menu will be generated - unless ImapMenu is set to 'none'. -<P> - <DT><CODE>menu</CODE> - <DD>Synonymous with <CODE>map</CODE>. -<P> - <DT><CODE>referer</CODE> - <DD>Equivalent to the URL of the referring document. - Defaults to <CODE>http://servername/</CODE> if no Referer: - header was present. -<P> - <DT><CODE>nocontent</CODE> - <DD>Sends a status code of <CODE>204 No Content</CODE>, - telling the client to keep the same page displayed. Valid for - all but <CODE>base</CODE>. -<P> - <DT><CODE>error</CODE> - <DD>Fails with a <CODE>500 Server Error</CODE>. Valid for all but - <CODE>base</CODE>, but sort of silly for anything but - <CODE>default</CODE>. -</DL> - -<H3>Coordinates</H3> -<DL> - <DT><CODE>0,0 200,200</CODE> - <DD>A coordinate consists of an <TT>x</TT> and a <TT>y</TT> value - separated by a comma. The coordinates are separated from each other - by whitespace. To accommodate the way Lynx handles imagemaps, should a - user select the coordinate <CODE>0,0</CODE>, it is as if - no coordinate had been selected. -</DL> - -<H3>Quoted Text</H3> -<DL> - <DT><CODE>"Menu Text"</CODE> - <DD>After the value or after the coordinates, the line optionally may - contain text within double quotes. This string is used as the - text for the link if a menu is generated:<BR> - <CODE><a HREF="http://foo.com/">Menu text</a></CODE><BR> - If no quoted text is present, the name of the link will be used - as the text:<BR> - <CODE><a HREF="http://foo.com/">http://foo.com</a></CODE><BR> - It is impossible to escape double quotes within this text. -</DL> - -<HR> - -<H2>Example Mapfile</H2> -<BLOCKQUOTE><CODE> -#Comments are printed in a 'formatted' or 'semiformatted' menu. <BR> -#And can contain html tags. <hr> <BR> -base referer <BR> -poly map "Could I have a menu, please?" 0,0 0,10 10,10 10,0 <BR> -rect .. 0,0 77,27 "the directory of the referer"<BR> -circle http://www.inetnebr.com/lincoln/feedback/ 195,0 305,27 <BR> -rect another_file "in same directory as referer" 306,0 419,27 <BR> -point http://www.zyzzyva.com/ 100,100 <BR> -point http://www.tripod.com/ 200,200 <BR> -rect mailto:nate@tripod.com 100,150 200,0 "Bugs?" <BR> -</CODE></BLOCKQUOTE> -<P> - -<H2>Referencing your mapfile</H2> -<BLOCKQUOTE><CODE> -<A HREF="/maps/imagemap1.map"> <BR> -<IMG ISMAP SRC="/images/imagemap1.gif"> <BR> -</A> -</CODE></BLOCKQUOTE><P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - - diff --git a/docs/manual/mod/mod_include.html b/docs/manual/mod/mod_include.html deleted file mode 100644 index ea18b80ece..0000000000 --- a/docs/manual/mod/mod_include.html +++ /dev/null @@ -1,420 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_include</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_include</H1> - -This module is contained in the <CODE>mod_include.c</CODE> file, and -is compiled in by default. It provides for server-parsed html -documents. Several directives beyond the original NCSA definition were -introduced in Apache 1.2 - these are flagged below with the phrase -"Apache 1.2 and above". Of particular significance are the new flow -control directives documented at the bottom. - -<H2>Enabling Server-Side Includes</H2> - -Any document with handler of "server-parsed" will be parsed by this -module, if the <CODE>Includes</CODE> option is set. If documents -containing server-side include directives are given the extension -.shtml, the following directives will make Apache parse them and -assign the resulting document the mime type of <CODE>text/html</CODE>: - -<PRE> -AddType text/html .shtml -AddHandler server-parsed .shtml -</PRE> - -The following directive must be given for the directories containing -the shtml files (typically in a <CODE><Directory></CODE> section, -but this directive is also valid .htaccess files if <CODE>AllowOverride -Options</CODE> is set): - -<PRE> -Options +Includes -</PRE> - -Alternatively the <A HREF="#xbithack"><CODE>XBitHack</CODE></A> -directive can be used to parse normal (<CODE>text/html</CODE>) files, -based on file permissions. <P> - -For backwards compatibility, documents with mime type -<CODE>text/x-server-parsed-html</CODE> or -<CODE>text/x-server-parsed-html3</CODE> will also be parsed -(and the resulting output given the mime type <CODE>text/html</CODE>). - -<H2>Basic Elements</H2> - -The document is parsed as an HTML document, with special commands embedded -as SGML comments. A command has the syntax: - -<BLOCKQUOTE><CODE> -<!--#</CODE><EM>element attribute=value attribute=value ...</EM> -<CODE> --> -</CODE></BLOCKQUOTE> - -The value will often be enclosed in double quotes; many commands only allow -a single attribute-value pair. Note that the comment terminator -(<SAMP>--></SAMP>) should be preceded by whitespace to ensure that it -isn't considered part of an SSI token. -<P> -The allowed elements are:<P> - -<DL> - -<DT><STRONG>config</STRONG> -<DD> -This command controls various aspects of the parsing. The valid attributes -are: -<DL> -<DT>errmsg -<DD>The value is a message that is sent back to the client if an error occurs -whilst parsing the document. -<DT>sizefmt -<DD>The value sets the format to be used which displaying the size of a file. -Valid values are <CODE>bytes</CODE> for a count in bytes, or -<CODE>abbrev</CODE> for a count in Kb or Mb as appropriate. -<DT>timefmt -<DD>The value is a string to be used by the <CODE>strftime(3)</CODE> library -routine when printing dates. -</DL> - -<DT><STRONG>echo</STRONG> -<DD> -This command prints one of the include variables, defined below. -If the variable is unset, it is printed as <CODE>(none)</CODE>. -Any dates printed are subject to the currently configured <CODE>timefmt</CODE>. -Attributes: -<DL> -<DT>var -<DD>The value is the name of the variable to print. -</DL> - -<DT><STRONG>exec</STRONG> -<DD> -The exec command executes a given shell command or CGI script. -The IncludesNOEXEC <A HREF="core.html#options">Option</A> disables this command -completely. The valid attributes are: -<DL> -<DT>cgi -<DD> -The value specifies a (%-encoded) URL relative path to the CGI script. -If the path does not begin with a (/), then it is taken to be relative to -the current document. The document referenced by this path is invoked -as a CGI script, even if the server would not normally recognize it as -such. However, the directory containing the script must be enabled for -CGI scripts (with <A HREF="mod_alias.html#scriptalias">ScriptAlias</A> -or the ExecCGI <A HREF="core.html#options">Option</A>).<P> -The CGI script is given the PATH_INFO and query string (QUERY_STRING) of the -original request from the client; these cannot be specified in the URL path. -The include variables will be available to the script in addition to the -standard <A HREF="mod_cgi.html">CGI</A> environment.<P> -If the script returns a Location: header instead of output, then this -will be translated into an HTML anchor.<P> -The <CODE>include virtual</CODE> element should be used in preference to -<CODE>exec cgi</CODE>. -<DT>cmd -<DD>The server will execute the given string using <CODE>/bin/sh</CODE>. -The include variables are available to the command. -</DL> - -<DT><STRONG>fsize</STRONG> -<DD> -This command prints the size of the specified file, subject to the -<CODE>sizefmt</CODE> format specification. Attributes: -<DL> -<DT>file -<DD>The value is a path relative to the directory containing the current -document being parsed. -<DT>virtual -<DD>The value is a (%-encoded) URL-path relative to the current document being -parsed. If it does not begin with a slash (/) then it is taken to be relative -to the current document. -</DL> - -<DT><STRONG>flastmod</STRONG> -<DD> -This command prints the last modification date of the specified file, -subject to the <CODE>timefmt</CODE> format specification. The attributes are -the same as for the <CODE>fsize</CODE> command. - -<DT><STRONG>include</STRONG> -<DD> -This command inserts the text of another document or file into the parsed -file. Any included file is subject to the usual access control. If the -directory containing the parsed file has the -<A HREF="core.html#options">Option</A> -IncludesNOEXEC set, and the including the document would cause a program -to be executed, then it will not be included; this prevents the execution of -CGI scripts. Otherwise CGI scripts are invoked as normal using the complete -URL given in the command, including any query string. -<!--%plaintext <?INDEX CGI scripts, {\tt include} element and> --> -<P> - -An attribute defines the location of the document; the inclusion is done for -each attribute given to the include command. The valid attributes are: -<DL> -<DT>file -<DD>The value is a path relative to the directory containing the current -document being parsed. It cannot contain <CODE>../</CODE>, nor can it be an -absolute path. The <CODE>virtual</CODE> attribute should always be used -in preference to this one. -<DT>virtual -<DD>The value is a (%-encoded) URL relative to the current document being -parsed. The URL cannot contain a scheme or hostname, only a path and -an optional query string. If it does not begin with a slash (/) then it -is taken to be relative to the current document. -</DL> -A URL is constructed from the attribute, and the output the server -would return if the URL were accessed by the client is included in the parsed -output. Thus included files can be nested. - -<DT><STRONG>printenv</STRONG> -<DD>This prints out a listing of all existing variables and their values. - No attributes. -<DD>For example: <CODE><!--#printenv --></CODE> -<DD>Apache 1.2 and above. - -<DT><STRONG>set</STRONG> -<DD>This sets the value of a variable. Attributes: -<DL> -<DT>var -<DD>The name of the variable to set. -<DT>value -<DD>The value to give a variable. -</DL> -For example: - <CODE><!--#set var="category" value="help" --></CODE> -<DD>Apache 1.2 and above. - -</DL> - -<H2>Include Variables</H2> - -In addition to the variables in the standard CGI environment, these are -available for the <CODE>echo</CODE> command, for <CODE>if</CODE> and -<CODE>elif</CODE>, and to any program invoked by the document. - -<DL> -<DT>DATE_GMT -<DD>The current date in Greenwich Mean Time. -<DT>DATE_LOCAL -<DD>The current date in the local time zone. -<DT>DOCUMENT_NAME -<DD>The filename (excluding directories) of the document requested by the -user. -<DT>DOCUMENT_URI -<DD>The (%-decoded) URL path of the document requested by the user. Note that -in the case of nested include files, this is <EM>not</EM> then URL for the -current document. -<DT>LAST_MODIFIED -<DD>The last modification date of the document requested by the user. -</DL> -<P> - -<H2>Variable Substitution</H2> -<P> Variable substitution is done within quoted strings in most cases - where they may reasonably occur as an argument to an SSI directive. - This includes the - <SAMP>config</SAMP>, - <SAMP>exec</SAMP>, - <SAMP>flastmod</SAMP>, - <SAMP>fsize</SAMP>, - <SAMP>include</SAMP>, and - <SAMP>set</SAMP> - directives, as well as the arguments to conditional operators. - You can insert a literal dollar sign into the string using backslash - quoting: - -<PRE> - <!--#if expr="$a = \$test" --> -</PRE> - -<P> If a variable reference needs to be substituted in the middle of a - character sequence that might otherwise be considered a valid - identifier in its own right, it can be disambiguated by enclosing - the reference in braces, <EM>à la</EM> shell substitution: - -<PRE> - <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" --> -</PRE> - -<P> This will result in the <SAMP>Zed</SAMP> variable being set to - "<SAMP>X_Y</SAMP>" if <SAMP>REMOTE_HOST</SAMP> is - "<SAMP>X</SAMP>" and <SAMP>REQUEST_METHOD</SAMP> is - "<SAMP>Y</SAMP>". - -<P> EXAMPLE: the below example will print "in foo" if the DOCUMENT_URI is -/foo/file.html, "in bar" if it is /bar/file.html and "in neither" -otherwise: -<PRE> - <!--#if expr="\"$DOCUMENT_URI\" = \"/foo/file.html\"" --> - in foo - <!--#elif expr="\"$DOCUMENT_URI\" = \"/bar/file.html\"" --> - in bar - <!--#else --> - in neither - <!--#endif --> -</PRE> - -<H2><A NAME="flowctrl">Flow Control Elements</A></H2> - -These are available in Apache 1.2 and above. The basic flow control -elements are: - -<PRE> - <!--#if expr="<EM>test_condition</EM>" --> - <!--#elif expr="<EM>test_condition</EM>" --> - <!--#else --> - <!--#endif --> -</PRE> - -<P> The <STRONG><CODE>if</CODE></STRONG> element works like an - if statement in a programming language. The test condition - is evaluated and if the result is true, then the text until - the next <STRONG><CODE>elif</CODE></STRONG>, <STRONG><CODE>else</CODE></STRONG>. - or <STRONG><CODE>endif</CODE></STRONG> element is included in the - output stream. - -<P> The <STRONG><CODE>elif</CODE></STRONG> or <STRONG><CODE>else</CODE></STRONG> - statements are be used the put text into the output stream - if the original test_condition was false. These elements - are optional. - -<P> The <STRONG><CODE>endif</CODE></STRONG> element ends the - <STRONG><CODE>if</CODE></STRONG> element and is required. - -<P> <EM>test_condition</EM> is one of the following: - -<DL> - -<DT><EM>string</EM><DD>true if <EM>string</EM> is not empty - -<DT><EM>string1</EM> = <EM>string2</EM> - <BR> - <EM>string1</EM> != <EM>string2</EM> - <BR> - <EM>string1</EM> < <EM>string2</EM> - <BR> - <EM>string1</EM> <= <EM>string2</EM> - <BR> - <EM>string1</EM> > <EM>string2</EM> - <BR> - <EM>string1</EM> >= <EM>string2</EM> - -<DD>Compare string1 with string 2. If string2 has the form <EM>/string/</EM> - then it is compared as a regular expression. - Regular expressions have the same syntax as those found in the - Unix <SAMP>egrep</SAMP> command. - -<DT>( <EM>test_condition</EM> ) - <DD>true if <EM>test_condition</EM> is true -<DT>! <EM>test_condition</EM> - <DD>true if <EM>test_condition</EM> is false -<DT><EM>test_condition1</EM> && <EM>test_condition2</EM> - <DD>true if both <EM>test_condition1</EM> and - <EM>test_condition2</EM> are true -<DT><EM>test_condition1</EM> || <EM>test_condition2</EM> - <DD>true if either <EM>test_condition1</EM> or - <EM>test_condition2</EM> is true -</DL> - -<P> "<EM>=</EM>" and "<EM>!=</EM>" bind more tightly than "<EM>&&</EM>" and - "<EM>||</EM>". - "<EM>!</EM>" binds most tightly. Thus, the following are equivalent: - -<PRE> - <!--#if expr="$a = test1 && $b = test2" --> - <!--#if expr="($a = test1) && ($b = test2)" --> -</PRE> - -<P> Anything that's not recognized as a variable or an operator is - treated as a string. Strings can also be quoted: <EM>'string'</EM>. - Unquoted strings can't contain whitespace (blanks and tabs) - because it is used to separate tokens such as variables. If - multiple strings are found in a row, they are concatenated using - blanks. So, - -<PRE> - <EM>string1 string2</EM> results in <EM>string1 string2</EM> - <EM>'string1 string2'</EM> results in <EM>string1 string2</EM> -</PRE> - -<HR> -<H2>Directives</H2> -<UL> -<LI><A HREF="#xbithack">XBitHack</A> -</UL> -<HR> - - -<H2><A NAME="xbithack">XBitHack</A></H2> -<!--%plaintext <?INDEX {\tt XBitHack} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> XBitHack <EM>status</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>XBitHack off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> Options<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_include<P> - -The XBitHack directives controls the parsing of ordinary html documents. -This directive only affects files associated with the MIME type -<CODE>text/html</CODE>. -<EM>Status</EM> can have the following values: -<DL> -<DT>off -<DD>No special treatment of executable files. -<DT>on -<DD>Any file that has the user-execute bit set will be treated as a -server-parsed html document. -<DT>full -<DD>As for <CODE>on</CODE> but also test the group-execute bit. If it -is set, then set the Last-modified date of the returned file to be the -last modified time of the file. If it is not set, then no last-modified date -is sent. Setting this bit allows clients and proxies to cache the result of -the request. -<P><STRONG>Note:</STRONG> you would not want to use this, for example, when you -<CODE>#include</CODE> a CGI that produces different output on each hit -(or potentially depends on the hit). -</DL> -<P> - -<HR> -<H2>Using Server Side Includes for ErrorDocuments</H2> - -There is <A HREF="../misc/custom_errordocs.html">a document</A> which -describes how to use the features of mod_include to offer internationalized -customized server error documents. -<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_info.html b/docs/manual/mod/mod_info.html deleted file mode 100644 index 8afa84dc41..0000000000 --- a/docs/manual/mod/mod_info.html +++ /dev/null @@ -1,113 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_info</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_info</H1> - -This module is contained in the <CODE>mod_info.c</CODE> file. It -provides a comprehensive overview of the server configuration -including all installed modules and directives in the configuration -files. This module is not compiled into the -server by default. It is only available in Apache 1.1 and later. To -enable it, add the following line to the server build Configuration -file, and rebuild the server: - -<PRE> -AddModule modules/standard/mod_info.o -</PRE> - -<H2>Directives</H2> -<UL> -<LI><A HREF="#addmoduleinfo">AddModuleInfo</A> -</UL> - -<HR> -<P> -To configure it, add the following to your <CODE>access.conf</CODE> file. - -<PRE> -<Location /server-info> -SetHandler server-info -</Location> -</PRE> - -You may wish to add a -<A - HREF="core.html#limit" -><Limit></A> -clause inside the -<A - HREF="core.html#location" ->location</A> -directive to limit access to your server configuration information.<P> -Once configured, the server information is obtained by accessing -<TT>http://your.host.dom/server-info</TT><P> -<BLOCKQUOTE> - <STRONG> - Note that the configuration files are read by the module at run-time, - and therefore the display may <EM>not</EM> reflect the running - server's active configuration if the files have been changed since the - server was last reloaded. Also, the configuration files must be - readable by the user as which the server is running (see the - <A - HREF="core.html#user" - ><SAMP>User</SAMP></A> - directive), or else the directive settings will not be listed. - <P> - It should also be noted that if <SAMP>mod_info</SAMP> is compiled into - the server, its handler capability is available in <EM>all</EM> - configuration files, including <EM>per</EM>-directory files - (<EM>e.g.</EM>, <SAMP>.htaccess</SAMP>). This may have - security-related ramifications for your site. - </P> - </STRONG> -</BLOCKQUOTE> - -<HR> - -<H2><A NAME="addmoduleinfo">AddModuleInfo</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddModuleInfo <EM>module-name string</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_browser<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.3 and above<P> - -This allows the content of <EM>string</EM> to be shown as -HTML interpreted, -<STRONG>Additional Information</STRONG> for the module <EM>module-name</EM>. -Example: -<BLOCKQUOTE> -<PRE> -AddModuleInfo mod_auth.c 'See <A HREF="http://www.apache.org/docs/mod/mod_auth.html">http://www.apache.org/docs/mod/mod_auth.html</A>' -</PRE> -</BLOCKQUOTE> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_isapi.html b/docs/manual/mod/mod_isapi.html deleted file mode 100644 index 61c9ba6728..0000000000 --- a/docs/manual/mod/mod_isapi.html +++ /dev/null @@ -1,73 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_isapi</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> - -<H1 ALIGN="CENTER">Module mod_isapi</H1> - -<P>This module is contained in the <CODE>mod_isapi.c</CODE> file, and is - compiled in by default. It provides support for ISAPI Extensions when - running under Microsoft Windows. Any document with a handler of - <CODE>isapi-isa</CODE> will be processed by this module. - -<H2>Purpose</H2> - -<P>This module implements the <A - HREF="http://www.microsoft.com/win32dev/apiext/isapimrg.htm">ISAPI - Extension</A> API. It allows Internet Server Applications (<EM>i.e.</EM>, ISAPI - Extensions) to be used with Apache for Windows. - -<H2>Usage</H2> - -<P>In the server configuration file, add a handler called - <CODE>isapi-isa</CODE>, and map it to files with a <CODE>.DLL</CODE> - extension. In other words:</P> -<PRE> - AddHandler isapi-isa dll -</PRE> -<P>Now simply place the ISA DLLs into your document root, and they will - be loaded when their URLs are accessed.</P> - -<P>ISAPI Extensions are governed by the same restrictions as CGI - scripts. That is, <CODE>Options ExecCGI</CODE> must be active in the - directory that contains the ISA.</P> - -<H2>Notes</H2> - -<P>Apache's ISAPI implementation conforms to all of the ISAPI 2.0 - specification, except for the "Microsoft-specific" extensions dealing - with asynchronous I/O. Apache's I/O model does not allow asynchronous - reading and writing in a manner that the ISAPI could access. If an ISA - tries to access async I/O, a message will be place in the error log, - to help with debugging. - -<P>Some servers, like Microsoft IIS, load the ISA into the server, and - keep it loaded until memory usage is too high, and it is - unloaded. Apache currently loads and unloads the ISA for each - request. This is inefficient, but Apache's request model makes this - method the only method that currently works. A future release may use - a more effective loading method. - -<P>Apache 1.3a1 currently limits POST and PUT input to 48k per - request. This is to work around a problem with the ISAPI implementation - that could result in a denial of service attack. It is expected that - support for larger uploads will be added soon. - -<P>Also, remember that while Apache supports ISAPI Extensions, it does - not support ISAPI Filters. Support for filters may be added at a later - date, but no support is planned at this time.</P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_log_agent.html b/docs/manual/mod/mod_log_agent.html deleted file mode 100644 index 2084889074..0000000000 --- a/docs/manual/mod/mod_log_agent.html +++ /dev/null @@ -1,77 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Module mod_log_agent</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_log_agent</H1> - -This module is contained in the <CODE>mod_log_agent.c</CODE> file, and is not -compiled in by default. It provides for logging of the client user agents. -mod_log_agent is deprecated. Use <A HREF="mod_log_config.html">mod_log_config</A> -instead. - -<UL> -<LI><A HREF="#agentlog">AgentLog</A> -</UL> -<HR> - - -<H2><A NAME="agentlog">AgentLog</A></H2> -<!--%plaintext <?INDEX {\tt AgentLog} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AgentLog <EM>file-pipe</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>AgentLog logs/agent_log</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_log_agent<P> - -The AgentLog directive sets the name of the file to which the server will -log the UserAgent header of incoming requests. <EM>File-pipe</EM> is one -of -<DL><DT>A filename -<DD>A filename relative to the <A HREF="core.html#serverroot">ServerRoot</A>. -<DT> `|' followed by a command -<DD>A program to receive the agent log information on its standard input. -Note the a new program will not be started for a VirtualHost if it inherits -the AgentLog from the main server. -</DL> -<STRONG>Security:</STRONG> if a program is used, then it will be -run under the user who started httpd. This will be root if the server -was started by root; be sure that the program is secure.<P> - -<STRONG>Security:</STRONG> See the <A -HREF="../misc/security_tips.html">security tips</A> document for -details on why your security could be compromised if the directory -where logfiles are stored is writable by anyone other than the user -that starts the server.<P> - -This directive is provided for compatibility with NCSA 1.4.<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_log_config.html b/docs/manual/mod/mod_log_config.html deleted file mode 100644 index e9bb199a42..0000000000 --- a/docs/manual/mod/mod_log_config.html +++ /dev/null @@ -1,449 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_log_config</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_log_config</H1> -<P> -This module is contained in the <CODE>mod_log_config.c</CODE> file, -and is compiled in by default in Apache 1.2. mod_log_config replaces -mod_log_common in Apache 1.2. Prior to version 1.2, mod_log_config was -an optional module. It provides for logging of the requests made to -the server, using the Common Log Format or a user-specified format. -</P> - -<H2>Summary</H2> -<P> -Three directives are provided by this module: <CODE>TransferLog</CODE> -to create a log file, <CODE>LogFormat</CODE> to set a custom format, -and <CODE>CustomLog</CODE> to define a log file and format in one go. -The <CODE>TransferLog</CODE> and <CODE>CustomLog</CODE> directives can -be used multiple times in each server to cause each request to be -logged to multiple files. -</P> - -<H3>Compatibility notes</H3> - -<UL> -<LI>This module is based on mod_log_config distributed with -previous Apache releases, now updated to handle multiple logs. -There is now no need to re-configure Apache to use configuration log -formats. - -<LI>The module also implements the <CODE>CookieLog</CODE> directive, -used to log user-tracking information created by <A -HREF="mod_usertrack.html">mod_usertrack</A>. The use of -<CODE>CookieLog</CODE> is deprecated, and a <CODE>CustomLog</CODE> -should be defined to log user-tracking information instead. - -<LI>As of Apache 1.3.5, this module allows conditional logging -based upon the setting of environment variables. That is, -you can control whether a request should be logged or not -based upon whether an arbitrary environment variable is -defined or not. This is settable on a <EM>per</EM>-logfile -basis. - -<LI>Beginning with Apache 1.3.5, the mod_log_config module has -also subsumed the <CODE>RefererIgnore</CODE> functionality from -<A HREF="mod_log_referer.html">mod_log_referer</A>. The effect -of <CODE>RefererIgnore</CODE> can be achieved by combinations of -<A HREF="mod_setenvif.html"><CODE>SetEnvIf</CODE></A> directives -and conditional <CODE>CustomLog</CODE> definitions. - -</UL> - -<H2>Log File Formats</H2> - -Unless told otherwise with <TT>LogFormat</TT> the log files created by -<TT>TransferLog</TT> will be in standard "Common Log Format" -(CLF). The contents of each line in a CLF file are explained -below. Alternatively, the log file can be customized (and if multiple -log files are used, each can have a different format). Custom formats -are set with <CODE>LogFormat</CODE> and <CODE>CustomLog</CODE>. - -<H3>Common Log Format</H3> - -The Common Log Format (CLF) file contains a separate line for each -request. A line is composed of several tokens separated by spaces: - -<BLOCKQUOTE> -host ident authuser date request status bytes -</BLOCKQUOTE> -If a token does not have a value then it is represented by a hyphen (-). -The meanings and values of these tokens are as follows: -<DL> -<DT>host -<DD>The fully-qualified domain name of the client, or its IP number if the -name is not available. -<DT>ident -<DD>If <A HREF="core.html#identitycheck">IdentityCheck</A> is enabled and the -client machine runs identd, then this is the identity information reported -by the client. -<DT>authuser -<DD>If the request was for an password protected document, then this is -the userid used in the request. -<DT>date -<DD>The date and time of the request, in the following format: -<DL><DD><BLOCKQUOTE><CODE> date = [day/month/year:hour:minute:second zone] <BR> -day = 2*digit<BR> -month = 3*letter<BR> -year = 4*digit<BR> -hour = 2*digit<BR> -minute = 2*digit<BR> -second = 2*digit<BR> -zone = (`+' | `-') 4*digit</CODE></BLOCKQUOTE></DL> -<DT>request -<DD>The request line from the client, enclosed in double quotes -(<CODE>"</CODE>). -<DT>status -<DD>The three digit status code returned to the client. -<DT>bytes -<DD>The number of bytes in the object returned to the client, not including -any headers. -</DL> - -<H3><A NAME="formats">Custom Log Formats</A></H3> - -The format argument to the <CODE>LogFormat</CODE> and -<CODE>CustomLog</CODE> is a string. This string is logged to the log -file for each request. It can contain literal characters copied into -the log files, and `%' directives which are replaced in the log file -by the values as follows: - -<PRE> -%...b: Bytes sent, excluding HTTP headers. -%...f: Filename -%...{FOOBAR}e: The contents of the environment variable FOOBAR -%...h: Remote host -%...a: Remote IP-address -%...{Foobar}i: The contents of Foobar: header line(s) in the request - sent to the server. -%...l: Remote logname (from identd, if supplied) -%...{Foobar}n: The contents of note "Foobar" from another module. -%...{Foobar}o: The contents of Foobar: header line(s) in the reply. -%...p: The canonical Port of the server serving the request -%...P: The process ID of the child that serviced the request. -%...r: First line of request -%...s: Status. For requests that got internally redirected, this - is status of the *original* request --- %...>s for the last. -%...t: Time, in common log format time format (standard english format) -%...{format}t: The time, in the form given by format, which should - be in strftime(3) format. (potentially localised) -%...T: The time taken to serve the request, in seconds. -%...u: Remote user (from auth; may be bogus if return status (%s) is 401) -%...U: The URL path requested. -%...v: The canonical ServerName of the server serving the request. -%...V: The server name according to the UseCanonicalName setting. -</PRE> - -The `...' can be nothing at all (<EM>e.g.</EM>, <CODE>"%h %u %r %s %b"</CODE>), or it can -indicate conditions for inclusion of the item (which will cause it -to be replaced with `-' if the condition is not met). Note that -there is no escaping performed on the strings from %r, %...i and -%...o; some with long memories may remember that I thought this was -a bad idea, once upon a time, and I'm still not comfortable with -it, but it is difficult to see how to `do the right thing' with all -of `%..i', unless we URL-escape everything and break with CLF. - -<P> - -The forms of condition are a list of HTTP status codes, which may -or may not be preceded by `!'. Thus, `%400,501{User-agent}i' logs -User-agent: on 400 errors and 501 errors (Bad Request, Not -Implemented) only; `%!200,304,302{Referer}i' logs Referer: on all -requests which did <STRONG>not</STRONG> return some sort of normal status. - -<P> - -Note that the common log format is defined by the string <CODE>"%h %l -%u %t \"%r\" %s %b"</CODE>, which can be used as the basis for -extending for format if desired (<EM>e.g.</EM>, to add extra fields at the end). -NCSA's extended/combined log format would be <CODE>"%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\""</CODE>. - -<P> - -Note that the canonical <A HREF="core.html#servername">ServerName</A> -and <A HREF="core.html#port">Port</A> of the server serving the request -are used for <CODE>%v</CODE> and <CODE>%p</CODE> respectively. This -happens regardless of the -<A HREF="core.html#usecanonicalname">UseCanonicalName</A> setting because -otherwise log analysis programs would have to duplicate the entire -vhost matching algorithm in order to decide what host really served -the request. - -<H2>Using Multiple Log Files</H2> - -The <CODE>TransferLog</CODE> and <CODE>CustomLog</CODE> directives can -be given more than once to log requests to multiple log files. Each -request will be logged to all the log files defined by either of these -directives. - -<H3>Use with Virtual Hosts</H3> - -If a <VirtualHost> section does not contain any -<TT>TransferLog</TT> or <TT>CustomLog</TT> directives, the -logs defined for the main server will be used. If it does -contain one or more of these directives, requests serviced by -this virtual host will only be logged in the log files defined -within its definition, not in any of the main server's log files. -See the examples below. -<P> - -<H2>Security Considerations</H2> - -See the <A HREF="../misc/security_tips.html#security">security tips</A> -document for details on why your security could be compromised if the -directory where logfiles are stored is writable by anyone other than -the user that starts the server. -<P> -<H2>Directives</H2> - -<UL> -<LI><A HREF="#cookielog">CookieLog</A> -<LI><A HREF="#customlog">CustomLog</A> -<LI><A HREF="#customlog-conditional">CustomLog (conditional)</A> -<LI><A HREF="#logformat">LogFormat</A> -<LI><A HREF="#transferlog">TransferLog</A> -</UL> -<HR> - - -<H2><A NAME="cookielog">CookieLog</A></H2> -<!--%plaintext <?INDEX {\tt CookieLog} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CookieLog <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_cookies<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Only available in Apache 1.2 and above<P> - -The CookieLog directive sets the filename for logging of cookies. -The filename is relative to the <A -HREF="core.html#serverroot">ServerRoot</A>. This directive is included -only for compatibility with -<A HREF="mod_cookies.html">mod_cookies</A>, and is deprecated. -<P> - -<HR> -<H2><A NAME="customlog">CustomLog</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CustomLog <EM>file-pipe</EM> - <EM>format-or-nickname</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Nickname only available in Apache 1.3 - or later -<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_log_config -<P> -The first argument is the filename to which log records should be -written. This is used -exactly like the argument to -<A - HREF="#transferlog" -><SAMP>TransferLog</SAMP></A>; -that is, it is either a full path or relative to the current -server root. -</P> -<P> -The format argument specifies a format for each line of the log file. -The options available for the format are exactly the same as for -the argument of the <TT>LogFormat</TT> directive. If the format -includes any spaces (which it will do in almost all cases) it -should be enclosed in double quotes. -</P> -<P> -Instead of an actual format string, you can use a format nickname defined with -the -<A - HREF="#logformat" -><SAMP>LogFormat</SAMP></A> -directive. -</P> - -<HR> -<H2><A NAME="customlog-conditional">CustomLog (conditional)</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CustomLog <EM>file-pipe</EM> - <EM>format-or-nickname</EM> - env=[!]<EM>environment-variable</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Only available in Apache 1.3.5 - or later -<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_log_config -<P> - -The behaviour of this form of the <SAMP>CustomLog</SAMP> directive is almost -identical to the <A HREF="#customlog">standard <CODE>CustomLog</CODE></A> -directive. The difference is that the '<CODE>env=</CODE>' clause controls -whether a particular request will be logged in the specified file or -not. If the specified environment variable is set for the -request (or is not set, in the case of a '<CODE>env=!<EM>name</EM></CODE>' -clause), then the request will be logged. -</P> -<P> -Environment variables can be set on a <EM>per</EM>-request basis -using the <A HREF="mod_setenvif.html">mod_setenvif</A> and/or -<A HREF="mod_rewrite.html">mod_rewrite</A> modules. For example, -if you don't want to record requests for all GIF images on -your server in a separate logfile but not your main log, you -can use: -</P> -<PRE> - SetEnvIf Request_URI \.gif$ gif-image - CustomLog gif-requests.log common env=gif-image - CustomLog nongif-requests.log common env=!gif-image -</PRE> - -<HR> -<H2><A NAME="logformat">LogFormat</A></H2> -<!--%plaintext <?INDEX {\tt LogFormat} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LogFormat <EM>format</EM> [<EM>nickname</EM>] -<BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>LogFormat "%h %l %u %t \"%r\" -%s %b"</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Nickname only available in Apache 1.3 - or later -<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_log_config -<P> -This sets the format of the default logfile named by the -<A - HREF="#transferlog" -><SAMP>TransferLog</SAMP></A> -directive . See the section on -<A HREF="#formats">Custom Log Formats</A> for details on the format -arguments. -</P> -<P> -If you include a nickname for the format on the directive line, you can -use it in other <SAMP>LogFormat</SAMP> and -<A HREF="#customlog"><SAMP>CustomLog</SAMP></A> -directives rather than repeating the entire format string. -</P> -<P> -A -<SAMP>LogFormat</SAMP> directive which defines a nickname <STRONG>does -nothing else</STRONG> -- that is, it <EM>only</EM> defines the nickname, -it doesn't actually apply the format and make it the default. -</P> - -<HR> - -<H2><A NAME="transferlog">TransferLog</A></H2> -<!--%plaintext <?INDEX {\tt TransferLog} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> TransferLog <EM>file-pipe</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> none<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_log_config<P> - -The TransferLog directive adds a log file in the format defined by the -most recent -<A - HREF="#logformat" -><SAMP>LogFormat</SAMP></A> -directive, or Common Log Format if no other default format has been -specified. -<EM>File-pipe</EM> is one -of -<DL><DT>A filename -<DD>A filename relative to the <A HREF="core.html#serverroot">ServerRoot</A>. -<DT> `|' followed by a command -<DD>A program to receive the agent log information on its standard input. -Note the a new program will not be started for a VirtualHost if it inherits -the TransferLog from the main server. -</DL> -<STRONG>Security:</STRONG> if a program is used, then it will be -run under the user who started httpd. This will be root if the server -was started by root; be sure that the program is secure.<P> - - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_log_referer.html b/docs/manual/mod/mod_log_referer.html deleted file mode 100644 index 017aecd801..0000000000 --- a/docs/manual/mod/mod_log_referer.html +++ /dev/null @@ -1,117 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_log_referer</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_log_referer</H1> - -This module is contained in the <CODE>mod_log_referer.c</CODE> file, and is not -compiled in by default. It provides for logging of the documents which -reference documents on the server. As of Apache 1.3.5 it is deprecated. -Use <A HREF="mod_log_config.html#customlog-conditional">CustomLog -(conditional)</A> instead. - -<H2>Log file format</H2> -The log file contains a separate line for each refer. Each line has the -format -<BLOCKQUOTE><EM>uri</EM> <CODE>-></CODE> <EM>document</EM></BLOCKQUOTE> -where <EM>uri</EM> is the (%-escaped) URI for the document that references -the one requested by the client, and <EM>document</EM> is the (%-decoded) -local URL to the document being referred to. - - -<H2>Directives</H2> -<UL> -<LI><A HREF="#refererignore">RefererIgnore</A> -<LI><A HREF="#refererlog">RefererLog</A> -</UL> -<HR> - - -<H2><A NAME="refererignore">RefererIgnore</A></H2> -<!--%plaintext <?INDEX {\tt RefererIgnore} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> RefererIgnore <EM>string string ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_log_referer<P> - -The RefererIgnore directive adds to the list of strings to ignore in -Referer headers. If any of the strings in the list is contained in -the Referer header, then no referrer information will be logged for the -request. Example: -<BLOCKQUOTE><CODE>RefererIgnore www.ncsa.uiuc.edu</CODE></BLOCKQUOTE> -This avoids logging references from www.ncsa.uiuc.edu. -<P><HR> - - -<H2><A NAME="refererlog">RefererLog</A></H2> -<!--%plaintext <?INDEX {\tt RefererLog} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> RefererLog <EM>file-pipe</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>RefererLog logs/referer_log</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_log_referer<P> - -The RefererLog directive sets the name of the file to which the server will -log the Referer header of incoming requests. <EM>File-pipe</EM> is one -of -<DL><DT>A filename -<DD>A filename relative to the <A HREF="core.html#serverroot">ServerRoot</A>. -<DT> `|' followed by a command -<DD>A program to receive the referrer log information on its standard input. -Note the a new program will not be started for a VirtualHost if it inherits -the RefererLog from the main server. -</DL> -<STRONG>Security:</STRONG> if a program is used, then it will be -run under the user who started httpd. This will be root if the server -was started by root; be sure that the program is secure.<P> - -<STRONG>Security:</STRONG> See the <A -HREF="../misc/security_tips.html">security tips</A> document for -details on why your security could be compromised if the directory -where logfiles are stored is writable by anyone other than the user -that starts the server.<P> - -This directive is provided for compatibility with NCSA 1.4.<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_mime.html b/docs/manual/mod/mod_mime.html deleted file mode 100644 index c222cab89b..0000000000 --- a/docs/manual/mod/mod_mime.html +++ /dev/null @@ -1,538 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_mime</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_mime</H1> - -This module is contained in the <CODE>mod_mime.c</CODE> file, and is -compiled in by default. It provides for determining the types of files -from the filename. - -<H2>Summary</H2> - -This module is used to determine various bits of "meta information" -about documents. This information relates to the content of the -document and is returned to the browser or used in content-negotiation -within the server. In addition, a "handler" can be set for a document, -which determines how the document will be processed within the server. - -<P> - -The directives <A HREF="#addencoding">AddEncoding</A>, <A -HREF="#addhandler">AddHandler</A>, <A -HREF="#addlanguage">AddLanguage</A> and <A HREF="#addtype">AddType</A> -are all used to map file extensions onto the meta-information for that -file. Respectively they set the content-encoding, handler, -content-language and MIME-type (content-type) of documents. The -directive <A HREF="#typesconfig">TypesConfig</A> is used to specify a -file which also maps extensions onto MIME types. The directives <A -HREF="#forcetype">ForceType</A> and <A -HREF="#sethandler">SetHandler</A> are used to associated all the files -in a given location (<EM>e.g.</EM>, a particular directory) onto a particular -MIME type or handler. - -<P> - -Note that changing the type or encoding of a file does not change the -value of the <CODE>Last-Modified</CODE> header. Thus, previously cached -copies may still be used by a client or proxy, with the previous headers. - -<H2><A NAME="multipleext">Files with Multiple Extensions</A></H2> - -Files can have more than one extension, and the order of the -extensions is <EM>normally</EM> irrelevant. For example, if the file -<CODE>welcome.html.fr</CODE> maps onto content type text/html and -language French then the file <CODE>welcome.fr.html</CODE> will map -onto exactly the same information. The only exception to this is if an -extension is given which Apache does not know how to handle. In this -case it will "forget" about any information it obtained from -extensions to the left of the unknown extension. So, for example, if -the extensions fr and html are mapped to the appropriate language and -type but extension xxx is not assigned to anything, then the file -<CODE>welcome.fr.xxx.html</CODE> will be associated with content-type -text/html but <EM>no</EM> language. - -<P> - -If more than one extension is given which maps onto the same type of -meta-information, then the one to the right will be used. For example, -if ".gif" maps to the MIME-type image/gif and ".html" maps to the -MIME-type text/html, then the file <CODE>welcome.gif.html</CODE> will -be associated with the MIME-type "text/html". - -<P> - -Care should be taken when a file with multiple extensions gets -associated with both a MIME-type and a handler. This will usually -result in the request being by the module associated with the -handler. For example, if the <CODE>.imap</CODE> extension is mapped to -the handler "imap-file" (from mod_imap) and the <CODE>.html</CODE> -extension is mapped to the MIME-type "text/html", then the file -<CODE>world.imap.html</CODE> will be associated with both the -"imap-file" handler and "text/html" MIME-type. When it is processed, -the "imap-file" handler will be used, and so it will be treated as a -mod_imap imagemap file. - -<H2>Directives</H2> -<UL> -<LI><A HREF="#addencoding">AddEncoding</A> -<LI><A HREF="#addhandler">AddHandler</A> -<LI><A HREF="#addlanguage">AddLanguage</A> -<LI><A HREF="#addtype">AddType</A> -<LI><A HREF="#defaultlanguage">DefaultLanguage</A> -<LI><A HREF="#forcetype">ForceType</A> -<LI><A HREF="#removehandler">RemoveHandler</A> -<LI><A HREF="#sethandler">SetHandler</A> -<LI><A HREF="#typesconfig">TypesConfig</A> -</UL> -<HR> - - -<H2><A NAME="addencoding">AddEncoding</A></H2> -<!--%plaintext <?INDEX {\tt AddEncoding} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddEncoding <EM>MIME-enc extension extension...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime<P> - -The AddEncoding directive maps the given filename extensions to the -specified encoding type. <EM>MIME-enc</EM> is the MIME encoding to use -for documents containing the <EM>extension</EM>. This mapping is added -to any already in force, overriding any mappings that already exist -for the same <EM>extension</EM>. - -Example: -<BLOCKQUOTE><CODE> AddEncoding x-gzip gz<BR> AddEncoding x-compress Z -</CODE></BLOCKQUOTE> - -This will cause filenames containing the .gz extension to be marked as -encoded using the x-gzip encoding, and filenames containing the .Z -extension to be marked as encoded with x-compress.<P> - -Old clients expect <CODE>x-gzip</CODE> and <CODE>x-compress</CODE>, -however the standard dictates that they're equivalent to <CODE>gzip</CODE> -and <CODE>compress</CODE> respectively. Apache does content encoding -comparisons by ignoring any leading <CODE>x-</CODE>. When responding -with an encoding Apache will use whatever form (<EM>i.e.</EM>, <CODE>x-foo</CODE> -or <CODE>foo</CODE>) the client requested. If the client didn't -specifically request a particular form Apache will use the form given by -the <CODE>AddEncoding</CODE> directive. To make this long story short, -you should always use <CODE>x-gzip</CODE> and <CODE>x-compress</CODE> -for these two specific encodings. More recent encodings, such as -<CODE>deflate</CODE> should be specified without the <CODE>x-</CODE>. - -<P> - -<STRONG>See also</STRONG>: <A HREF="#multipleext">Files with -multiple extensions</A> - -<P><HR> - -<H2><A NAME="addhandler">AddHandler</A></H2> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddHandler <EM>handler-name extension extension...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> AddHandler is only available in Apache -1.1 and later<P> - -<P>AddHandler maps the filename extensions <EM>extension</EM> to the -<A HREF="../handler.html">handler</A> <EM>handler-name</EM>. This -mapping is added to any already in force, overriding any mappings that -already exist for the same <EM>extension</EM>. - -For example, to activate CGI scripts -with the file extension "<CODE>.cgi</CODE>", you might use: -<PRE> - AddHandler cgi-script cgi -</PRE> - -<P>Once that has been put into your srm.conf or httpd.conf file, any -file containing the "<CODE>.cgi</CODE>" extension will be treated as a -CGI program.</P> - -<P> - -<STRONG>See also</STRONG>: <A HREF="#multipleext">Files with -multiple extensions</A> - -<HR> - -<H2><A NAME="addlanguage">AddLanguage</A></H2> -<!--%plaintext <?INDEX {\tt AddLanguage} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddLanguage <EM>MIME-lang extension extension...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime - -<P> -The AddLanguage directive maps the given filename extensions to the -specified content language. <EM>MIME-lang</EM> is the MIME language of -filenames containing <EM>extension</EM>. This mapping is added to any -already in force, overriding any mappings that already exist for the -same <EM>extension</EM>. -</P> -<P> -Example: <BLOCKQUOTE><CODE> -AddEncoding x-compress Z<BR> AddLanguage en .en<BR> AddLanguage fr -.fr<BR> </CODE></BLOCKQUOTE> -</P> -<P> -Then the document <CODE>xxxx.en.Z</CODE> will be treated as being a -compressed English document (as will the document -<CODE>xxxx.Z.en</CODE>). Although the content language is reported to -the client, the browser is unlikely to use this information. The -AddLanguage directive is more useful for -<A HREF="../content-negotiation.html">content negotiation</A>, where -the server returns one from several documents based on the client's -language preference. -</P> -<P> -If multiple language assignments are made for the same extension, -the last one encountered is the one that is used. That is, for the -case of: -</P> -<PRE> - AddLanguage en .en - AddLanguage en-uk .en - AddLanguage en-us .en -</PRE> -<P> -documents with the extension "<CODE>.en</CODE>" would be treated as -being "<CODE>en-us</CODE>". -</P> -<P> -<STRONG>See also</STRONG>: <A HREF="#multipleext">Files with -multiple extensions</A> -<BR> -<STRONG>See also</STRONG>: <A -HREF="./mod_negotiation.html">mod_negotiation</A> -</P> - -<HR> - -<H2><A NAME="addtype">AddType</A></H2> -<!--%plaintext <?INDEX {\tt AddType} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AddType <EM>MIME-type extension extension...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime<P> - -The AddType directive maps the given filename extensions onto the -specified content type. <EM>MIME-enc</EM> is the MIME type to use for -filenames containing <EM>extension</EM>. This mapping is added to any -already in force, overriding any mappings that already exist for the -same <EM>extension</EM>. This directive can be used to add mappings -not listed in the MIME types file (see the <CODE><A -HREF="#typesconfig">TypesConfig</A></CODE> directive). - -Example: -<BLOCKQUOTE><CODE> -AddType image/gif GIF -</CODE></BLOCKQUOTE> -It is recommended that new MIME types be added using the AddType directive -rather than changing the <A HREF="#typesconfig">TypesConfig</A> file.<P> -Note that, unlike the NCSA httpd, this directive cannot be used to set the -type of particular files.<P> - -<P> - -<STRONG>See also</STRONG>: <A HREF="#multipleext">Files with -multiple extensions</A> - -<HR> - -<H2><A NAME="defaultlanguage">DefaultLanguage</A></H2> -<!--%plaintext <?INDEX {\tt DefaultLanguage} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> DefaultLanguage <EM>MIME-lang</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime<P> - -The DefaultLanguage directive tells Apache that all files in the -directive's scope (<EM>e.g.</EM>, all files covered by the current -<CODE><Directory></CODE> container) that don't have an explicit -language extension (such as <SAMP>.fr</SAMP> or <SAMP>.de</SAMP> as -configured by <SAMP>AddLanguage</SAMP>) should be considered to be in -the specified <EM>MIME-lang</EM> language. This allows entire -directories to be marked as containing Dutch content, for instance, -without having to rename each file. Note that unlike using extensions -to specify languages, <SAMP>DefaultLanguage</SAMP> can only specify a -single language. - -<P> - -If no <SAMP>DefaultLanguage</SAMP> directive is in force, and a file -does not have any language extensions as configured by -<SAMP>AddLanguage</SAMP>, then that file will be considered to have no -language attribute. - -<P> - -<STRONG>See also</STRONG>: <A -HREF="./mod_negotiation.html">mod_negotiation</A> -<BR> -<STRONG>See also</STRONG>: <A HREF="#multipleext">Files with -multiple extensions</A> - -<HR> - -<H2><A NAME="forcetype">ForceType</A></H2> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ForceType <EM>media type</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ForceType is only available in Apache -1.1 and later.<P> - -<P>When placed into an <CODE>.htaccess</CODE> file or a -<CODE><Directory></CODE> or <CODE><Location></CODE> section, -this directive forces all matching files to be served -as the content type given by <EM>media type</EM>. For example, if you -had a directory full of GIF files, but did not want to label them all with -".gif", you might want to use: -<PRE> - ForceType image/gif -</PRE> -<P>Note that this will override any filename extensions that might determine -the media type.</P><HR> - -<H2><A NAME="removehandler">RemoveHandler</A></H2> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> RemoveHandler <EM>extension extension...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> RemoveHandler is only available in Apache -1.3.4 and later.<P> - -<P> -The <SAMP>RemoveHandler</SAMP> directive removes any -handler associations for files with the given extensions. -This allows <CODE>.htaccess</CODE> files in subdirectories to undo -any associations inherited from parent directories or the server -config files. An example of its use might be: -</P> -<DL> - <DT><CODE>/foo/.htaccess:</CODE></DT> - <DD><CODE>AddHandler server-parsed .html</CODE></DD> - <DT><CODE>/foo/bar/.htaccess:</CODE></DT> - <DD><CODE>RemoveHandler .html</CODE></DD> -</DL> -<P> -This has the effect of returning <SAMP>.html</SAMP> files in the -<SAMP>/foo/bar</SAMP> directory to being treated as normal -files, rather than as candidates for parsing (see the -<A HREF="mod_include.html"><SAMP>mod_include</SAMP></A> module). -</P> -<HR> - -<H2><A NAME="sethandler">SetHandler</A></H2> - -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> SetHandler <EM>handler-name</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> SetHandler is only available in Apache -1.1 and later.<P> - -<P>When placed into an <CODE>.htaccess</CODE> file or a -<CODE><Directory></CODE> or <CODE><Location></CODE> section, -this directive forces all matching files to be parsed through the -<A HREF="../handler.html">handler</A> -given by <EM>handler-name</EM>. For example, if you had a -directory you wanted to be parsed entirely as imagemap rule files, -regardless of extension, you might put the following into an -<CODE>.htaccess</CODE> file in that directory: -<PRE> - SetHandler imap-file -</PRE> - -<P>Another example: if you wanted to have the server display a status -report whenever a URL of <CODE>http://servername/status</CODE> was -called, you might put the following into access.conf: -<PRE> - <Location /status> - SetHandler server-status - </Location> -</PRE> -<HR> - -<H2><A NAME="typesconfig">TypesConfig</A></H2> -<!--%plaintext <?INDEX {\tt TypesConfig} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> TypesConfig <EM>filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>TypesConfig conf/MIME.types</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_mime<P> - -The TypesConfig directive sets the location of the MIME types configuration -file. <EM>Filename</EM> is relative to the -<A HREF="core.html#serverroot">ServerRoot</A>. This file sets the default list of -mappings from filename extensions to content types; changing this file is not -recommended. Use the <A HREF="#addtype">AddType</A> directive instead. The -file contains lines in the format of the arguments to an AddType command: -<BLOCKQUOTE><EM>MIME-type extension extension ...</EM></BLOCKQUOTE> -The extensions are lower-cased. Blank lines, and lines beginning with a hash -character (`#') are ignored.<P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_mime_magic.html b/docs/manual/mod/mod_mime_magic.html deleted file mode 100644 index a85e6b46b5..0000000000 --- a/docs/manual/mod/mod_mime_magic.html +++ /dev/null @@ -1,275 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Apache module mod_mime_magic</TITLE> - </HEAD> - <!-- Background white, links blue (unvisited), navy (visited), red (active) --> - <BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" - > - <DIV ALIGN="CENTER"> - <IMG SRC="../images/sub.gif" ALT="[APACHE DOCUMENTATION]"> - </DIV> - - <H1 align="CENTER">Module mod_mime_magic</H1> - - This module is contained in the mod_mime_magic.c file, and is - an optional extension to the Apache HTTPD server. - It can be used to determine the MIME type of a file by looking at a - few bytes of its contents, the same way the Unix file(1) command works. - To use mod_mime_magic you have to enable the following line in the - server build <TT>Configuration</TT> file: - - <PRE> - AddModule modules/standard/mod_mime_magic.o - </PRE> - - This should be listed <EM>before</EM> mod_mime in the build - <TT>Configuration</TT> file so that it will be used after mod_mime. - mod_mime_magic is intended as a "second line of defense" for cases - mod_mime cannot resolve. - - <H2>Summary</H2> - - This module is derived from a free version of the <CODE>file(1)</CODE> - command for Unix, - which uses "magic numbers" and other hints from a file's contents to - figure out what the contents are. - In the case of this module, - it tries to figure out the MIME type of the file. - <P> - This module active only if the magic file is specified by the - <A HREF="#mimemagicfile"><CODE>MimeMagicFile</CODE></A> directive. - <P> - The contents of the file are plain ASCII text in 4-5 columns. - Blank lines are allowed but ignored. - Commented lines use a hash mark "#". - The remaining lines are parsed for the following columns: - <table border=1> - <tr valign=top> - <TH>Column</TH> - <TH>Description</TH> - </TR> - <tr valign=top> - <TD>1</TD> - <TD>byte number to begin checking from - <BR> - ">" indicates a dependency upon the previous non-">" line</TD> - </TR><tr valign=top> - <TD>2</TD> - <TD>type of data to match - <table border=1> - <TR><TD>byte</TD><TD>single character</TD></TR> - <TR><TD>short</TD><TD>machine-order 16-bit integer</TD></TR> - <TR><TD>long</TD><TD>machine-order 32-bit integer</TD></TR> - <TR><TD>string</TD><TD>arbitrary-length string</TD></TR> - <TR><TD>date</TD><TD>long integer date - (seconds since Unix epoch/1970)</TD></TR> - <TR><TD>beshort</TD><TD>big-endian 16-bit integer</TD></TR> - <TR><TD>belong</TD><TD>big-endian 32-bit integer</TD></TR> - <TR><TD>bedate</TD><TD>big-endian 32-bit integer date</TD></TR> - <TR><TD>leshort</TD><TD>little-endian 16-bit integer</TD></TR> - <TR><TD>lelong</TD><TD>little-endian 32-bit integer</TD></TR> - <TR><TD>ledate</TD><TD>little-endian 32-bit integer date</TD></TR> - </TABLE> - </TD> - </TR><tr valign=top> - <TD>3</TD> - <TD>contents of data to match</TD> - </TR><tr valign=top> - <TD>4</TD> - <TD>MIME type if matched</TD> - </TR><tr valign=top> - <TD>5</TD> - <TD>MIME encoding if matched (optional)</TD> - </TR> - </TABLE> - - <P> - For example, the following magic file lines - would recognize some audio formats. - -<PRE> -# Sun/NeXT audio data -0 string .snd ->12 belong 1 audio/basic ->12 belong 2 audio/basic ->12 belong 3 audio/basic ->12 belong 4 audio/basic ->12 belong 5 audio/basic ->12 belong 6 audio/basic ->12 belong 7 audio/basic ->12 belong 23 audio/x-adpcm -</PRE> - - Or these would recognize the difference between "*.doc" files containing - Microsoft Word or FrameMaker documents. (These are incompatible file - formats which use the same file suffix.) - -<PRE> -# Frame -0 string \<MakerFile application/x-frame -0 string \<MIFFile application/x-frame -0 string \<MakerDictionary application/x-frame -0 string \<MakerScreenFon application/x-frame -0 string \<MML application/x-frame -0 string \<Book application/x-frame -0 string \<Maker application/x-frame - -# MS-Word -0 string \376\067\0\043 application/msword -0 string \320\317\021\340\241\261 application/msword -0 string \333\245-\0\0\0 application/msword -</PRE> - - An optional MIME encoding can be included as a fifth column. - For example, this can recognize gzipped files and set the encoding - for them. - -<PRE> -# gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver) -0 string \037\213 application/octet-stream x-gzip -</PRE> - - <H3>Performance Issues</H3> - - This module is not for every system. If your system is barely keeping - up with its load or if you're performing a web server benchmark, - you may not want to enable this because the processing is not free. - <P> - However, an effort was made to improve the performance of the original - file(1) code to make it fit in a busy web server. - It was designed for a server where there are thousands of users who - publish their own documents. - This is probably very common on intranets. - Many times, it's helpful - if the server can make more intelligent decisions about a file's - contents than the file name allows - ...even if just to reduce the "why doesn't my page work" calls - when users improperly name their own files. - You have to decide if the extra work suits your environment. - <P> - When compiling an Apache server, this module should be at or near the - top of the list of modules in the Configuration file. The modules are - listed in increasing priority so that will mean this one is used only - as a last resort, just like it was designed to. - - <H2>Directives</H2> - <P> - <UL> - <LI><A HREF="#mimemagicfile">MimeMagicFile</A> - </LI> - </UL> - </P> - <HR> - <H2><A NAME="mimemagicfile"> - MimeMagicFile - </A></H2> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> MimeMagicFile <EM>magic-file-name</EM> - <BR> - <A - HREF="directive-dict.html#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> none - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config, virtual host - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Extension - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_mime_magic - <P> - - The <CODE>MimeMagicFile</CODE> directive can be used to enable this module, - the default file is distributed at <CODE>conf/magic</CODE>. - Non-rooted paths are relative to the ServerRoot. Virtual hosts - will use the same file as the main server unless a more specific setting - is used, in which case the more specific setting overrides the main server's - file. - <P> - <HR> - - <H2><A NAME="notes">Notes</A></H2> - - The following notes apply to the mod_mime_magic module and are - included here for compliance with contributors' copyright restrictions - that require their acknowledgment. - -<PRE> -/* - * mod_mime_magic: MIME type lookup via file magic numbers - * Copyright (c) 1996-1997 Cisco Systems, Inc. - * - * This software was submitted by Cisco Systems to the Apache Group in July - * 1997. Future revisions and derivatives of this source code must - * acknowledge Cisco Systems as the original contributor of this module. - * All other licensing and usage conditions are those of the Apache Group. - * - * Some of this code is derived from the free version of the file command - * originally posted to comp.sources.unix. Copyright info for that program - * is included below as required. - * --------------------------------------------------------------------------- - * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. - * - * This software is not subject to any license of the American Telephone and - * Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on any - * computer system, and to alter it and redistribute it freely, subject to - * the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. - * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, credits - * must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users ever read - * sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. - * ------------------------------------------------------------------------- - * - * For compliance with Mr Darwin's terms: this has been very significantly - * modified from the free "file" command. - * - all-in-one file for compilation convenience when moving from one - * version of Apache to the next. - * - Memory allocation is done through the Apache API's pool structure. - * - All functions have had necessary Apache API request or server - * structures passed to them where necessary to call other Apache API - * routines. (<EM>i.e.</EM>, usually for logging, files, or memory allocation in - * itself or a called function.) - * - struct magic has been converted from an array to a single-ended linked - * list because it only grows one record at a time, it's only accessed - * sequentially, and the Apache API has no equivalent of realloc(). - * - Functions have been changed to get their parameters from the server - * configuration instead of globals. (It should be reentrant now but has - * not been tested in a threaded environment.) - * - Places where it used to print results to stdout now saves them in a - * list where they're used to set the MIME type in the Apache request - * record. - * - Command-line flags have been removed since they will never be used here. - * - */ -</PRE> - - </BODY> -</HTML> diff --git a/docs/manual/mod/mod_mmap_static.html b/docs/manual/mod/mod_mmap_static.html deleted file mode 100644 index 07ed6b7350..0000000000 --- a/docs/manual/mod/mod_mmap_static.html +++ /dev/null @@ -1,142 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Apache module mod_mmap_static</TITLE> - </HEAD> -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> - <BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" - > -<!--#include virtual="header.html" --> - <H1 ALIGN="CENTER">Module mod_mmap_static</H1> - - <P> - This module is contained in the <CODE>mod_mmap_static.c</CODE> file, with - Apache 1.3 and later. It provides mmap()ing of a statically configured list - of frequently requested but not changed files. It is not compiled into the - server by default. To use <CODE>mod_mmap_static</CODE> you have to enable - the following line in the server build <CODE>Configuration</CODE> file: - <PRE> - AddModule modules/experimental/mod_mmap_static.o - </PRE> - </P> - - <H2>Summary</H2> - <P> - This is an <STRONG>experimental</STRONG> module and should be used with - care. You can easily create a broken site using this module, read this - document carefully. - <CODE>mod_mmap_static</CODE> maps a list of statically configured files (via - <CODE>MMapFile</CODE> directives in the main server configuration) into - memory through the system call <CODE>mmap()</CODE>. This system - call is available on most modern Unix derivates, but not on all. There - are sometimes system-specific limits on the size and number of files that - can be mmap()d, experimentation is probably the easiest way to find out. - </P> - <P> - This mmap()ing is done once at server start or restart, only. So whenever - one of the mapped files changes on the filesystem you <EM>have</EM> to - restart the server by at least sending it a HUP or USR1 signal (see the - <A HREF="../stopping.html">Stopping and Restarting</A> documentation). To - reiterate that point: if the files are modified <EM>in place</EM> without - restarting the server you may end up serving requests that are completely - bogus. You should update files by unlinking the old copy and putting a new - copy in place. Most tools such as <CODE>rdist</CODE> and <CODE>mv</CODE> do - this. The reason why this modules doesn't take care of changes to the files - is that this check would need an extra <CODE>stat()</CODE> every time which - is a waste and against the intent of I/O reduction. - </P> - - <H2>Directives</H2> - <UL> - <LI><A HREF="#mmapfile">MMapFile</A> - </LI> - </UL> - - <HR> - - <H2><A NAME="mmapfile">MMapFile</A></H2> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> MMapFile <EM>filename ...</EM> - <BR> - <A - HREF="directive-dict.html#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> <EM>None</EM> - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server-config - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> <EM>Not applicable</EM> - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Experimental - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_mmap_static - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> Only available in Apache 1.3 or later - - <P> - The <CODE>MMapFile</CODE> directive maps one or more files (given as - whitespace separated arguments) into memory at server startup time. They - are automatically unmapped on a server shutdown. When the files have changed - on the filesystem at least a HUP or USR1 signal should be send to the server - to re-mmap them. - </P> - - <P> - Be careful with the <EM>filename</EM> arguments: They have to literally - match the filesystem path Apache's URL-to-filename translation handlers - create. We cannot compare inodes or other stuff to match paths through - symbolic links <EM>etc.</EM> because that again would cost extra <CODE>stat()</CODE> - system calls which is not acceptable. This module may or may not work - with filenames rewritten by <CODE>mod_alias</CODE> or - <CODE>mod_rewrite</CODE>... it is an experiment after all. - </P> - - <P> - Notice: You cannot use this for speeding up CGI programs or other files - which are served by special content handlers. It can only be used for - regular files which are usually served by the Apache core content handler. - </P> - - Example: - - <PRE> - MMapFile /usr/local/apache/htdocs/index.html - </PRE> - - <P> - <STRONG>Note</STRONG>: don't bother asking for a for a <CODE>MMapDir</CODE> - directive which - recursively maps all the files in a directory. Use Unix the way it was - meant to be used. For example, see the - <A HREF="core.html#include">Include</A> directive, and consider this command: - <PRE> - find /www/htdocs -type f -print \ - | sed -e 's/.*/mmapfile &/' > /www/conf/mmap.conf - </PRE> - -<!--#include virtual="footer.html" --> - </BODY> -</HTML> diff --git a/docs/manual/mod/mod_negotiation.html b/docs/manual/mod/mod_negotiation.html deleted file mode 100644 index 96222acb22..0000000000 --- a/docs/manual/mod/mod_negotiation.html +++ /dev/null @@ -1,201 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_negotiation</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_negotiation</H1> - -This module is contained in the <CODE>mod_negotiation.c</CODE> file, -and is compiled in by default. It provides for <A -HREF="../content-negotiation.html">content negotiation</A>. - -<H2>Summary</H2> -Content negotiation, or more accurately content selection, is the -selection of the document that best matches the clients -capabilities, from one of several available documents. -There are two implementations of this. -<UL> -<LI> A type map (a file with the handler <CODE>type-map</CODE>) -which explicitly lists the files containing the variants. -<LI> A MultiViews search (enabled by the MultiViews -<A HREF="core.html#options">Option</A>, where the server does an implicit -filename pattern match, and choose from amongst the results. -</UL> - -<H3>Type maps</H3> -A type map has the same format as RFC822 mail headers. It contains document -descriptions separated by blank lines, with lines beginning with a hash -character ('#') treated as comments. A document description consists of -several header records; records may be continued on multiple lines if the -continuation lines start with spaces. The leading space will be deleted -and the lines concatenated. A header record consists of a keyword -name, which always ends in a colon, followed by a value. Whitespace is allowed -between the header name and value, and between the tokens of value. - -The headers allowed are: - -<DL> -<DT>Content-Encoding: -<DD>The encoding of the file. Apache only recognizes encodings that are -defined by an <A HREF="mod_mime.html#addencoding">AddEncoding</A> directive. -This normally includes the encodings <CODE>x-compress</CODE> for compress'd -files, and <CODE>x-gzip</CODE> for gzip'd files. The <CODE>x-</CODE> prefix -is ignored for encoding comparisons. -<DT>Content-Language: -<DD>The language of the variant, as an Internet standard language tag -(RFC 1766). An example is <CODE>en</CODE>, meaning English. -<DT>Content-Length: -<DD>The length of the file, in bytes. If this header is not present, then -the actual length of the file is used. -<DT>Content-Type: -<DD>The MIME media type of the document, with optional parameters. -Parameters are separated from the media type and from one another by a -semi-colon, with a syntax of <CODE>name=value</CODE>. Common parameters -include: -<DL> -<DT>level -<DD>an integer specifying the version of the media type. -For <CODE>text/html</CODE> this defaults to 2, otherwise 0. -<DT>qs -<DD>a floating-point number with a value in the range 0.0 to 1.0, - indicating the relative 'quality' of this variant - compared to the other available variants, independent of the client's - capabilities. For example, a jpeg file is usually of higher source - quality than an ascii file if it is attempting to represent a - photograph. However, if the resource being represented is ascii art, - then an ascii file would have a higher source quality than a jpeg file. - All qs values are therefore specific to a given resource. -</DL> -Example: -<BLOCKQUOTE><CODE>Content-Type: image/jpeg; qs=0.8</CODE></BLOCKQUOTE> -<DT>URI: -<DD>The path to the file containing this variant, relative to the map file. -</DL> - -<H3>MultiViews</H3> -A MultiViews search is enabled by the MultiViews -<A HREF="core.html#options">Option</A>. -If the server receives a request for <CODE>/some/dir/foo</CODE> and -<CODE>/some/dir/foo</CODE> does <EM>not</EM> exist, then the server reads the -directory looking for all files named <CODE>foo.*</CODE>, and effectively -fakes up a type map which names all those files, assigning them the same media -types and content-encodings it would have if the client had asked for -one of them by name. It then chooses the best match to the client's -requirements, and returns that document.<P> - - - -<H2>Directives</H2> -<UL> -<LI><A HREF="#cachenegotiateddocs">CacheNegotiatedDocs</A> -<LI><A HREF="#languagepriority">LanguagePriority</A> -</UL> - -<STRONG>See also</STRONG>: -<A HREF="./mod_mime.html#defaultlanguage">DefaultLanguage</A>, -<A HREF="./mod_mime.html#addencoding">AddEncoding</A>, -<A HREF="./mod_mime.html#addlanguage">AddLanguage</A>, -<A HREF="./mod_mime.html#addtype">AddType</A>, and -<A HREF="core.html#options">Option</A>. - -<HR> - - -<H2><A NAME="cachenegotiateddocs">CacheNegotiatedDocs</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheNegotiatedDocs<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_negotiation<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheNegotiatedDocs is only available -in Apache 1.1 and later.<P> - -<P>If set, this directive allows content-negotiated documents to be -cached by proxy servers. This could mean that clients behind those -proxys could retrieve versions of the documents that are not the best -match for their abilities, but it will make caching more -efficient. -<P> - -This directive only applies to requests which come from HTTP/1.0 browsers. -HTTP/1.1 provides much better control over the caching of negotiated -documents, and this directive has no effect in responses to -HTTP/1.1 requests. - - - -<H2><A NAME="languagepriority">LanguagePriority</A></H2> -<!--%plaintext <?INDEX {\tt LanguagePriority} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LanguagePriority <EM>MIME-lang MIME-lang...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_negotiation<P> - -The LanguagePriority sets the precedence of language variants for the case -where the client does not express a preference, when handling a -MultiViews request. The list of <EM>MIME-lang</EM> are in order of decreasing -preference. Example: - -<BLOCKQUOTE><CODE>LanguagePriority en fr de</CODE></BLOCKQUOTE> - -For a request for <CODE>foo.html</CODE>, where <CODE>foo.html.fr</CODE> -and <CODE>foo.html.de</CODE> both existed, but the browser did not express -a language preference, then <CODE>foo.html.fr</CODE> would be returned.<P> - -<P> - -Note that this directive only has an effect if a 'best' language -cannot be determined by any other means. Correctly implemented -HTTP/1.1 requests will mean this directive has no effect. - -<P> - -<STRONG>See also</STRONG>: -<A HREF="./mod_mime.html#defaultlanguage">DefaultLanguage</A> and -<A HREF="./mod_mime.html#addlanguage">AddLanguage</A> - - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_proxy.html b/docs/manual/mod/mod_proxy.html deleted file mode 100644 index 98b7d9029f..0000000000 --- a/docs/manual/mod/mod_proxy.html +++ /dev/null @@ -1,1161 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_proxy</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Apache module mod_proxy</H1> - -This module is contained in the <CODE>mod_proxy.c</CODE> file for Apache 1.1.x, -or the <CODE>modules/proxy</CODE> subdirectory for Apache 1.2, and -is not compiled in by default. It provides for an <STRONG>HTTP -1.0</STRONG> caching proxy -server. It is only available in Apache 1.1 and later. Common configuration -questions are addressed <A HREF="#configs">after the directive -descriptions</A>. - -<H3>Note:</H3> -<P>This module was experimental in Apache 1.1.x. As of Apache 1.2, mod_proxy -stability is <EM>greatly</EM> improved.<P> - -<H2>Summary</H2> - -This module implements a proxy/cache for Apache. It implements -proxying capability for -<CODE>FTP</CODE>, -<CODE>CONNECT</CODE> (for SSL), -<CODE>HTTP/0.9</CODE>, and -<CODE>HTTP/1.0</CODE>. -The module can be configured to connect to other proxy modules for these -and other protocols. - -<H2>Directives</H2> -<UL> -<LI><A HREF="#proxyrequests">ProxyRequests</A> -<LI><A HREF="#proxyremote">ProxyRemote</A> -<LI><A HREF="#proxypass">ProxyPass</A> -<LI><A HREF="#proxypassreverse">ProxyPassReverse</A> -<LI><A HREF="#proxyblock">ProxyBlock</A> -<LI><A HREF="#allowconnect">AllowCONNECT</A> -<LI><A HREF="#proxyreceivebuffersize">ProxyReceiveBufferSize</A> -<LI><A HREF="#noproxy">NoProxy</A> -<LI><A HREF="#proxydomain">ProxyDomain</A> -<LI><A HREF="#proxyvia">ProxyVia</A> -<LI><A HREF="#cacheroot">CacheRoot</A> -<LI><A HREF="#cachesize">CacheSize</A> -<LI><A HREF="#cachemaxexpire">CacheMaxExpire</A> -<LI><A HREF="#cachedefaultexpire">CacheDefaultExpire</A> -<LI><A HREF="#cachelastmodifiedfactor">CacheLastModifiedFactor</A> -<LI><A HREF="#cachegcinterval">CacheGcInterval</A> -<LI><A HREF="#cachedirlevels">CacheDirLevels</A> -<LI><A HREF="#cachedirlength">CacheDirLength</A> -<LI><A HREF="#cacheforcecompletion">CacheForceCompletion</A> -<LI><A HREF="#nocache">NoCache</A> -</UL> - -<HR> - -<H2><A NAME="proxyrequests">ProxyRequests</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ProxyRequests <EM>on/off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ProxyRequests Off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ProxyRequests is only available in -Apache 1.1 and later.<P> - -This allows or prevents Apache from functioning as a proxy -server. Setting ProxyRequests to 'off' does not disable use of the <A -HREF="#proxypass">ProxyPass</A> directive. - -<HR> - -<H2><A NAME="proxyremote">ProxyRemote</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ProxyRemote <EM><match> <remote-server></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ProxyRemote is only available in -Apache 1.1 and later.<P> - -This defines remote proxies to this proxy. <match> is either the -name of a URL-scheme that the remote server supports, or a partial URL -for which the remote server should be used, or '*' to indicate the -server should be contacted for all requests. <remote-server> is a -partial URL for the remote server. Syntax: - -<PRE> - <remote-server> = <protocol>://<hostname>[:port] -</PRE> - -<protocol> is the protocol that should be used to communicate -with the remote server; only "http" is supported by this module. -<P> -Example: -<PRE> - ProxyRemote http://goodguys.com/ http://mirrorguys.com:8000 - ProxyRemote * http://cleversite.com - ProxyRemote ftp http://ftpproxy.mydomain.com:8080 -</PRE> - -In the last example, the proxy will forward FTP requests, encapsulated -as yet another HTTP proxy request, to another proxy which can handle -them. - -<HR> - -<H2><A NAME="proxypass">ProxyPass</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ProxyPass <EM><path> <url></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ProxyPass is only available in -Apache 1.1 and later.<P> - -This directive allows remote servers to be mapped into the space of the local -server; the local server does not act as a proxy in the conventional sense, -but appears to be a mirror of the remote server. <path> is the name of -a local virtual path; <url> is a partial URL for the remote server. -<P> -Suppose the local server has address <SAMP>http://wibble.org/</SAMP>; then -<PRE> - ProxyPass /mirror/foo/ http://foo.com/ -</PRE> -will cause a local request for the -<<SAMP>http://wibble.org/mirror/foo/bar</SAMP>> to be -internally converted into a proxy request to -<<SAMP>http://foo.com/bar</SAMP>>. - -<HR> - -<H2><A NAME="proxypassreverse">ProxyPassReverse</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ProxyPassReverse <EM><path> <url></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ProxyPassReverse is only available in -Apache 1.3b6 and later.<P> - -This directive lets Apache adjust the URL in the <TT>Location</TT> header on -HTTP redirect responses. For instance this is essential when Apache is used as -a reverse proxy to avoid by-passing the reverse proxy because of HTTP -redirects on the backend servers which stay behind the reverse proxy. -<P> -<path> is the name of a local virtual path.<BR> -<url> is a partial URL for the remote server - the same way they are -used for the <TT>ProxyPass</TT> directive. -<P> -Example:<BR> -Suppose the local server has address <SAMP>http://wibble.org/</SAMP>; then -<PRE> - ProxyPass /mirror/foo/ http://foo.com/ - ProxyPassReverse /mirror/foo/ http://foo.com/ -</PRE> -will not only cause a local request for the -<<SAMP>http://wibble.org/mirror/foo/bar</SAMP>> to be internally -converted into a proxy request to <<SAMP>http://foo.com/bar</SAMP>> (the -functionality <SAMP>ProxyPass</SAMP> provides here). It also takes care of -redirects the server foo.com sends: when <SAMP>http://foo.com/bar</SAMP> is -redirected by him to <SAMP>http://foo.com/quux</SAMP> Apache adjusts this to -<SAMP>http://wibble.org/mirror/foo/quux</SAMP> before forwarding the HTTP -redirect response to the client. -<P> -Note that this <SAMP>ProxyPassReverse</SAMP> directive can also be used in -conjunction with the proxy pass-through feature ("<SAMP>RewriteRule ... -[P]</SAMP>") from -<A - HREF="mod_rewrite.html#RewriteRule" -><TT>mod_rewrite</TT></A> because its doesn't depend on a corresponding -<SAMP>ProxyPass</SAMP> directive. - -<HR> - -<H2><A NAME="allowconnect">AllowCONNECT</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> AllowCONNECT <EM><port list></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM><SAMP>AllowCONNECT</SAMP> 443 563</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> <SAMP>AllowCONNECT</SAMP> is only -available in Apache 1.3.2 and later.<P> - -The <SAMP>AllowCONNECT</SAMP> directive specifies a list of port numbers -to which the proxy <SAMP>CONNECT</SAMP> method may connect. -Today's browsers use this method when a <EM>https</EM> connection -is requested and proxy tunneling over <EM>http</EM> is in effect.<BR> -By default, only the default https port (443) and the default -snews port (563) are enabled. Use the <SAMP>AllowCONNECT</SAMP> -directive to overrride this default and allow connections to the -listed ports only. - -<HR> - -<H2><A NAME="proxyblock">ProxyBlock</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ProxyBlock <EM><word/host/domain list></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ProxyBlock is only available in -Apache 1.2 and later.<P> - -The ProxyBlock directive specifies a list of words, hosts and/or domains, -separated by spaces. HTTP, HTTPS, and FTP document requests to matched words, -hosts or domains are <EM>blocked</EM> by the proxy server. The proxy module -will also attempt to determine IP addresses of list items which may be -hostnames during startup, and cache them for match test as well. Example: - -<PRE> - ProxyBlock joes-garage.com some-host.co.uk rocky.wotsamattau.edu -</PRE> - -'rocky.wotsamattau.edu' would also be matched if referenced by IP address.<P> - -Note that 'wotsamattau' would also be sufficient to match 'wotsamattau.edu'.<P> - -Note also that - -<PRE> -ProxyBlock * -</PRE> - -blocks connections to all sites. - -<HR> - -<H2><A NAME="proxyreceivebuffersize">ProxyReceiveBufferSize</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ProxyReceiveBufferSize <EM><bytes></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ProxyReceiveBufferSize is only available in -Apache 1.3 and later.<P> - -The ProxyReceiveBufferSize directive specifies an explicit network buffer size -for outgoing HTTP and FTP connections, for increased throughput. It has to be -greater than 512 or set to 0 to indicate that the system's default buffer size -should be used. - -<P> -Example: - -<PRE> - ProxyReceiveBufferSize 2048 -</PRE> - -<HR> - -<H2><A NAME="noproxy">NoProxy</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> NoProxy { <A HREF="#domain"><EM><Domain></EM></A> - | <A HREF="#subnet"><EM><SubNet></EM></A> - | <A HREF="#ipaddr"><EM><IpAddr></EM></A> - | <A HREF="#hostname"><EM><Hostname></EM></A> - } <BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> NoProxy is only available in -Apache 1.3 and later.<P> - -This directive is only useful for Apache proxy servers within intranets. -The NoProxy directive specifies a list of subnets, IP addresses, hosts -and/or domains, separated by spaces. A request to a host which matches -one or more of these is always served directly, without forwarding to -the configured ProxyRemote proxy server(s). -<P> -Example: - -<PRE> - ProxyRemote * http://firewall.mycompany.com:81 - NoProxy .mycompany.com 192.168.112.0/21 -</PRE> -The arguments to the NoProxy directive are one of the following type list: - <DL> - <!-- ===================== Domain ======================= --> - <A NAME="domain"> - <DT><EM>Domain</EM></A> - <DD>A <EM>Domain</EM> is a partially qualified DNS domain name, preceded - by a period. - It represents a list of hosts which logically belong to the same DNS - domain or zone (<EM>i.e.</EM>, the suffixes of the hostnames are all ending in - <EM>Domain</EM>).<BR> - Examples: <SAMP>.com</SAMP> <SAMP>.apache.org.</SAMP><BR> - To distinguish <EM>Domain</EM>s from <A HREF="#hostname"><EM>Hostname</EM></A>s (both - syntactically and semantically; a DNS domain can have a DNS A record, - too!), <EM>Domain</EM>s are always written - with a leading period.<BR> - Note: Domain name comparisons are done without regard to the case, - and <EM>Domain</EM>s are always assumed to be anchored in the root - of the DNS tree, therefore two domains <SAMP>.MyDomain.com</SAMP> and - <SAMP>.mydomain.com.</SAMP> (note the trailing period) are - considered equal. Since a domain comparison does not involve a DNS - lookup, it is much more efficient than subnet comparison. - - <!-- ===================== SubNet ======================= --> - <A NAME="subnet"> - <DT><EM>SubNet</EM></A> - <DD>A <EM>SubNet</EM> is a partially qualified internet address in - numeric (dotted quad) form, optionally followed by a slash and the - netmask, specified as the number of significant bits in the - <EM>SubNet</EM>. It is used to represent a subnet of hosts which can - be reached over a common network interface. In the absence of the - explicit net mask it is assumed that omitted (or zero valued) - trailing digits specify the mask. (In this case, the netmask can - only be multiples of 8 bits wide.)<BR> - Examples: - <DL> - <DT><SAMP>192.168</SAMP> or <SAMP>192.168.0.0</SAMP> - <DD>the subnet 192.168.0.0 with an implied netmask of 16 valid bits - (sometimes used in the netmask form <SAMP>255.255.0.0</SAMP>) - <DT><SAMP>192.168.112.0/21</SAMP> - <DD>the subnet <SAMP>192.168.112.0/21</SAMP> with a netmask of 21 - valid bits (also used in the form 255.255.248.0) - </DL> - As a degenerate case, a <EM>SubNet</EM> with 32 valid bits is the - equivalent to an <EM>IPAddr</EM>, while a <EM>SubNet</EM> with zero - valid bits (<EM>e.g.</EM>, 0.0.0.0/0) is the same as the constant - <EM>_Default_</EM>, matching any IP address. - - <!-- ===================== IPAddr ======================= --> - <A NAME="ipaddr"> - <DT><EM>IPAddr</EM></A> - <DD>A <EM>IPAddr</EM> represents a fully qualified internet address in - numeric (dotted quad) form. Usually, this address represents a - host, but there need not necessarily be a DNS domain name - connected with the address.<BR> - Example: 192.168.123.7<BR> - Note: An <EM>IPAddr</EM> does not need to be resolved by the DNS - system, so it can result in more effective apache performance. - <P><STRONG>See Also:</STRONG> - <A HREF="../dns-caveats.html">DNS Issues</A></P> - - <!-- ===================== Hostname ======================= --> - <A NAME="hostname"> - <DT><EM>Hostname</EM></A> - <DD>A <EM>Hostname</EM> is a fully qualified DNS domain name which can - be resolved to one or more <A - HREF="#ipaddr"><EM>IPAddrs</EM></A> via the DNS domain name service. - It represents a logical host (in contrast to - <A HREF="#domain"><EM>Domain</EM></A>s, see - above) and must be resolvable to at least one <A - HREF="#ipaddr"><EM>IPAddr</EM></A> (or often to a list of hosts - with different <A HREF="#ipaddr"><EM>IPAddr</EM></A>'s).<BR> - Examples: <SAMP>prep.ai.mit.edu</SAMP> - <SAMP>www.apache.org.</SAMP><BR> - Note: In many situations, it is more effective to specify an - <A HREF="#ipaddr"><EM>IPAddr</EM></A> in place of a - <EM>Hostname</EM> since a DNS lookup - can be avoided. Name resolution in Apache can take a remarkable deal - of time when the connection to the name server uses a slow PPP - link.<BR> - Note: <EM>Hostname</EM> comparisons are done without regard to the case, - and <EM>Hostname</EM>s are always assumed to be anchored in the root - of the DNS tree, therefore two hosts <SAMP>WWW.MyDomain.com</SAMP> - and <SAMP>www.mydomain.com.</SAMP> (note the trailing period) are - considered equal.<BR> -<P><STRONG>See Also:</STRONG> -<A HREF="../dns-caveats.html">DNS Issues</A></P> - </DL> - -<HR> - -<H2><A NAME="proxydomain">ProxyDomain</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ProxyDomain <EM><Domain></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ProxyDomain is only available in -Apache 1.3 and later.<P> - -This directive is only useful for Apache proxy servers within intranets. -The ProxyDomain directive specifies the default domain which the apache -proxy server will belong to. If a request to a host without a domain name -is encountered, a redirection response to the same host -with the configured <EM>Domain</EM> appended will be generated. -<P> -Example: - -<PRE> - ProxyRemote * http://firewall.mycompany.com:81 - NoProxy .mycompany.com 192.168.112.0/21 - ProxyDomain .mycompany.com -</PRE> - -<HR> - -<H2><A NAME="proxyvia">ProxyVia</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ProxyVia { <EM>off</EM> - | <EM>on</EM> - | <EM>full</EM> - | <EM>block</EM> - }<BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>ProxyVia off</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ProxyVia is only available in -Apache 1.3.2 and later.<P> - -This directive controls the use of the <SAMP>Via:</SAMP> HTTP header -by the proxy. Its intended use is to control the flow of of proxy -requests along a chain of proxy servers. -See RFC2068 (HTTP/1.1) for an explanation of <SAMP>Via:</SAMP> header lines.<UL> -<LI>If set to <EM>off</EM>, which is the default, no special -processing is performed. If a request or reply contains a <SAMP>Via:</SAMP> header, -it is passed through unchanged. -<LI>If set to <EM>on</EM>, each request and reply will get a <SAMP>Via:</SAMP> header -line added for the current host. -<LI>If set to <EM>full</EM>, each generated <SAMP>Via:</SAMP> header line will -additionally have the Apache server version shown as a <SAMP>Via:</SAMP> comment field. -<LI>If set to <EM>block</EM>, every proxy request will have all its -<SAMP>Via:</SAMP> header lines removed. No new <SAMP>Via:</SAMP> header will be generated. -</UL> - -<HR> - -<H2><A NAME="cacheforcecompletion">CacheForceCompletion</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheForceCompletion <EM><percentage></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>90</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheForceCompletion is only available in -Apache 1.3.1 and later.<P> - -If an http transfer that is being cached is cancelled, the proxy module will -complete the transfer to cache if more than the percentage specified has -already been transferred.<P> - -This is a percentage, and must be a number between 1 and 100, or 0 to use -the default. 100 will cause a document to be cached only if the transfer -was allowed to complete. A number between 60 and 90 is recommended. - -<HR> - -<H2><A NAME="cacheroot">CacheRoot</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheRoot <EM><directory></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheRoot is only available in -Apache 1.1 and later.<P> - -Sets the name of the directory to contain cache files; this must be -writable by the httpd server. -(see the <A HREF="core.html#user"><CODE>User</CODE></A> directive).<BR> -Setting <CODE>CacheRoot</CODE> enables proxy cacheing; without defining -a <CODE>CacheRoot</CODE>, proxy functionality will be available -if <CODE>ProxyRequests</CODE> are set to <CODE>On</CODE>, but no -cacheing will be available. - -<HR> - -<H2><A NAME="cachesize">CacheSize</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheSize <EM><size></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>CacheSize 5</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheSize is only available in -Apache 1.1 and later.<P> - -Sets the desired space usage of the cache, in KB (1024-byte units). Although -usage may grow above this setting, the garbage collection will delete files -until the usage is at or below this setting.<BR> -Depending on the expected proxy traffic volume and <CODE>CacheGcInterval</CODE>, -use a value which is at least 20 to 40 % lower than the available space. - -<HR> - -<H2><A NAME="cachegcinterval">CacheGcInterval</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheGcInterval <EM><time></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheGcinterval is only available in -Apache 1.1 and later.<P> - -Check the cache every <time> hours, and delete files if the space -usage is greater than that set by CacheSize. Note that <time> accepts a -float value, you could for example use <CODE>CacheGcInterval 1.5</CODE> to -check the cache every 90 minutes. (If unset, no garbage collection will -be performed, and the cache will grow indefinitely.) -Note also that the larger the <CODE>CacheGcInterval</CODE>, the more -extra space beyond the configured <CODE>CacheSize</CODE> will be -needed for the cache between garbage collections.<BR> <!-- -Note that due to a design flaw, Apache does not automatically force a -garbage collection when the available space on the file system where -the cache resides is exhausted. --> - -<HR> - -<H2><A NAME="cachemaxexpire">CacheMaxExpire</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheMaxExpire <EM><time></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>CacheMaxExpire 24</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheMaxExpire is only available in -Apache 1.1 and later.<P> - -Cachable HTTP documents will be retained for at most <time> hours without -checking the origin server. Thus documents can be at most <time> -hours out of date. This restriction is enforced even if an expiry date -was supplied with the document. - -<HR> - -<H2><A NAME="cachelastmodifiedfactor">CacheLastModifiedFactor</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheLastModifiedFactor <EM><factor></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>CacheLastModifiedFactor 0.1</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheLastModifiedFactor is only available in -Apache 1.1 and later.<P> - -If the origin HTTP server did not supply an expiry date for the -document, then estimate one using the formula -<PRE> - expiry-period = time-since-last-modification * <factor> -</PRE> -For example, if the document was last modified 10 hours ago, and -<factor> is 0.1, then the expiry period will be set to 10*0.1 = 1 hour. - -<P>If the expiry-period would be longer than that set by CacheMaxExpire, -then the latter takes precedence. - -<HR> - -<H2><A NAME="cachedirlevels">CacheDirLevels</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheDirLevels <EM><levels></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>CacheDirLevels 3</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheDirLevels is only available in -Apache 1.1 and later.<P> - -CacheDirLevels sets the number of levels of subdirectories in the cache. -Cached data will be saved this many directory levels below CacheRoot. - -<HR> - -<H2><A NAME="cachedirlength">CacheDirLength</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheDirLength <EM><length></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>CacheDirLength 1</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheDirLength is only available in -Apache 1.1 and later.<P> - -CacheDirLength sets the number of characters in proxy cache subdirectory names. - -<HR> - -<H2><A NAME="cachedefaultexpire">CacheDefaultExpire</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CacheDefaultExpire <EM><time></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>CacheDefaultExpire 1</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> CacheDefaultExpire is only available in -Apache 1.1 and later.<P> - -If the document is fetched via a protocol that does not support expiry times, -then use <time> hours as the expiry time. -<A HREF="#cachemaxexpire">CacheMaxExpire</A> does <STRONG>not</STRONG> -override this setting. - -<HR> - -<H2><A NAME="nocache">NoCache</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> NoCache <EM><word/host/domain list></EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_proxy<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> NoCache is only available in -Apache 1.1 and later.<P> - -The NoCache directive specifies a list of words, hosts and/or domains, separated -by spaces. HTTP and non-passworded FTP documents from matched words, hosts or -domains are <EM>not</EM> cached by the proxy server. The proxy module will -also attempt to determine IP addresses of list items which may be hostnames -during startup, and cache them for match test as well. Example: - -<PRE> - NoCache joes-garage.com some-host.co.uk bullwinkle.wotsamattau.edu -</PRE> - -'bullwinkle.wotsamattau.edu' would also be matched if referenced by IP -address.<P> - -Note that 'wotsamattau' would also be sufficient to match 'wotsamattau.edu'.<P> - -Note also that - -<PRE> -NoCache * -</PRE> - -disables caching completely.<P> - -<HR> - -<H2><A NAME="configs">Common configuration topics</A></H2> - -<UL> -<LI><A HREF="#access">Controlling access to your proxy</A> -<LI><A HREF="#shortname">Using Netscape hostname shortcuts</A> -<LI><A HREF="#mimetypes">Why doesn't file type <EM>xxx</EM> download via FTP?</A> -<LI><A HREF="#startup">Why does Apache start more slowly when using the - proxy module?</A> -<LI><A HREF="#socks">Can I use the Apache proxy module with my SOCKS proxy?</A> -<LI><A HREF="#intranet">What other functions are useful for an intranet proxy server?</A> -</UL> - -<H2><A NAME="access">Controlling access to your proxy</A></H2> - -You can control who can access your proxy via the normal <Directory> -control block using the following example:<P> - -<PRE> -<Directory proxy:*> -order deny,allow -deny from [machines you'd like *not* to allow by IP address or name] -allow from [machines you'd like to allow by IP address or name] -</Directory> -</PRE><P> - -A <Files> block will also work, and is the only method known to work -for all possible URLs in Apache versions earlier than 1.2b10.<P> - -<H2><A NAME="shortname">Using Netscape hostname shortcuts</A></H2> - -There is an optional patch to the proxy module to allow Netscape-like -hostname shortcuts to be used. It's available from the -<A HREF="http://www.apache.org/dist/contrib/patches/1.2/netscapehost.patch" -><SAMP>contrib/patches/1.2</SAMP></A> directory on the Apache Web site.<P> - -<H2><A NAME="mimetypes">Why doesn't file type <EM>xxx</EM> download via FTP?</A></H2> - -You probably don't have that particular file type defined as -<EM>application/octet-stream</EM> in your proxy's mime.types configuration -file. A useful line can be<P> - -<PRE> -application/octet-stream bin dms lha lzh exe class tgz taz -</PRE> - -<H2><A NAME="type">How can I force an FTP ASCII download of File <EM>xxx</EM>?</A></H2> - -In the rare situation where you must download a specific file using the FTP -<STRONG>ASCII</STRONG> transfer method (while the default transfer is in -<STRONG>binary</STRONG> mode), you can override mod_proxy's default by -suffixing the request with <SAMP>;type=a</SAMP> to force an ASCII transfer.<P> - -<H2><A NAME="startup">Why does Apache start more slowly when using the - proxy module?</A></H2> - -If you're using the <CODE>ProxyBlock</CODE> or <CODE>NoCache</CODE> -directives, hostnames' IP addresses are looked up and cached during -startup for later match test. This may take a few seconds (or more) -depending on the speed with which the hostname lookups occur.<P> - -<H2><A NAME="socks">Can I use the Apache proxy module with my SOCKS proxy?</A></H2> - -Yes. Just build Apache with the rule <CODE>SOCKS4=yes</CODE> in your -<EM>Configuration</EM> file, and follow the instructions there. SOCKS5 -capability can be added in a similar way (there's no <CODE>SOCKS5</CODE> -rule yet), so use the <CODE>EXTRA_LDFLAGS</CODE> definition, or build Apache -normally and run it with the <EM>runsocks</EM> wrapper provided with SOCKS5, -if your OS supports dynamically linked libraries.<P> - -Some users have reported problems when using SOCKS version 4.2 on Solaris. -The problem was solved by upgrading to SOCKS 4.3.<P> - -Remember that you'll also have to grant access to your Apache proxy machine by -permitting connections on the appropriate ports in your SOCKS daemon's -configuration.<P> - -<H2><A NAME="intranet">What other functions are useful for an intranet proxy server?</A></H2> - -<P>An Apache proxy server situated in an intranet needs to forward external -requests through the company's firewall. However, when it has to access -resources within the intranet, it can bypass the firewall when accessing -hosts. The <A HREF="#noproxy">NoProxy</A> directive is useful for specifying -which hosts belong to the intranet and should be accessed directly.</P> - -<P>Users within an intranet tend to omit the local domain name from their -WWW requests, thus requesting "http://somehost/" instead of -"http://somehost.my.dom.ain/". Some commercial proxy servers let them get -away with this and simply serve the request, implying a configured -local domain. When the <A HREF="#proxydomain">ProxyDomain</A> directive -is used and the server is <A HREF="#proxyrequests">configured for -proxy service</A>, Apache can return a redirect response and send the client -to the correct, fully qualified, server address. This is the preferred method -since the user's bookmark files will then contain fully qualified hosts.</P> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_rewrite.html b/docs/manual/mod/mod_rewrite.html deleted file mode 100644 index ffd9088e0e..0000000000 --- a/docs/manual/mod/mod_rewrite.html +++ /dev/null @@ -1,1873 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<!--%hypertext --> -<!-- mod_rewrite.html --> -<!-- Documentation for the mod_rewrite Apache module --> -<HTML> -<HEAD> -<TITLE>Apache module mod_rewrite</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<BLOCKQUOTE><!-- page indentation --> -<!--#include virtual="header.html" --> - -<BR> -<H1 ALIGN="CENTER">Module mod_rewrite<BR>URL Rewriting Engine</H1> - -This module is contained in the <CODE>mod_rewrite.c</CODE> file, with Apache -1.2 and later. It provides a rule-based rewriting engine to rewrite requested -URLs on the fly. It is not compiled into the server by default. To use -<CODE>mod_rewrite</CODE> you have to enable the following line in the server -build <CODE>Configuration</CODE> file: -<PRE> - AddModule modules/standard/mod_rewrite.o -</PRE> - -<P> -<HR NOSHADE SIZE=1> - -<BR> -<H2>Summary</H2> - -<BLOCKQUOTE> -<BLOCKQUOTE> -<BLOCKQUOTE> -<EM>``The great thing about mod_rewrite is it gives you all the -configurability and flexibility of Sendmail. The downside to -mod_rewrite is that it gives you all the configurability and -flexibility of Sendmail.''</EM> -<DIV ALIGN=RIGHT> --- Brian Behlendorf<BR> -Apache Group -</DIV> -</BLOCKQUOTE> -</BLOCKQUOTE> -</BLOCKQUOTE> - -<BLOCKQUOTE> -<BLOCKQUOTE> -<BLOCKQUOTE> -<EM>`` -Despite the tons of examples and docs, mod_rewrite -is voodoo. Damned cool voodoo, but still voodoo. -''</EM> -<DIV ALIGN=RIGHT> --- Brian Moore<BR> -bem@news.cmc.net -</DIV> -</BLOCKQUOTE> -</BLOCKQUOTE> -</BLOCKQUOTE> - -Welcome to mod_rewrite, the Swiss Army Knife of URL manipulation! - -<P> -This module uses a rule-based rewriting engine (based on a regular-expression -parser) to rewrite requested URLs on the fly. It supports an unlimited number -of rules and an unlimited number of attached rule conditions for each rule to -provide a really flexible and powerful URL manipulation mechanism. The URL -manipulations can depend on various tests, for instance server variables, -environment variables, HTTP headers, time stamps and even external database -lookups in various formats can be used to achieve a really granular URL -matching. - -<P> -This module operates on the full URLs (including the path-info part) both in -per-server context (<CODE>httpd.conf</CODE>) and per-directory context -(<CODE>.htaccess</CODE>) and even can generate query-string parts on result. -The rewritten result can lead to internal sub-processing, external request -redirection or even to an internal proxy throughput. - -<P> -But all this functionality and flexibility has its drawback: complexity. So -don't expect to understand this module in it's whole in just one day. - -<P> -This module was invented and originally written in April 1996<BR> -and gifted exclusively to the The Apache Group in July 1997 by - -<P> -<BLOCKQUOTE> -<A HREF="http://www.engelschall.com/"><CODE>Ralf S. Engelschall</CODE></A><BR> -<A HREF="mailto:rse@engelschall.com"><CODE>rse@engelschall.com</CODE></A><BR> -<A HREF="http://www.engelschall.com/"><CODE>www.engelschall.com</CODE></A> -</BLOCKQUOTE> - -<P> -<HR NOSHADE SIZE=1> - -<H2>Table Of Contents</H2> - -<P> -<STRONG>Internal Processing</STRONG> -<UL> - <LI><A HREF="#InternalAPI">API Phases</A> - <LI><A HREF="#InternalRuleset">Ruleset Processing</A> - <LI><A HREF="#InternalBackRefs">Regex Back-Reference Availability</A> -</UL> -<P> -<STRONG>Configuration Directives</STRONG> -<UL> - <LI><A HREF="#RewriteEngine">RewriteEngine</A> - <LI><A HREF="#RewriteOptions">RewriteOptions</A> - <LI><A HREF="#RewriteLog">RewriteLog</A> - <LI><A HREF="#RewriteLogLevel">RewriteLogLevel</A> - <LI><A HREF="#RewriteLock">RewriteLock</A> - <LI><A HREF="#RewriteMap">RewriteMap</A> - <LI><A HREF="#RewriteBase">RewriteBase</A> - <LI><A HREF="#RewriteCond">RewriteCond</A> - <LI><A HREF="#RewriteRule">RewriteRule</A> -</UL> -<STRONG>Miscellaneous</STRONG> -<UL> - <LI><A HREF="#EnvVar">Environment Variables</A> - <LI><A HREF="#Solutions">Practical Solutions</A> -</UL> - -<P> -<HR NOSHADE SIZE=1> - -<CENTER> -<H1><A NAME="Internal">Internal Processing</A></H1> -</CENTER> - -<P> -<HR NOSHADE SIZE=1> - -<P> -The internal processing of this module is very complex but needs to be -explained once even to the average user to avoid common mistakes and to let -you exploit its full functionality. - -<H2><A NAME="InternalAPI">API Phases</A></H2> - -<P> -First you have to understand that when Apache processes a HTTP request it does -this in phases. A hook for each of these phases is provided by the Apache API. -Mod_rewrite uses two of these hooks: the URL-to-filename translation hook -which is used after the HTTP request was read and before any authorization -starts and the Fixup hook which is triggered after the authorization phases -and after the per-directory config files (<CODE>.htaccess</CODE>) where read, -but before the content handler is activated. - -<P> -So, after a request comes in and Apache has determined the corresponding -server (or virtual server) the rewriting engine start processing of all -mod_rewrite directives from the per-server configuration in the -URL-to-filename phase. A few steps later when the final data directories are -found, the per-directory configuration directives of mod_rewrite are triggered -in the Fixup phase. In both situations mod_rewrite either rewrites URLs to new -URLs or to filenames, although there is no obvious distinction between them. -This is a usage of the API which was not intended this way when the API -was designed, but as of Apache 1.x this is the only way mod_rewrite can -operate. To make this point more clear remember the following two points: - -<OL> -<LI>The API currently provides only a URL-to-filename hook. Although - mod_rewrite rewrites URLs to URLs, URLs to filenames and even - filenames to filenames. In Apache 2.0 the two missing hooks - will be added to make the processing more clear. But this - point has no drawbacks for the user, it is just a fact which - should be remembered: Apache does more in the URL-to-filename hook - then the API intends for it. -<P> -<LI>Unbelievably mod_rewrite provides URL manipulations in per-directory - context, <EM>i.e.</EM>, within <CODE>.htaccess</CODE> files, although - these are - reached a very long time after the URLs were translated to filenames (this - has to be this way, because <CODE>.htaccess</CODE> files stay in the - filesystem, so processing has already been reached this stage of - processing). In other words: According to the API phases at this time it - is too late for any URL manipulations. To overcome this chicken and egg - problem mod_rewrite uses a trick: When you manipulate a URL/filename in - per-directory context mod_rewrite first rewrites the filename back to its - corresponding URL (which it usually impossible, but see the - <CODE>RewriteBase</CODE> directive below for the trick to achieve this) - and then initiates a new internal sub-request with the new URL. This leads - to a new processing of the API phases from the beginning. - <P> - Again mod_rewrite tries hard to make this complicated step totally - transparent to the user, but you should remember here: While URL - manipulations in per-server context are really fast and efficient, - per-directory rewrites are slow and inefficient due to this chicken and - egg problem. But on the other hand this is the only way mod_rewrite can - provide (locally restricted) URL manipulations to the average user. -</OL> - -<P> -Don't forget these two points! - -<H2><A NAME="InternalRuleset">Ruleset Processing</A></H2> - -Now when mod_rewrite is triggered in these two API phases, it reads the -configured rulesets from its configuration structure (which itself was either -created on startup for per-server context or while the directory walk of the -Apache kernel for per-directory context). Then the URL rewriting engine is -started with the contained ruleset (one or more rules together with their -conditions). The operation of the URL rewriting engine itself is exactly the -same for both configuration contexts. Just the final result processing is -different. - -<P> -The order of rules in the ruleset is important because the rewriting engine -processes them in a special order. And this order is not very obvious. The -rule is this: The rewriting engine loops through the ruleset rule by rule -(<CODE>RewriteRule</CODE> directives!) and when a particular rule matched it -optionally loops through existing corresponding conditions -(<CODE>RewriteCond</CODE> directives). Because of historical reasons the -conditions are given first, the control flow is a little bit winded. See -Figure 1 for more details. - -<P> -<DIV ALIGN=CENTER> -<TABLE CELLSPACING=0 CELLPADDING=2 BORDER=0> -<TR> -<TD BGCOLOR="#CCCCCC"><IMG - SRC="../images/mod_rewrite_fig1.gif" - WIDTH="428" HEIGHT="385" - ALT="[Needs graphics capability to display]"></TD> -</TR> -<TR> -<TD ALIGN=CENTER> -<STRONG>Figure 1:</STRONG> The control flow through the rewriting ruleset -</TD> -</TR> -</TABLE> -</DIV> - -<P> -As you can see, first the URL is matched against the <EM>Pattern</EM> of each -rule. When it fails mod_rewrite immediately stops processing this rule and -continues with the next rule. If the <EM>Pattern</EM> matched, mod_rewrite -looks for corresponding rule conditions. If none are present, it just -substitutes the URL with a new value which is constructed from the string -<EM>Substitution</EM> and goes on with its rule-looping. But -if conditions exists, it starts an inner loop for processing them in order -they are listed. For conditions the logic is different: We don't match a -pattern against the current URL. Instead we first create a string -<EM>TestString</EM> by expanding variables, back-references, map lookups, -<EM>etc.</EM> and then we try to match <EM>CondPattern</EM> against it. If the -pattern doesn't match, the complete set of conditions and the corresponding -rule fails. If the pattern matches, then the next condition is processed -until no more condition is available. If all conditions matched processing is -continued with the substitution of the URL with <EM>Substitution</EM>. - -<H2><A NAME="InternalBackRefs">Regex Back-Reference Availability</A></H2> - -One important thing here has to be remembered: Whenever you -use parenthesis in <EM>Pattern</EM> or in one of the <EM>CondPattern</EM> -back-reference are internally created which can be used with the -strings <CODE>$N</CODE> and <CODE>%N</CODE> (see below). And these -are available for creating the strings <EM>Substitution</EM> and -<EM>TestCond</EM>. Figure 2 shows at which locations the back-references are -transfered to for expansion. - -<P> -<DIV ALIGN=CENTER> -<TABLE CELLSPACING=0 CELLPADDING=2 BORDER=0> -<TR> -<TD BGCOLOR="#CCCCCC"><IMG - SRC="../images/mod_rewrite_fig2.gif" - WIDTH="381" HEIGHT="179" - ALT="[Needs graphics capability to display]"></TD> -</TR> -<TR> -<TD ALIGN=CENTER> -<STRONG>Figure 2:</STRONG> The back-reference flow through a rule -</TD> -</TR> -</TABLE> -</DIV> - -<P> -We know, this was a crash course of mod_rewrite's internal processing. But -you will benefit from this knowledge when reading the following documentation -of the available directives. - -<P> -<HR NOSHADE SIZE=1> - -<CENTER> -<H1><A NAME="Configuration">Configuration Directives</A></H1> -</CENTER> - -<P> -<HR NOSHADE SIZE=1> - -<H3><A NAME="RewriteEngine">RewriteEngine</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> - <CODE>RewriteEngine</CODE> {<CODE>on,off</CODE>}<BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> - <STRONG><CODE>RewriteEngine off</CODE></STRONG><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> - server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2<BR> - -<P> -The <CODE>RewriteEngine</CODE> directive enables or disables the runtime -rewriting engine. If it is set to <CODE>off</CODE> this module does no runtime -processing at all. It does not even update the <CODE>SCRIPT_URx</CODE> -environment variables. - -<P> -Use this directive to disable the module instead of commenting out -all <CODE>RewriteRule</CODE> directives! - -<P> -Note that, by default, rewrite configurations are not inherited. -This means that you need to have a <CODE>RewriteEngine on</CODE> -directive for each virtual host you wish to use it in. - -<P> -<HR NOSHADE SIZE=1> -<P> - -<H3><A NAME="RewriteOptions">RewriteOptions</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <CODE>RewriteOptions</CODE> <EM>Option</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2<BR> - -<P> -The <CODE>RewriteOptions</CODE> directive sets some special options for the -current per-server or per-directory configuration. The <EM>Option</EM> -strings can be one of the following: - -<UL> -<LI>'<STRONG><CODE>inherit</CODE></STRONG>'<BR> - This forces the current configuration to inherit the configuration of the - parent. In per-virtual-server context this means that the maps, - conditions and rules of the main server gets inherited. In per-directory - context this means that conditions and rules of the parent directory's - <CODE>.htaccess</CODE> configuration gets inherited. -</UL> - -<P> -<HR NOSHADE SIZE=1> -<P> - -<H3><A NAME="RewriteLog">RewriteLog</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <CODE>RewriteLog</CODE> <EM>Filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2<BR> - -<P> -The <CODE>RewriteLog</CODE> directive sets the name of the file to which the -server logs any rewriting actions it performs. If the name does not begin -with a slash ('<CODE>/</CODE>') then it is assumed to be relative to the -<EM>Server Root</EM>. The directive should occur only once per server -config. - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice</STRONG>: To disable the logging of rewriting actions it is -not recommended to set <EM>Filename</EM> -to <CODE>/dev/null</CODE>, because although the rewriting engine does -not create output to a logfile it still creates the logfile -output internally. <STRONG>This will slow down the server with no advantage -to the administrator!</STRONG> -To disable logging either remove or comment out the -<CODE>RewriteLog</CODE> directive or use <CODE>RewriteLogLevel 0</CODE>! -</TD></TR> -</TABLE> - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Security</STRONG>: See the <A -HREF="../misc/security_tips.html">Apache Security -Tips</A> document for details on why your security could be compromised if the -directory where logfiles are stored is writable by anyone other than the user -that starts the server. -</TD></TR> -</TABLE> - -<P> -<STRONG>Example:</STRONG> -<BLOCKQUOTE> -<PRE> -RewriteLog "/usr/local/var/apache/logs/rewrite.log" -</PRE> -</BLOCKQUOTE> - -<P> -<HR NOSHADE SIZE=1> -<P> - -<H3><A NAME="RewriteLogLevel">RewriteLogLevel</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <CODE>RewriteLogLevel</CODE> <EM>Level</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <STRONG><CODE>RewriteLogLevel 0</CODE></STRONG> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2<BR> - -<P> -The <CODE>RewriteLogLevel</CODE> directive set the verbosity level of the -rewriting -logfile. The default level 0 means no logging, while 9 or more means -that practically all actions are logged. - -<P> -To disable the logging of rewriting actions simply set <EM>Level</EM> to 0. -This disables all rewrite action logs. - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice:</STRONG> Using a high value for <EM>Level</EM> will slow down -your Apache -server dramatically! Use the rewriting logfile only for debugging or at least -at <EM>Level</EM> not greater than 2! -</TD></TR> -</TABLE> - - -<P> -<STRONG>Example:</STRONG> -<BLOCKQUOTE> -<PRE> -RewriteLogLevel 3 -</PRE> -</BLOCKQUOTE> - -<P> -<HR NOSHADE SIZE=1> -<P> - -<H3><A NAME="RewriteLock">RewriteLock</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <CODE>RewriteLock</CODE> <EM>Filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.3<BR> - -<P> -This directive sets the filename for a synchronization lockfile which -mod_rewrite needs to communicate with <SAMP>RewriteMap</SAMP> -<EM>programs</EM>. Set this lockfile to a local path (not on a NFS-mounted -device) when you want to use a rewriting map-program. It is not required for -SAMP using all other types of rewriting maps. - -<P> -<HR NOSHADE SIZE=1> -<P> - -<H3><A NAME="RewriteMap">RewriteMap</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <CODE>RewriteMap</CODE> <EM>MapName </EM> - <EM>MapType</EM><CODE>:</CODE><EM>MapSource</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> not used per default<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2 (partially), Apache 1.3<BR> - -<P> -The <CODE>RewriteMap</CODE> directive defines a <EM>Rewriting Map</EM> -which can be used inside rule substitution strings by the mapping-functions -to insert/substitute fields through a key lookup. The source of this -lookup can be of various types. -<P> - -The <A NAME="mapfunc"><EM>MapName</EM></A> is the name of the map and will -be used to specify a mapping-function for the substitution strings of a -rewriting rule via one of the following constructs: - -<BLOCKQUOTE><STRONG> -<CODE>${</CODE> <EM>MapName</EM> <CODE>:</CODE> <EM>LookupKey</EM> -<CODE>}</CODE><BR> -<CODE>${</CODE> <EM>MapName</EM> <CODE>:</CODE> <EM>LookupKey</EM> -<CODE>|</CODE> <EM>DefaultValue</EM> <CODE>}</CODE> -</STRONG></BLOCKQUOTE> - -When such a construct occurs the map <EM>MapName</EM> -is consulted and the key <EM>LookupKey</EM> is looked-up. If the key is -found, the map-function construct is substituted by <EM>SubstValue</EM>. If -the key is not found then it is substituted by <EM>DefaultValue</EM> or -the empty string if no <EM>DefaultValue</EM> was specified. - -<P> -The following combinations for <EM>MapType</EM> and <EM>MapSource</EM> -can be used: - -<UL> -<LI><STRONG>Standard Plain Text</STRONG><BR> - MapType: <CODE>txt</CODE>, MapSource: Unix filesystem path to valid regular - file - <P> - This is the standard rewriting map feature where the <EM>MapSource</EM> is - a plain ASCII file containing either blank lines, comment lines (starting - with a '#' character) or pairs like the following - one per line. - - <BLOCKQUOTE><STRONG> - <EM>MatchingKey</EM> <EM>SubstValue</EM> - </STRONG></BLOCKQUOTE> - - <P> - Example: -<P> -<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=5 BGCOLOR="#F0F0F0"> -<TR><TD><PRE> -## -## map.txt -- rewriting map -## - -Ralf.S.Engelschall rse # Bastard Operator From Hell -Mr.Joe.Average joe # Mr. Average -</PRE></TD></TR> -</TABLE> - -<P> -<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=5 BGCOLOR="#F0F0F0"> -<TR><TD><PRE> -RewriteMap real-to-user txt:/path/to/file/map.txt -</PRE></TD></TR> -</TABLE> - -<P> -<LI><STRONG>Randomized Plain Text</STRONG><BR> - MapType: <CODE>rnd</CODE>, MapSource: Unix filesystem path to valid regular - file - <P> - This is identical to the Standard Plain Text variant above but with a - special - post-processing feature: After looking up a value it is parsed according - to contained ``<CODE>|</CODE>'' characters which have the meaning of - ``or''. Or - in other words: they indicate a set of alternatives from which the actual - returned value is chosen randomly. Although this sounds crazy and useless, - it - was actually designed for load balancing in a reverse proxy situation where - the looked up values are server names. - Example: -<P> -<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=5 BGCOLOR="#F0F0F0"> -<TR><TD><PRE> -## -## map.txt -- rewriting map -## - -static www1|www2|www3|www4 -dynamic www5|www6 -</PRE></TD></TR> -</TABLE> - -<P> -<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=5 BGCOLOR="#F0F0F0"> -<TR><TD><PRE> -RewriteMap servers rnd:/path/to/file/map.txt -</PRE></TD></TR> -</TABLE> - -<P> -<LI><STRONG>Hash File</STRONG><BR> - MapType: <CODE>dbm</CODE>, MapSource: Unix filesystem path to valid - regular file - <P> - Here the source is a binary NDBM format file containing the same contents - as a <EM>Plain Text</EM> format file, but in a special representation - which is optimized for really fast lookups. You can create such a file with - any NDBM tool or with the following Perl script: - <P> - <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=5 BGCOLOR="#F0F0F0"> - <TR><TD><PRE> -#!/path/to/bin/perl -## -## txt2dbm -- convert txt map to dbm format -## - -($txtmap, $dbmmap) = @ARGV; -open(TXT, "<$txtmap"); -dbmopen(%DB, $dbmmap, 0644); -while (<TXT>) { - next if (m|^s*#.*| or m|^s*$|); - $DB{$1} = $2 if (m|^\s*(\S+)\s+(\S+)$|); -} -dbmclose(%DB); -close(TXT)</PRE></TD></TR> - </TABLE> - <P> - <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=5 BGCOLOR="#F0F0F0"> - <TR><TD><PRE>$ txt2dbm map.txt map.db </PRE></TD></TR> - </TABLE> -<P> -<LI><STRONG>Internal Function</STRONG><BR> - MapType: <CODE>int</CODE>, MapSource: Internal Apache function - <P> - Here the source is an internal Apache function. Currently you cannot - create your own, but the following functions already exists: - <UL> - <LI><STRONG>toupper</STRONG>:<BR> - Converts the looked up key to all upper case. - <LI><STRONG>tolower</STRONG>:<BR> - Converts the looked up key to all lower case. - <LI><STRONG>escape</STRONG>:<BR> - Translates special characters in the looked up key to hex-encodings. - <LI><STRONG>unescape</STRONG>:<BR> - Translates hex-encodings in the looked up key back to special characters. - </UL> -<P> -<LI><STRONG>External Rewriting Program</STRONG><BR> - MapType: <CODE>prg</CODE>, MapSource: Unix filesystem path to valid - regular file - <P> - Here the source is a Unix program, not a map file. To create it you can use - the language of your choice, but the result has to be a run-able Unix - executable (<EM>i.e.</EM>, either object-code or a script with the - magic cookie trick '<CODE>#!/path/to/interpreter</CODE>' as the first - line). - <P> - This program gets started once at startup of the Apache servers and then - communicates with the rewriting engine over its <CODE>stdin</CODE> and - <CODE>stdout</CODE> file-handles. For each map-function lookup it will - receive the key to lookup as a newline-terminated string on - <CODE>stdin</CODE>. It then has to give back the looked-up value as a - newline-terminated string on <CODE>stdout</CODE> or the four-character - string ``<CODE>NULL</CODE>'' if it fails (<EM>i.e.</EM>, there is no - corresponding value - for the given key). A trivial program which will implement a 1:1 map - (<EM>i.e.</EM>, key == value) could be: - <P> -<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=5 BGCOLOR="#F0F0F0"> -<TR><TD><PRE> -#!/usr/bin/perl -$| = 1; -while (<STDIN>) { - # ...here any transformations - # or lookups should occur... - print $_; -} -</PRE></TD></TR> -</TABLE> - <P> - But be very careful:<BR> - <OL> - <LI>``<EM>Keep the program simple, stupid</EM>'' (KISS), because - if this program hangs it will lead to a hang of the Apache server - when the rule occurs. - <LI>Avoid one common mistake: never do buffered I/O on <CODE>stdout</CODE>! - This will cause a deadloop! Hence the ``<CODE>$|=1</CODE>'' in the - above example... - <LI>Use the <SAMP>RewriteLock</SAMP> directive to define a lockfile - mod_rewrite can use to synchronize the communication to the program. - Per default no such synchronization takes place. - </OL> -</UL> - -The <CODE>RewriteMap</CODE> directive can occur more than once. For each -mapping-function use one <CODE>RewriteMap</CODE> directive to declare its -rewriting mapfile. While you cannot <STRONG>declare</STRONG> a map in -per-directory context it is of course possible to <STRONG>use</STRONG> -this map in per-directory context. - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice:</STRONG> For plain text and DBM format files the looked-up -keys are cached in-core -until the <CODE>mtime</CODE> of the mapfile changes or the server does a -restart. This way you can have map-functions in rules which are used -for <STRONG>every</STRONG> request. This is no problem, because the -external lookup only happens once! -</TD></TR> -</TABLE> - -<P> -<HR NOSHADE SIZE=1> -<P> - -<H3><A NAME="RewriteBase">RewriteBase</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <CODE>RewriteBase</CODE> <EM>BaseURL</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>default is the physical directory path</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>FileInfo</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2<BR> - -<P> -The <CODE>RewriteBase</CODE> directive explicitly sets the base URL for -per-directory rewrites. As you will see below, <CODE>RewriteRule</CODE> can be -used in per-directory config files (<CODE>.htaccess</CODE>). There it will act -locally, <EM>i.e.</EM>, the local directory prefix is stripped at this stage of -processing and your rewriting rules act only on the remainder. At the end -it is automatically added. - -<P> -When a substitution occurs for a new URL, this module has to re-inject the URL -into the server processing. To be able to do this it needs to know what the -corresponding URL-prefix or URL-base is. By default this prefix is the -corresponding filepath itself. <STRONG>But at most websites URLs are -<STRONG>NOT</STRONG> directly related to physical filename paths, so this -assumption will be usually be wrong!</STRONG> There you have to use the -<CODE>RewriteBase</CODE> directive to specify the correct URL-prefix. - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice:</STRONG> If your webserver's URLs are <STRONG>not</STRONG> -directly related to physical file paths, you have to use -<CODE>RewriteBase</CODE> in every -<CODE>.htaccess</CODE> files where you want to use <CODE>RewriteRule</CODE> -directives. -</TD></TR> -</TABLE> - -<P> -<STRONG>Example:</STRONG> - -<BLOCKQUOTE> - Assume the following per-directory config file: - -<P> -<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=5 BGCOLOR="#F0F0F0"> -<TR><TD><PRE> -# -# /abc/def/.htaccess -- per-dir config file for directory /abc/def -# Remember: /abc/def is the physical path of /xyz, <EM>i.e.</EM>, the server -# has a 'Alias /xyz /abc/def' directive <EM>e.g.</EM> -# - -RewriteEngine On - -# let the server know that we are reached via /xyz and not -# via the physical path prefix /abc/def -RewriteBase /xyz - -# now the rewriting rules -RewriteRule ^oldstuff\.html$ newstuff.html -</PRE></TD></TR> -</TABLE> - -<P> -In the above example, a request to <CODE>/xyz/oldstuff.html</CODE> -gets correctly -rewritten to the physical file <CODE>/abc/def/newstuff.html</CODE>. - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<FONT SIZE=-1> -<STRONG>Notice - For the Apache hackers:</STRONG><BR> -The following list gives detailed information about the internal -processing steps: - -<P> -<PRE> -Request: - /xyz/oldstuff.html - -Internal Processing: - /xyz/oldstuff.html -> /abc/def/oldstuff.html (per-server Alias) - /abc/def/oldstuff.html -> /abc/def/newstuff.html (per-dir RewriteRule) - /abc/def/newstuff.html -> /xyz/newstuff.html (per-dir RewriteBase) - /xyz/newstuff.html -> /abc/def/newstuff.html (per-server Alias) - -Result: - /abc/def/newstuff.html -</PRE> - -This seems very complicated but is the correct Apache internal processing, -because the per-directory rewriting comes too late in the process. So, -when it occurs the (rewritten) request has to be re-injected into the Apache -kernel! BUT: While this seems like a serious overhead, it really isn't, because -this re-injection happens fully internal to the Apache server and the same -procedure is used by many other operations inside Apache. So, you can be -sure the design and implementation is correct. -</FONT> -</TD></TR> -</TABLE> - -</BLOCKQUOTE> - - -<P> -<HR NOSHADE SIZE=1> -<P> - -<H3><A NAME="RewriteCond">RewriteCond</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <CODE>RewriteCond</CODE> <EM>TestString</EM> - <EM>CondPattern</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, - .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>FileInfo</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2 (partially), Apache 1.3<BR> - -<P> -The <CODE>RewriteCond</CODE> directive defines a rule condition. Precede a -<CODE>RewriteRule</CODE> directive with one or more <CODE>RewriteCond</CODE> -directives. - -The following rewriting rule is only used if its pattern matches the current -state of the URI <STRONG>and</STRONG> if these additional conditions apply -too. - -<P> -<EM>TestString</EM> is a string which can contains the following -expanded constructs in addition to plain text: - -<UL> -<LI><STRONG>RewriteRule backreferences</STRONG>: These are backreferences of - the form - -<BLOCKQUOTE><STRONG> -<CODE>$N</CODE> -</STRONG></BLOCKQUOTE> - -(1 <= N <= 9) which provide access to the grouped parts (parenthesis!) -of the -pattern from the corresponding <CODE>RewriteRule</CODE> directive (the one -following the current bunch of <CODE>RewriteCond</CODE> directives). - -<P> -<LI><STRONG>RewriteCond backreferences</STRONG>: These are backreferences of -the form - -<BLOCKQUOTE><STRONG> -<CODE>%N</CODE> -</STRONG></BLOCKQUOTE> - -(1 <= N <= 9) which provide access to the grouped parts (parenthesis!) of -the pattern from the last matched <CODE>RewriteCond</CODE> directive in the -current bunch of conditions. - -<P> -<LI><STRONG>Server-Variables</STRONG>: These are variables - of the form - -<BLOCKQUOTE><STRONG> -<CODE>%{</CODE> <EM>NAME_OF_VARIABLE</EM> <CODE>}</CODE> -</STRONG></BLOCKQUOTE> - -where <EM>NAME_OF_VARIABLE</EM> can be a string -of the following list: - -<P> -<TABLE BGCOLOR="#F0F0F0" CELLSPACING=0 CELLPADDING=5> -<TR> -<TD VALIGN=TOP> -<STRONG>HTTP headers:</STRONG><P> -<FONT SIZE=-1> -HTTP_USER_AGENT<BR> -HTTP_REFERER<BR> -HTTP_COOKIE<BR> -HTTP_FORWARDED<BR> -HTTP_HOST<BR> -HTTP_PROXY_CONNECTION<BR> -HTTP_ACCEPT<BR> -</FONT> -</TD> - -<TD VALIGN=TOP> -<STRONG>connection & request:</STRONG><P> -<FONT SIZE=-1> -REMOTE_ADDR<BR> -REMOTE_HOST<BR> -REMOTE_USER<BR> -REMOTE_IDENT<BR> -REQUEST_METHOD<BR> -SCRIPT_FILENAME<BR> -PATH_INFO<BR> -QUERY_STRING<BR> -AUTH_TYPE<BR> -</FONT> -</TD> - -</TR> -<TR> - -<TD VALIGN=TOP> -<STRONG>server internals:</STRONG><P> -<FONT SIZE=-1> -DOCUMENT_ROOT<BR> -SERVER_ADMIN<BR> -SERVER_NAME<BR> -SERVER_PORT<BR> -SERVER_PROTOCOL<BR> -SERVER_SOFTWARE<BR> -</FONT> -</TD> - -<TD VALIGN=TOP> -<STRONG>system stuff:</STRONG><P> -<FONT SIZE=-1> -TIME_YEAR<BR> -TIME_MON<BR> -TIME_DAY<BR> -TIME_HOUR<BR> -TIME_MIN<BR> -TIME_SEC<BR> -TIME_WDAY<BR> -TIME<BR> -</FONT> -</TD> - -<TD VALIGN=TOP> -<STRONG>specials:</STRONG><P> -<FONT SIZE=-1> -API_VERSION<BR> -THE_REQUEST<BR> -REQUEST_URI<BR> -REQUEST_FILENAME<BR> -IS_SUBREQ<BR> -</FONT> -</TD> -</TR> -</TABLE> - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice:</STRONG> These variables all correspond to the similar named -HTTP MIME-headers, C variables of the Apache server or <CODE>struct tm</CODE> -fields of the Unix system. -</TD></TR> -</TABLE> - -</UL> - -<P> -Special Notes: - -<OL> -<LI>The variables SCRIPT_FILENAME and REQUEST_FILENAME contain the same -value, <EM>i.e.</EM>, the value of the <CODE>filename</CODE> field of -the internal -<CODE>request_rec</CODE> structure of the Apache server. The first name is -just the -commonly known CGI variable name while the second is the consistent -counterpart to REQUEST_URI (which contains the value of the <CODE>uri</CODE> -field of <CODE>request_rec</CODE>). - -<P> -<LI>There is the special format: <CODE>%{ENV:variable}</CODE> where -<EM>variable</EM> can be any environment variable. This is looked-up via -internal Apache structures and (if not found there) via <CODE>getenv()</CODE> -from the Apache server process. - -<P> -<LI>There is the special format: <CODE>%{HTTP:header}</CODE> where -<EM>header</EM> can be any HTTP MIME-header name. This is looked-up -from the HTTP request. Example: <CODE>%{HTTP:Proxy-Connection}</CODE> -is the value of the HTTP header ``<CODE>Proxy-Connection:</CODE>''. - -<P> -<LI>There is the special format <CODE>%{LA-U:variable}</CODE> for look-aheads -which perform an internal (URL-based) sub-request to determine the final value -of <EM>variable</EM>. Use this when you want to use a variable for rewriting -which actually is set later in an API phase and thus is not available at the -current stage. For instance when you want to rewrite according to the -<CODE>REMOTE_USER</CODE> variable from within the per-server context -(<CODE>httpd.conf</CODE> file) you have to use <CODE>%{LA-U:REMOTE_USER}</CODE> -because this variable is set by the authorization phases which come -<EM>after</EM> the URL translation phase where mod_rewrite operates. On the -other hand, because mod_rewrite implements its per-directory context -(<CODE>.htaccess</CODE> file) via the Fixup phase of the API and because the -authorization phases come <EM>before</EM> this phase, you just can use -<CODE>%{REMOTE_USER}</CODE> there. - -<P> -<LI>There is the special format: <CODE>%{LA-F:variable}</CODE> which perform an -internal (filename-based) sub-request to determine the final value of -<EM>variable</EM>. This is the most of the time the same as LA-U above. -</OL> - -<P> -<EM>CondPattern</EM> is the condition pattern, <EM>i.e.</EM>, a regular -expression -which gets applied to the current instance of the <EM>TestString</EM>, -<EM>i.e.</EM>, <EM>TestString</EM> gets evaluated and then matched against -<EM>CondPattern</EM>. - -<P> -<STRONG>Remember:</STRONG> <EM>CondPattern</EM> is a standard -<EM>Extended Regular Expression</EM> with some additions: - -<OL> -<LI>You can precede the pattern string with a '<CODE>!</CODE>' character -(exclamation mark) to specify a <STRONG>non</STRONG>-matching pattern. - -<P> -<LI> -There are some special variants of <EM>CondPatterns</EM>. Instead of real -regular expression strings you can also use one of the following: -<P> -<UL> -<LI>'<STRONG><CondPattern</STRONG>' (is lexicographically lower)<BR> -Treats the <EM>CondPattern</EM> as a plain string and compares it -lexicographically to <EM>TestString</EM> and results in a true expression if -<EM>TestString</EM> is lexicographically lower than <EM>CondPattern</EM>. -<P> -<LI>'<STRONG>>CondPattern</STRONG>' (is lexicographically greater)<BR> -Treats the <EM>CondPattern</EM> as a plain string and compares it -lexicographically to <EM>TestString</EM> and results in a true expression if -<EM>TestString</EM> is lexicographically greater than <EM>CondPattern</EM>. -<P> -<LI>'<STRONG>=CondPattern</STRONG>' (is lexicographically equal)<BR> -Treats the <EM>CondPattern</EM> as a plain string and compares it -lexicographically to <EM>TestString</EM> and results in a true expression if -<EM>TestString</EM> is lexicographically equal to <EM>CondPattern</EM>, i.e the -two strings are exactly equal (character by character). -If <EM>CondPattern</EM> is just <SAMP>""</SAMP> (two quotation marks) this -compares <EM>TestString</EM> against the empty string. -<P> -<LI>'<STRONG>-d</STRONG>' (is <STRONG>d</STRONG>irectory)<BR> -Treats the <EM>TestString</EM> as a pathname and -tests if it exists and is a directory. -<P> -<LI>'<STRONG>-f</STRONG>' (is regular <STRONG>f</STRONG>ile)<BR> -Treats the <EM>TestString</EM> as a pathname and -tests if it exists and is a regular file. -<P> -<LI>'<STRONG>-s</STRONG>' (is regular file with <STRONG>s</STRONG>ize)<BR> -Treats the <EM>TestString</EM> as a pathname and -tests if it exists and is a regular file with size greater than zero. -<P> -<LI>'<STRONG>-l</STRONG>' (is symbolic <STRONG>l</STRONG>ink)<BR> -Treats the <EM>TestString</EM> as a pathname and -tests if it exists and is a symbolic link. -<P> -<LI>'<STRONG>-F</STRONG>' (is existing file via subrequest)<BR> -Checks if <EM>TestString</EM> is a valid file and accessible via all the -server's currently-configured access controls for that path. This uses an -internal subrequest to determine the check, so use it with care because it -decreases your servers performance! -<P> -<LI>'<STRONG>-U</STRONG>' (is existing URL via subrequest)<BR> -Checks if <EM>TestString</EM> is a valid URL and accessible via all the -server's -currently-configured access controls for that path. This uses an internal -subrequest to determine the check, so use it with care because it decreases -your server's performance! -</UL> -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice:</STRONG> -All of these tests can also be prefixed by a not ('!') character -to negate their meaning. -</TD></TR> -</TABLE> -</OL> - -<P> -Additionally you can set special flags for <EM>CondPattern</EM> by appending - -<BLOCKQUOTE><STRONG> -<CODE>[</CODE><EM>flags</EM><CODE>]</CODE> -</STRONG></BLOCKQUOTE> - -as the third argument to the <CODE>RewriteCond</CODE> directive. <EM>Flags</EM> -is a comma-separated list of the following flags: - -<UL> -<LI>'<STRONG><CODE>nocase|NC</CODE></STRONG>' (<STRONG>n</STRONG>o <STRONG>c</STRONG>ase)<BR> - This makes the condition test case-insensitive, <EM>i.e.</EM>, there is - no difference between 'A-Z' and 'a-z' both in the expanded - <EM>TestString</EM> and the <EM>CondPattern</EM>. -<P> -<LI>'<STRONG><CODE>ornext|OR</CODE></STRONG>' (<STRONG>or</STRONG> next condition)<BR> - Use this to combine rule conditions with a local OR instead of the - implicit AND. Typical example: - <P> -<BLOCKQUOTE><PRE> -RewriteCond %{REMOTE_HOST} ^host1.* [OR] -RewriteCond %{REMOTE_HOST} ^host2.* [OR] -RewriteCond %{REMOTE_HOST} ^host3.* -RewriteRule ...some special stuff for any of these hosts... -</PRE></BLOCKQUOTE> - Without this flag you had to write down the cond/rule three times. -</UL> - -<P> -<STRONG>Example:</STRONG> -<BLOCKQUOTE> - -To rewrite the Homepage of a site according to the ``<CODE>User-Agent:</CODE>'' -header of the request, you can use the following: - -<BLOCKQUOTE><PRE> -RewriteCond %{HTTP_USER_AGENT} ^Mozilla.* -RewriteRule ^/$ /homepage.max.html [L] - -RewriteCond %{HTTP_USER_AGENT} ^Lynx.* -RewriteRule ^/$ /homepage.min.html [L] - -RewriteRule ^/$ /homepage.std.html [L] -</PRE></BLOCKQUOTE> - -Interpretation: If you use Netscape Navigator as your browser (which identifies -itself as 'Mozilla'), then you get the max homepage, which includes -Frames, <EM>etc.</EM> If you use the Lynx browser (which is Terminal-based), then you -get the min homepage, which contains no images, no tables, <EM>etc.</EM> If you -use any other browser you get the standard homepage. -</BLOCKQUOTE> - -<P> -<HR NOSHADE SIZE=1> -<P> - -<H3><A NAME="RewriteRule">RewriteRule</A></H3> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> <CODE>RewriteRule</CODE> <EM>Pattern</EM> <EM>Substitution</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>None</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> <EM>FileInfo</EM><BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Extension<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_rewrite.c<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.2 (partially), Apache 1.3<BR> - -<P> -The <CODE>RewriteRule</CODE> directive is the real rewriting workhorse. The -directive can occur more than once. Each directive then defines one single -rewriting rule. The <STRONG>definition order</STRONG> of these rules is -<STRONG>important</STRONG>, because this order is used when applying the rules at -run-time. - -<P> -<A NAME="patterns"><EM>Pattern</EM></A> can be (for Apache 1.1.x a System -V8 and for Apache 1.2.x a POSIX) <A NAME="regexp">regular expression</A> -which gets applied to the current URL. Here ``current'' means the value of the -URL when this rule gets applied. This may not be the original requested -URL, because there could be any number of rules before which already matched -and made alterations to it. - -<P> -Some hints about the syntax of regular expressions: - -<P> -<TABLE BGCOLOR="#F0F0F0" CELLSPACING=0 CELLPADDING=5> -<TR> -<TD VALIGN=TOP> -<PRE> -<STRONG>Text:</STRONG> - <STRONG><CODE>.</CODE></STRONG> Any single character - <STRONG><CODE>[</CODE></STRONG>chars<STRONG><CODE>]</CODE></STRONG> Character class: One of chars - <STRONG><CODE>[^</CODE></STRONG>chars<STRONG><CODE>]</CODE></STRONG> Character class: None of chars - text1<STRONG><CODE>|</CODE></STRONG>text2 Alternative: text1 or text2 - -<STRONG>Quantifiers:</STRONG> - <STRONG><CODE>?</CODE></STRONG> 0 or 1 of the preceding text - <STRONG><CODE>*</CODE></STRONG> 0 or N of the preceding text (N > 1) - <STRONG><CODE>+</CODE></STRONG> 1 or N of the preceding text (N > 1) - -<STRONG>Grouping:</STRONG> - <STRONG><CODE>(</CODE></STRONG>text<STRONG><CODE>)</CODE></STRONG> Grouping of text - (either to set the borders of an alternative or - for making backreferences where the <STRONG>N</STRONG>th group can - be used on the RHS of a RewriteRule with <CODE>$</CODE><STRONG>N</STRONG>) - -<STRONG>Anchors:</STRONG> - <STRONG><CODE>^</CODE></STRONG> Start of line anchor - <STRONG><CODE>$</CODE></STRONG> End of line anchor - -<STRONG>Escaping:</STRONG> - <STRONG><CODE>\</CODE></STRONG>char escape that particular char - (for instance to specify the chars "<CODE>.[]()</CODE>" <EM>etc.</EM>) -</PRE> -</TD> -</TR> -</TABLE> - -<P> -For more information about regular expressions either have a look at your -local regex(3) manpage or its <CODE>src/regex/regex.3</CODE> copy in the -Apache 1.3 distribution. When you are interested in more detailed and deeper -information about regular expressions and its variants (POSIX regex, Perl -regex, <EM>etc.</EM>) have a look at the following dedicated book on this topic: - -<BLOCKQUOTE> -<EM>Mastering Regular Expressions</EM><BR> -Jeffrey E.F. Friedl<BR> -Nutshell Handbook Series<BR> -O'Reilly & Associates, Inc. 1997<BR> -ISBN 1-56592-257-3<BR> -</BLOCKQUOTE> - -<P> -Additionally in mod_rewrite the NOT character ('<CODE>!</CODE>') is a possible -pattern prefix. This gives you the ability to negate a pattern; to say, for -instance: ``<EM>if the current URL does <STRONG>NOT</STRONG> match to this -pattern</EM>''. This can be used for special cases where it is better to match -the negative pattern or as a last default rule. - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice:</STRONG> When using the NOT character to negate a pattern you cannot -have grouped wildcard parts in the pattern. This is impossible because when -the pattern does NOT match, there are no contents for the groups. In -consequence, if negated patterns are used, you cannot use <CODE>$N</CODE> in the -substitution string! -</TD></TR> -</TABLE> - -<P> -<A NAME="rhs"><EM>Substitution</EM></A> of a rewriting rule is the string -which is substituted for (or replaces) the original URL for which -<EM>Pattern</EM> matched. Beside plain text you can use - -<OL> -<LI>back-references <CODE>$N</CODE> to the RewriteRule pattern -<LI>back-references <CODE>%N</CODE> to the last matched RewriteCond pattern -<LI>server-variables as in rule condition test-strings (<CODE>%{VARNAME}</CODE>) -<LI><A HREF="#mapfunc">mapping-function</A> calls (<CODE>${mapname:key|default}</CODE>) -</OL> - -Back-references are <CODE>$</CODE><STRONG>N</STRONG> (<STRONG>N</STRONG>=1..9) identifiers which -will be replaced by the contents of the <STRONG>N</STRONG>th group of the matched -<EM>Pattern</EM>. The server-variables are the same as for the -<EM>TestString</EM> of a <CODE>RewriteCond</CODE> directive. The -mapping-functions come from the <CODE>RewriteMap</CODE> directive and are -explained there. These three types of variables are expanded in the order of -the above list. - -<P> -As already mentioned above, all the rewriting rules are applied to the -<EM>Substitution</EM> (in the order of definition in the config file). The -URL is <STRONG>completely replaced</STRONG> by the <EM>Substitution</EM> and the -rewriting process goes on until there are no more rules (unless explicitly -terminated by a <CODE><STRONG>L</STRONG></CODE> flag - see below). - -<P> -There is a special substitution string named '<CODE>-</CODE>' which means: -<STRONG>NO substitution</STRONG>! Sounds silly? No, it is useful to provide rewriting -rules which <STRONG>only</STRONG> match some URLs but do no substitution, <EM>e.g.</EM>, in -conjunction with the <STRONG>C</STRONG> (chain) flag to be able to have more than one -pattern to be applied before a substitution occurs. - -<P> -One more note: You can even create URLs in the substitution string containing -a query string part. Just use a question mark inside the substitution string -to indicate that the following stuff should be re-injected into the -QUERY_STRING. When you want to erase an existing query string, end the -substitution string with just the question mark. - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice</STRONG>: There is a special feature. When you prefix a substitution -field with <CODE>http://</CODE><EM>thishost</EM>[<EM>:thisport</EM>] then -<STRONG>mod_rewrite</STRONG> automatically strips it out. This auto-reduction on -implicit external redirect URLs is a useful and important feature when -used in combination with a mapping-function which generates the hostname -part. Have a look at the first example in the example section below to -understand this. -</TD></TR> -</TABLE> - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Remember:</STRONG> An unconditional external redirect to your own server will -not work with the prefix <CODE>http://thishost</CODE> because of this feature. -To achieve such a self-redirect, you have to use the <STRONG>R</STRONG>-flag (see -below). -</TD></TR> -</TABLE> - -<P> -Additionally you can set special flags for <EM>Substitution</EM> by appending - -<BLOCKQUOTE><STRONG> -<CODE>[</CODE><EM>flags</EM><CODE>]</CODE> -</STRONG></BLOCKQUOTE> - -as the third argument to the <CODE>RewriteRule</CODE> directive. <EM>Flags</EM> is a -comma-separated list of the following flags: - -<UL> -<LI>'<STRONG><CODE>redirect|R</CODE> [=<EM>code</EM>]</STRONG>' (force <A NAME="redirect"><STRONG>r</STRONG>edirect</A>)<BR> - Prefix <EM>Substitution</EM> - with <CODE>http://thishost[:thisport]/</CODE> (which makes the new URL a URI) to - force a external redirection. If no <EM>code</EM> is given a HTTP response - of 302 (MOVED TEMPORARILY) is used. If you want to use other response - codes in the range 300-400 just specify them as a number or use - one of the following symbolic names: <CODE>temp</CODE> (default), <CODE>permanent</CODE>, - <CODE>seeother</CODE>. - Use it for rules which should - canonicalize the URL and gives it back to the client, <EM>e.g.</EM>, translate - ``<CODE>/~</CODE>'' into ``<CODE>/u/</CODE>'' or always append a slash to - <CODE>/u/</CODE><EM>user</EM>, etc.<BR> - <P> - <STRONG>Notice:</STRONG> When you use this flag, make sure that the - substitution field is a valid URL! If not, you are redirecting to an - invalid location! And remember that this flag itself only prefixes the - URL with <CODE>http://thishost[:thisport]/</CODE>, but rewriting goes on. - Usually you also want to stop and do the redirection immediately. To stop - the rewriting you also have to provide the 'L' flag. -<P> -<LI>'<STRONG><CODE>forbidden|F</CODE></STRONG>' (force URL to be <STRONG>f</STRONG>orbidden)<BR> - This forces the current URL to be forbidden, <EM>i.e.</EM>, it immediately sends - back a HTTP response of 403 (FORBIDDEN). Use this flag in conjunction with - appropriate RewriteConds to conditionally block some URLs. -<P> -<LI>'<STRONG><CODE>gone|G</CODE></STRONG>' (force URL to be <STRONG>g</STRONG>one)<BR> - This forces the current URL to be gone, <EM>i.e.</EM>, it immediately sends back a - HTTP response of 410 (GONE). Use this flag to mark no longer existing - pages as gone. -<P> -<LI>'<STRONG><CODE>proxy|P</CODE></STRONG>' (force <STRONG>p</STRONG>roxy)<BR> - This flag forces the substitution part to be internally forced as a proxy - request and immediately (<EM>i.e.</EM>, rewriting rule processing stops here) put - through the <A HREF="mod_proxy.html">proxy module</A>. You have to make - sure that the substitution string is a valid URI (<EM>e.g.</EM>, typically starting - with <CODE>http://</CODE><EM>hostname</EM>) which can be handled by the - Apache proxy module. If not you get an error from the proxy module. Use - this flag to achieve a more powerful implementation of the <A - HREF="mod_proxy.html#proxypass">ProxyPass</A> directive, to map some - remote stuff into the namespace of the local server. - <P> - Notice: To use this functionality make sure you have the proxy module - compiled into your Apache server program. If you don't know please check - whether <CODE>mod_proxy.c</CODE> is part of the ``<CODE>httpd -l</CODE>'' - output. If yes, this functionality is available to mod_rewrite. If not, - then you first have to rebuild the ``<CODE>httpd</CODE>'' program with - mod_proxy enabled. -<P> -<LI>'<STRONG><CODE>last|L</CODE></STRONG>' (<STRONG>l</STRONG>ast rule)<BR> - Stop the rewriting process here and - don't apply any more rewriting rules. This corresponds to the Perl - <CODE>last</CODE> command or the <CODE>break</CODE> command from the C - language. Use this flag to prevent the currently rewritten URL from being - rewritten further by following rules which may be wrong. For - example, use it to rewrite the root-path URL ('<CODE>/</CODE>') to a real - one, <EM>e.g.</EM>, '<CODE>/e/www/</CODE>'. -<P> -<LI>'<STRONG><CODE>next|N</CODE></STRONG>' (<STRONG>n</STRONG>ext round)<BR> - Re-run the rewriting process (starting again with the first rewriting - rule). Here the URL to match is again not the original URL but the URL - from the last rewriting rule. This corresponds to the Perl - <CODE>next</CODE> command or the <CODE>continue</CODE> command from the C - language. Use this flag to restart the rewriting process, <EM>i.e.</EM>, to - immediately go to the top of the loop. <BR> - <STRONG>But be careful not to create a deadloop!</STRONG> -<P> -<LI>'<STRONG><CODE>chain|C</CODE></STRONG>' (<STRONG>c</STRONG>hained with next rule)<BR> - This flag chains the current rule with the next rule (which itself can - also be chained with its following rule, <EM>etc.</EM>). This has the following - effect: if a rule matches, then processing continues as usual, <EM>i.e.</EM>, the - flag has no effect. If the rule does <STRONG>not</STRONG> match, then all following - chained rules are skipped. For instance, use it to remove the - ``<CODE>.www</CODE>'' part inside a per-directory rule set when you let an - external redirect happen (where the ``<CODE>.www</CODE>'' part should not to - occur!). -<P> -<LI>'<STRONG><CODE>type|T</CODE></STRONG>=<EM>MIME-type</EM>' (force MIME <STRONG>t</STRONG>ype)<BR> - Force the MIME-type of the target file to be <EM>MIME-type</EM>. For - instance, this can be used to simulate the <CODE>mod_alias</CODE> - directive <CODE>ScriptAlias</CODE> which internally forces all files inside - the mapped directory to have a MIME type of - ``<CODE>application/x-httpd-cgi</CODE>''. -<P> -<LI>'<STRONG><CODE>nosubreq|NS</CODE></STRONG>' (used only if <STRONG>n</STRONG>o internal <STRONG>s</STRONG>ub-request)<BR> - This flag forces the rewriting engine to skip a rewriting rule if the - current request is an internal sub-request. For instance, sub-requests - occur internally in Apache when <CODE>mod_include</CODE> tries to find out - information about possible directory default files (<CODE>index.xxx</CODE>). - On sub-requests it is not always useful and even sometimes causes a failure to - if the complete set of rules are applied. Use this flag to exclude some rules.<BR> - <P> - Use the following rule for your decision: whenever you prefix some URLs - with CGI-scripts to force them to be processed by the CGI-script, the - chance is high that you will run into problems (or even overhead) on sub-requests. - In these cases, use this flag. -<P> -<LI>'<STRONG><CODE>nocase|NC</CODE></STRONG>' (<STRONG>n</STRONG>o <STRONG>c</STRONG>ase)<BR> - This makes the <EM>Pattern</EM> case-insensitive, <EM>i.e.</EM>, there is - no difference between 'A-Z' and 'a-z' when <EM>Pattern</EM> is matched - against the current URL. -<P> -<LI>'<STRONG><CODE>qsappend|QSA</CODE></STRONG>' (<STRONG>q</STRONG>uery <STRONG>s</STRONG>tring - <STRONG>a</STRONG>ppend)<BR> - This flag forces the rewriting engine to append a query - string part in the substitution string to the existing one instead of - replacing it. Use this when you want to add more data to the query string - via a rewrite rule. -<P> -<LI>'<STRONG><CODE>passthrough|PT</CODE></STRONG>' (<STRONG>p</STRONG>ass <STRONG>t</STRONG>hrough to next handler)<BR> - This flag forces the rewriting engine to set the <CODE>uri</CODE> field - of the internal <CODE>request_rec</CODE> structure to the value - of the <CODE>filename</CODE> field. This flag is just a hack to be able - to post-process the output of <CODE>RewriteRule</CODE> directives by - <CODE>Alias</CODE>, <CODE>ScriptAlias</CODE>, <CODE>Redirect</CODE>, <EM>etc.</EM> directives - from other URI-to-filename translators. A trivial example to show the - semantics: - If you want to rewrite <CODE>/abc</CODE> to <CODE>/def</CODE> via the rewriting - engine of <CODE>mod_rewrite</CODE> and then <CODE>/def</CODE> to <CODE>/ghi</CODE> - with <CODE>mod_alias</CODE>: - <PRE> - RewriteRule ^/abc(.*) /def$1 [PT] - Alias /def /ghi - </PRE> - If you omit the <CODE>PT</CODE> flag then <CODE>mod_rewrite</CODE> - will do its job fine, <EM>i.e.</EM>, it rewrites <CODE>uri=/abc/...</CODE> to - <CODE>filename=/def/...</CODE> as a full API-compliant URI-to-filename - translator should do. Then <CODE>mod_alias</CODE> comes and tries to do a - URI-to-filename transition which will not work. - <P> - Notice: <STRONG>You have to use this flag if you want to intermix directives - of different modules which contain URL-to-filename translators</STRONG>. The - typical example is the use of <CODE>mod_alias</CODE> and - <CODE>mod_rewrite</CODE>.. -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<font size=-1> - <STRONG>Notice - For the Apache hackers:</STRONG><BR> - If the current Apache API had a - filename-to-filename hook additionally to the URI-to-filename hook then - we wouldn't need this flag! But without such a hook this flag is the - only solution. The Apache Group has discussed this problem and will - add such hooks into Apache version 2.0. -</FONT> -</TD></TR> -</TABLE> -<P> -<LI>'<STRONG><CODE>skip|S</CODE></STRONG>=<EM>num</EM>' (<STRONG>s</STRONG>kip next rule(s))<BR> - This flag forces the rewriting engine to skip the next <EM>num</EM> rules - in sequence when the current rule matches. Use this to make pseudo - if-then-else constructs: The last rule of the then-clause becomes - a <CODE>skip=N</CODE> where N is the number of rules in the else-clause. - (This is <STRONG>not</STRONG> the same as the 'chain|C' flag!) -<P> -<LI>'<STRONG><CODE>env|E=</CODE></STRONG><EM>VAR</EM>:<EM>VAL</EM>' (set <STRONG>e</STRONG>nvironment variable)<BR> - This forces an environment variable named <EM>VAR</EM> to be set to the - value <EM>VAL</EM>, where <EM>VAL</EM> can contain regexp backreferences - <CODE>$N</CODE> and <CODE>%N</CODE> which will be expanded. You can use this flag - more than once to set more than one variable. The variables can be later - dereferenced at a lot of situations, but the usual location will be from - within XSSI (via <CODE><!--#echo var="VAR"--></CODE>) or CGI (<EM>e.g.</EM> - <CODE>$ENV{'VAR'}</CODE>). But additionally you can also dereference it in a - following RewriteCond pattern via <CODE>%{ENV:VAR}</CODE>. Use this to strip - but remember information from URLs. -</UL> - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice:</STRONG> Never forget that <EM>Pattern</EM> gets applied to a complete URL -in per-server configuration files. <STRONG>But in per-directory configuration -files, the per-directory prefix (which always is the same for a specific -directory!) gets automatically <EM>removed</EM> for the pattern matching and -automatically <EM>added</EM> after the substitution has been done.</STRONG> This feature is -essential for many sorts of rewriting, because without this prefix stripping -you have to match the parent directory which is not always possible. -<P> -There is one exception: If a substitution string starts with -``<CODE>http://</CODE>'' then the directory prefix will be <STRONG>not</STRONG> added and a -external redirect or proxy throughput (if flag <STRONG>P</STRONG> is used!) is forced! -</TD></TR> -</TABLE> - -<P> -<TABLE WIDTH="70%" BORDER=0 BGCOLOR="#E0E0F0" CELLSPACING=0 CELLPADDING=10> -<TR><TD> -<STRONG>Notice:</STRONG> To enable the rewriting engine for per-directory configuration files -you need to set ``<CODE>RewriteEngine On</CODE>'' in these files <STRONG>and</STRONG> -``<CODE>Option FollowSymLinks</CODE>'' enabled. If your administrator has -disabled override of <CODE>FollowSymLinks</CODE> for a user's directory, then -you cannot use the rewriting engine. This restriction is needed for -security reasons. -</TD></TR> -</TABLE> - -<P> -Here are all possible substitution combinations and their meanings: - -<P> -<STRONG>Inside per-server configuration (<CODE>httpd.conf</CODE>)<BR> -for request ``<CODE>GET /somepath/pathinfo</CODE>'':</STRONG><BR> - -<P> -<TABLE BGCOLOR="#F0F0F0" CELLSPACING=0 CELLPADDING=5> -<TR> -<TD> -<PRE> -<STRONG>Given Rule</STRONG> <STRONG>Resulting Substitution</STRONG> ----------------------------------------------- ---------------------------------- -^/somepath(.*) otherpath$1 not supported, because invalid! - -^/somepath(.*) otherpath$1 [R] not supported, because invalid! - -^/somepath(.*) otherpath$1 [P] not supported, because invalid! ----------------------------------------------- ---------------------------------- -^/somepath(.*) /otherpath$1 /otherpath/pathinfo - -^/somepath(.*) /otherpath$1 [R] http://thishost/otherpath/pathinfo - via external redirection - -^/somepath(.*) /otherpath$1 [P] not supported, because silly! ----------------------------------------------- ---------------------------------- -^/somepath(.*) http://thishost/otherpath$1 /otherpath/pathinfo - -^/somepath(.*) http://thishost/otherpath$1 [R] http://thishost/otherpath/pathinfo - via external redirection - -^/somepath(.*) http://thishost/otherpath$1 [P] not supported, because silly! ----------------------------------------------- ---------------------------------- -^/somepath(.*) http://otherhost/otherpath$1 http://otherhost/otherpath/pathinfo - via external redirection - -^/somepath(.*) http://otherhost/otherpath$1 [R] http://otherhost/otherpath/pathinfo - via external redirection - (the [R] flag is redundant) - -^/somepath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo - via internal proxy -</PRE> -</TD> -</TR> -</TABLE> - -<P> -<STRONG>Inside per-directory configuration for <CODE>/somepath</CODE><BR> -(<EM>i.e.</EM>, file <CODE>.htaccess</CODE> in dir <CODE>/physical/path/to/somepath</CODE> containing -<CODE>RewriteBase /somepath</CODE>)<BR> for -request ``<CODE>GET /somepath/localpath/pathinfo</CODE>'':</STRONG><BR> - -<P> -<TABLE BGCOLOR="#F0F0F0" CELLSPACING=0 CELLPADDING=5> -<TR> -<TD> -<PRE> -<STRONG>Given Rule</STRONG> <STRONG>Resulting Substitution</STRONG> ----------------------------------------------- ---------------------------------- -^localpath(.*) otherpath$1 /somepath/otherpath/pathinfo - -^localpath(.*) otherpath$1 [R] http://thishost/somepath/otherpath/pathinfo - via external redirection - -^localpath(.*) otherpath$1 [P] not supported, because silly! ----------------------------------------------- ---------------------------------- -^localpath(.*) /otherpath$1 /otherpath/pathinfo - -^localpath(.*) /otherpath$1 [R] http://thishost/otherpath/pathinfo - via external redirection - -^localpath(.*) /otherpath$1 [P] not supported, because silly! ----------------------------------------------- ---------------------------------- -^localpath(.*) http://thishost/otherpath$1 /otherpath/pathinfo - -^localpath(.*) http://thishost/otherpath$1 [R] http://thishost/otherpath/pathinfo - via external redirection - -^localpath(.*) http://thishost/otherpath$1 [P] not supported, because silly! ----------------------------------------------- ---------------------------------- -^localpath(.*) http://otherhost/otherpath$1 http://otherhost/otherpath/pathinfo - via external redirection - -^localpath(.*) http://otherhost/otherpath$1 [R] http://otherhost/otherpath/pathinfo - via external redirection - (the [R] flag is redundant) - -^localpath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo - via internal proxy -</PRE> -</TD> -</TR> -</TABLE> - -<P> -<STRONG>Example:</STRONG> -<P> -<BLOCKQUOTE> -We want to rewrite URLs of the form -<BLOCKQUOTE> -<CODE>/</CODE> <EM>Language</EM> -<CODE>/~</CODE> <EM>Realname</EM> -<CODE>/.../</CODE> <EM>File</EM> -</BLOCKQUOTE> -into -<BLOCKQUOTE> -<CODE>/u/</CODE> <EM>Username</EM> -<CODE>/.../</CODE> <EM>File</EM> -<CODE>.</CODE> <EM>Language</EM> -</BLOCKQUOTE> -<P> -We take the rewrite mapfile from above and save it under -<CODE>/path/to/file/map.txt</CODE>. Then we only have to add the -following lines to the Apache server configuration file: - -<BLOCKQUOTE> -<PRE> -RewriteLog /path/to/file/rewrite.log -RewriteMap real-to-user txt:/path/to/file/map.txt -RewriteRule ^/([^/]+)/~([^/]+)/(.*)$ /u/${real-to-user:$2|nobody}/$3.$1 -</PRE> -</BLOCKQUOTE> - -</BLOCKQUOTE> - -<P> -<HR NOSHADE SIZE=1> - -<CENTER> -<H1><A NAME="Miscelleneous">Miscellaneous</A></H1> -</CENTER> - -<P> -<HR NOSHADE SIZE=1> - -<H2><A NAME="EnvVar">Environment Variables</A></H2> - -This module keeps track of two additional (non-standard) CGI/SSI environment -variables named <CODE>SCRIPT_URL</CODE> and <CODE>SCRIPT_URI</CODE>. These contain -the <EM>logical</EM> Web-view to the current resource, while the standard CGI/SSI -variables <CODE>SCRIPT_NAME</CODE> and <CODE>SCRIPT_FILENAME</CODE> contain the -<EM>physical</EM> System-view. - -<P> -Notice: These variables hold the URI/URL <EM>as they were initially -requested</EM>, <EM>i.e.</EM>, in a state <EM>before</EM> any rewriting. This is -important because the rewriting process is primarily used to rewrite logical -URLs to physical pathnames. - -<P> -<STRONG>Example:</STRONG> - -<BLOCKQUOTE> -<PRE> -SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html -SCRIPT_FILENAME=/u/rse/.www/index.html -SCRIPT_URL=/u/rse/ -SCRIPT_URI=http://en1.engelschall.com/u/rse/ -</PRE> -</BLOCKQUOTE> - -<P> -<HR NOSHADE SIZE=1> - -<H2><A NAME="Solutions">Practical Solutions</A></H2> - -There is a comprehensive collection of practical solutions for URL-based -problems available by the author of mod_rewrite. Here you will find real-life -rulesets and additional information. - -<BLOCKQUOTE> -<STRONG>Apache URL Rewriting Guide</STRONG><BR> -<STRONG><A HREF="http://www.engelschall.com/pw/apache/rewriteguide/" - >http://www.engelschall.com/pw/apache/rewriteguide/</A></STRONG> -</BLOCKQUOTE> - -<!--#include virtual="footer.html" --> -</BLOCKQUOTE><!-- page indentation --> -</BODY> -</HTML> -<!--/%hypertext --> diff --git a/docs/manual/mod/mod_setenvif.html b/docs/manual/mod/mod_setenvif.html deleted file mode 100644 index 868a1106ae..0000000000 --- a/docs/manual/mod/mod_setenvif.html +++ /dev/null @@ -1,398 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Apache module mod_setenvif</TITLE> - </HEAD> -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> - <BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" - > -<!--#include virtual="header.html" --> - <H1 ALIGN="CENTER">Module mod_setenvif</H1> - <P> - This module is contained in the <SAMP>mod_setenvif.c</SAMP> file, and - <STRONG>is</STRONG> compiled in by default. It provides for - the ability to set environment variables based upon attributes of the - request. - </P> - <H2>Summary</H2> - <P> - The <SAMP>mod_setenvif</SAMP> module allows you to set environment - variables according to whether different aspects of the request match - regular expressions you specify. These envariables can be used by - other parts of the server to make decisions about actions to be taken. - </P> - <P>The directives are considered in the order they appear in the - configuration files. So more complex sequences can be used, such - as this example, which sets <CODE>netscape</CODE> if the browser - is mozilla but not MSIE. - <BLOCKQUOTE><PRE> - BrowserMatch ^Mozilla netscape - BrowserMatch MSIE !netscape - </PRE></BLOCKQUOTE> - </P> - - <H2>Directives</H2> - <UL> - <LI><A HREF="#BrowserMatch">BrowserMatch</A> - </LI> - <LI><A HREF="#BrowserMatchNoCase">BrowserMatchNoCase</A> - </LI> - <LI><A HREF="#SetEnvIf">SetEnvIf</A> - </LI> - <LI><A HREF="#SetEnvIfNoCase">SetEnvIfNoCase</A> - </LI> - </UL> - - <HR> <!-- the HR is part of the directive description --> - <H2><A NAME="BrowserMatch">The <SAMP>BrowserMatch</SAMP> Directive</A></H2> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> BrowserMatch <EM>regex envar[=value] [...]</EM> - <BR> - <A - HREF="directive-dict.html#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> <EM>none</EM> - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> <EM>none</EM> - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Base - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_setenvif - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> Apache 1.2 and above (in Apache 1.2 - this directive was found in the now-obsolete mod_browser module) - </P> - <P> - The BrowserMatch directive defines environment variables based on the - <SAMP>User-Agent</SAMP> HTTP request header field. The first argument - should be a POSIX.2 extended regular expression (similar to an - <SAMP>egrep</SAMP>-style regex). The rest of the arguments give the - names of variables to set, and optionally values to which they should - be set. These take the form of - </P> - <OL> - <LI><SAMP><EM>varname</EM></SAMP>, or - </LI> - <LI><SAMP>!<EM>varname</EM></SAMP>, or - </LI> - <LI><SAMP><EM>varname</EM>=<EM>value</EM></SAMP> - </LI> - </OL> - <P> - In the first form, the value will be set to "1". The second - will remove the given variable if already defined, and the third will - set the variable to the value given by <SAMP><EM>value</EM></SAMP>. If a - <SAMP>User-Agent</SAMP> string matches more than one entry, they will - be merged. Entries are processed in the order in which they appear, - and later entries can override earlier ones. - </P> - <P> - For example: - </P> - <PRE> - BrowserMatch ^Mozilla forms jpeg=yes browser=netscape - BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript - BrowserMatch MSIE !javascript - </PRE> - <P> - Note that the regular expression string is - <STRONG>case-sensitive</STRONG>. For cane-INsensitive matching, see - the - <A - HREF="#BrowserMatchNoCase" - ><SAMP>BrowserMatchNoCase</SAMP></A> - directive. - </P> - <P> - The <SAMP>BrowserMatch</SAMP> and <SAMP>BrowserMatchNoCase</SAMP> - directives are special cases of the - <A - HREF="#SetEnvIf" - ><SAMP>SetEnvIf</SAMP></A> - and - <A - HREF="#SetEnvIfNoCase" - ><SAMP>SetEnvIfNoCase</SAMP></A> - directives. The following two lines have the same effect: - </P> - <PRE> - BrowserMatchNoCase Robot is_a_robot - SetEnvIfNoCase User-Agent Robot is_a_robot - </PRE> - - <HR> <!-- the HR is part of the directive description --> - <H2> - <A NAME="BrowserMatchNoCase"> - The <SAMP>BrowserMatchNoCase</SAMP> Directive - </A> - </H2> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> BrowserMatchNoCase <EM>regex envar[=value] - [...]</EM> - <BR> - <A - HREF="directive-dict.html#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> <EM>none</EM> - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> <EM>none</EM> - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Base - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_setenvif - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> Apache 1.2 and above (in Apache 1.2 - this directive was found in the now-obsolete mod_browser module) - </P> - <P> - The <SAMP>BrowserMatchNoCase</SAMP> directive is semantically identical to - the - <A - HREF="#BrowserMatch" - ><SAMP>BrowserMatch</SAMP></A> - directive. However, it provides for case-insensitive matching. For - example: - </P> - <PRE> - BrowserMatchNoCase mac platform=macintosh - BrowserMatchNoCase win platform=windows - </PRE> - <P> - The <SAMP>BrowserMatch</SAMP> and <SAMP>BrowserMatchNoCase</SAMP> - directives are special cases of the - <A - HREF="#SetEnvIf" - ><SAMP>SetEnvIf</SAMP></A> - and - <A - HREF="#SetEnvIfNoCase" - ><SAMP>SetEnvIfNoCase</SAMP></A> - directives. The following two lines have the same effect: - </P> - <PRE> - BrowserMatchNoCase Robot is_a_robot - SetEnvIfNoCase User-Agent Robot is_a_robot - </PRE> - - <HR> <!-- the HR is part of the directive description --> - <H2> - <A NAME="SetEnvIf"> - The <SAMP>SetEnvIf</SAMP> Directive - </A> - </H2> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> SetEnvIf <EM> attribute regex envar[=value] - [...]</EM> - <BR> - <A - HREF="directive-dict.html#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> <EM>none</EM> - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> <EM>none</EM> - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Base - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_setenvif - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> Apache 1.3 and above; the - Request_Protocol keyword and environment-variable matching are only - available with 1.3.7 and later - </P> - <P> - The <SAMP>SetEnvIf</SAMP> directive defines environment variables - based on attributes of the request. These attributes can be the - values of various HTTP request header fields (see - <A - HREF="http://ds.internic.net/rfc/rfc2068.txt" - >RFC2068</A> - for more information about these), or of other aspects of the request, - including the following: - </P> - <UL> - <LI><SAMP>Remote_Host</SAMP> - the hostname (if available) of the - client making the request - </LI> - <LI><SAMP>Remote_Addr</SAMP> - the IP address of the client making - the request - </LI> - <LI><SAMP>Remote_User</SAMP> - the authenticated username (if - available) - </LI> - <LI><SAMP>Request_Method</SAMP> - the name of the method being used - (<SAMP>GET</SAMP>, <SAMP>POST</SAMP>, <EM>et cetera</EM>) - </LI> - <LI><SAMP>Request_Protocol</SAMP> - the name and version of the protocol - with which the request was made (<EM>e.g.</EM>, "HTTP/0.9", "HTTP/1.1", - <EM>etc.</EM>) - </LI> - <LI><SAMP>Request_URI</SAMP> - the portion of the URL following the - scheme and host portion - </LI> - </UL> - <P> - Some of the more commonly used request header field names include - <SAMP>Host</SAMP>, <SAMP>User-Agent</SAMP>, and <SAMP>Referer</SAMP>. - </P> - <P> - If the <EM>attribute</EM> name doesn't match any of the special keywords, - nor any of the request's header field names, it is tested as the name - of an environment variable in the list of those associated with the request. - This allows <CODE>SetEnvIf</CODE> directives to test against the result - of prior matches. - </P> - <BLOCKQUOTE> - <STRONG>Only those environment variables defined by earlier - <CODE>SetEnvIf[NoCase]</CODE> directives are available for testing in - this manner. 'Earlier' means that they were defined at a broader scope - (such as server-wide) or previously in the current directive's - scope.</STRONG> - </BLOCKQUOTE> - <P> - Example: - </P> - <PRE> - SetEnvIf Request_URI "\.gif$" object_is_image=gif - SetEnvIf Request_URI "\.jpg$" object_is_image=jpg - SetEnvIf Request_URI "\.xbm$" object_is_image=xbm - : - SetEnvIf Referer www\.mydomain\.com intra_site_referral - : - SetEnvIf object_is_image xbm XBIT_PROCESSING=1 - </PRE> - <P> - The first three will set the envariable <SAMP>object_is_image</SAMP> if the - request was for an image file, and the fourth sets - <SAMP>intra_site_referral</SAMP> if the referring page was somewhere - on the <SAMP>www.mydomain.com</SAMP> Web site. - </P> - - <HR> <!-- the HR is part of the directive description --> - <H2> - <A NAME="SetEnvIfNoCase"> - The <SAMP>SetEnvIfNoCase</SAMP> Directive - </A> - </H2> - <P> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> SetEnvIfNoCase - <EM> attribute regex envar[=value] [...]</EM> - <BR> - <A - HREF="directive-dict.html#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> <EM>none</EM> - <BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config - <BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> <EM>none</EM> - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Base - <BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_setenvif - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> Apache 1.3 and above - </P> - <P> - The <SAMP>SetEnvIfNoCase</SAMP> is semantically identical to the - <A - HREF="#SetEnvIf" - ><SAMP>SetEnvIf</SAMP></A> - directive, and differs only in that the regular expression matching is - performed in a case-insensitive manner. For example: - </P> - <PRE> - SetEnvIfNoCase Host Apache\.Org site=apache - </PRE> - <P> - This will cause the <SAMP>site</SAMP> envariable to be set to - "<SAMP>apache</SAMP>" if the HTTP request header field - <SAMP>Host:</SAMP> was included and contained <SAMP>Apache.Org</SAMP>, - <SAMP>apache.org</SAMP>, or any other combination. - </P> - -<!--#include virtual="footer.html" --> - </BODY> -</HTML> diff --git a/docs/manual/mod/mod_so.html b/docs/manual/mod/mod_so.html deleted file mode 100644 index 6edd1a4fb3..0000000000 --- a/docs/manual/mod/mod_so.html +++ /dev/null @@ -1,164 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_so</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_so</H1> - -This module is contained in the <CODE>mod_so.c</CODE> file. It is -compiled in by default on Windows and is not compiled in by default on -Unix. It provides for loading of executable code and modules into the -server at start-up or restart time. On Unix, the loaded code typically -comes from shared object files (usually with <SAMP>.so</SAMP> -extension), whilst on Windows this module loads <SAMP>DLL</SAMP> -files. This module is only available in Apache 1.3 and up. - -<P> - -In previous releases, the functionality of this module was provided -for Unix by mod_dld, and for Windows by mod_dll. On Windows, mod_dll -was used in beta release 1.3b1 through 1.3b5. mod_so combines these -two modules into a single module for all operating systems. - -<H2>Summary</H2> - -This is an experimental module. On selected operating systems it can be used -to load modules into Apache at runtime via the <A HREF="../dso.html">Dynamic -Shared Object</A> (DSO) mechanism, rather than requiring a recompilation. - -<H2>Directives</H2> -<UL> -<LI><A HREF="#loadfile">LoadFile</A> -<LI><A HREF="#loadmodule">LoadModule</A> -</UL> -<HR> - - -<H2><A NAME="loadfile">LoadFile</A></H2> -<!--%plaintext <?INDEX {\tt LoadFile} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LoadFile <EM>filename filename ...</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_so<P> - -The LoadFile directive links in the named object files or libraries -when the server is started or restarted; this is used to load -additional code which may be required for some module to -work. <EM>Filename</EM> is either and absolute path or relative to <A -HREF="core.html#serverroot">ServerRoot</A>.<P><HR> - -<H2><A NAME="loadmodule">LoadModule</A></H2> -<!--%plaintext <?INDEX {\tt LoadModule} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> LoadModule <EM>module filename</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_so<P> - -The LoadModule directive links in the object file or library <EM>filename</EM> -and adds the module structure named <EM>module</EM> to the list of active -modules. <EM>Module</EM> is the name of the external variable of type -<CODE>module</CODE> in the file. Example (Unix): -<BLOCKQUOTE><CODE> -LoadModule status_module modules/mod_status.so -</CODE></BLOCKQUOTE> - -<P> - -Example (Windows): -<BLOCKQUOTE><CODE> -LoadModule status_module modules/ApacheModuleStatus.dll<BR> -</CODE></BLOCKQUOTE> - -loads the named module from the modules subdirectory of the -ServerRoot.<P> - -<HR> - -<H2><A NAME="creating">Creating DLL Modules for Windows</A></H2> - -<P>The Apache module API is unchanged between the Unix and Windows - versions. Many modules will run on Windows with no or little change - from Unix, although others rely on aspects of the Unix architecture - which are not present in Windows, and will not work.</P> - -<P>When a module does work, it can be added to the server in one of two - ways. As with Unix, it can be compiled into the server. Because Apache - for Windows does not have the <CODE>Configure</CODE> program of Apache - for Unix, the module's source file must be added to the ApacheCore - project file, and its symbols must be added to the - <CODE>os\win32\modules.c</CODE> file.</P> - -<P>The second way is to compile the module as a DLL, a shared library - that can be loaded into the server at runtime, using the - <CODE><A HREF="#loadmodule">LoadModule</A></CODE> - directive. These module DLLs can be distributed and run on any Apache - for Windows installation, without recompilation of the server.</P> - -<P>To create a module DLL, a small change is necessary to the module's - source file: The module record must be exported from the DLL (which - will be created later; see below). To do this, add the - <CODE>MODULE_VAR_EXPORT</CODE> (defined in the Apache header files) to - your module's module record definition. For example, if your module - has:</P> -<PRE> - module foo_module; -</PRE> -<P>Replace the above with:</P> -<PRE> - module MODULE_VAR_EXPORT foo_module; -</PRE> -<P>Note that this will only be activated on Windows, so the module can - continue to be used, unchanged, with Unix if needed. Also, if you are - familiar with <CODE>.DEF</CODE> files, you can export the module - record with that method instead.</P> - -<P>Now, create a DLL containing your module. You will need to link this - against the ApacheCore.lib export library that is created when the - ApacheCore.dll shared library is compiled. You may also have to change - the compiler settings to ensure that the Apache header files are - correctly located.</P> - -<P>This should create a DLL version of your module. Now simply place it - in the <SAMP>modules</SAMP> directory of your server root, and use - the <CODE><A HREF="#loadmodule">LoadModule</A></CODE> directive to - load it.</P> - - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_speling.html b/docs/manual/mod/mod_speling.html deleted file mode 100644 index 3be9f8000b..0000000000 --- a/docs/manual/mod/mod_speling.html +++ /dev/null @@ -1,122 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Apache module mod_speling</TITLE> - </HEAD> -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> - <BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" - > -<!--#include virtual="header.html" --> - <H1 ALIGN="CENTER">Module mod_speling</H1> - <P> - This module is contained in the <CODE>mod_speling.c</CODE> file, - and is <STRONG>not</STRONG> compiled in by default. - It attempts to correct misspellings of - URLs that users might have entered, by ignoring capitalization - and by allowing up to one misspelling.<BR> - This catches the majority of misspelled requests. An automatic - "spelling corrected" redirection is returned if only one matching - document was found, and a list of matches is returned if more than - one document with a sufficiently similar name is found. - </P> - - <H2>Summary</H2> - <P> - Requests to documents sometimes cannot be served by the core apache - server because the request was misspelled or miscapitalized. This - module addresses this problem by trying to find a matching document, - even after all other modules gave up. It does its work by comparing - each document name in the requested directory against the requested - document name <STRONG>without regard to case</STRONG>, and allowing - <STRONG>up to one misspelling</STRONG> (character insertion / omission - / transposition or wrong character). A list is built with all document - names which were matched using this strategy. - </P> - <P> - If, after scanning the directory, - <UL> - <LI>no matching document was found, Apache will proceed as usual - and return a "document not found" error. - <LI>only one document is found that "almost" matches the request, - then it is returned in the form of a redirection response. - <LI>more than one document with a close match was found, then - the list of the matches is returned to the client, and the client - can select the correct candidate. - </UL> - </P> - - <H2>Directives</H2> - - <MENU> - <LI><A HREF="#checkspelling">CheckSpelling</A> - </MENU> - - <HR> <!-- the HR is part of the directive description --> - <H2><A NAME="checkspelling">CheckSpelling</A></H2> - <!--%plaintext <?INDEX {\tt CheckSpelling} directive> --> - <A - HREF="directive-dict.html#Syntax" - REL="Help" - ><STRONG>Syntax:</STRONG></A> CheckSpelling <EM>on/off</EM><BR> - <A - HREF="directive-dict.html#Default" - REL="Help" - ><STRONG>Default:</STRONG></A> <CODE>CheckSpelling Off</CODE><BR> - <A - HREF="directive-dict.html#Context" - REL="Help" - ><STRONG>Context:</STRONG></A> server config, virtual host, - directory, .htaccess<BR> - <A - HREF="directive-dict.html#Override" - REL="Help" - ><STRONG>Override:</STRONG></A> Options - <BR> - <A - HREF="directive-dict.html#Status" - REL="Help" - ><STRONG>Status:</STRONG></A> Base<BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_speling<BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> CheckSpelling was available as a - separately - available module for Apache 1.1, but was limited to miscapitalizations. - As of Apache 1.3, it is part of the Apache distribution. Prior to - Apache 1.3.2, the <SAMP>CheckSpelling</SAMP> directive was only available - in the "server" and "virtual host" contexts. - <P> - This directive enables or disables the spelling module. When enabled, - keep in mind that - </P> - <UL> - <LI>the directory scan which is necessary for the spelling - correction will have an impact on the server's performance - when many spelling corrections have to be performed at the same time. - </LI> - <LI>the document trees should not contain sensitive files which could - be matched inadvertently by a spelling "correction". - </LI> - <LI>the module is unable to correct misspelled user names - (as in <CODE>http://my.host/~apahce/</CODE>), just file names or - directory names. - </LI> - <LI>spelling corrections apply strictly to existing files, so a request for - the <SAMP><Location /status></SAMP> may get incorrectly treated - as the negotiated file "<SAMP>/stats.html</SAMP>". - </LI> - </UL> - -<!--#include virtual="footer.html" --> - </BODY> -</HTML> - diff --git a/docs/manual/mod/mod_status.html b/docs/manual/mod/mod_status.html deleted file mode 100644 index ccfabe1a83..0000000000 --- a/docs/manual/mod/mod_status.html +++ /dev/null @@ -1,131 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> - <HEAD> - <TITLE>Apache module mod_status</TITLE> - </HEAD> -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> - -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_status</H1> - -The Status Module is only available in Apache 1.1 and later.<P> - -<H2>Function</H2> - -The Status module allows a server administrator to find out how well -their server is performing. A HTML page is presented that gives -the current server statistics in an easily readable form. If required -this page can be made to automatically refresh (given a compatible -browser). Another page gives a simple machine-readable list of the current -server state. -<P> -The details given are: -<UL> -<LI>The number of children serving requests -<LI>The number of idle children -<LI>The status of each child, the number of requests that child has -performed and the total number of bytes served by the child (*) -<LI>A total number of accesses and byte count served (*) -<LI>The time the server was started/restarted and the -time it has been running for -<LI>Averages giving the number of requests per second, -the number of bytes served per second and the average number -of bytes per request (*) -<LI>The current percentage CPU used by each child and in total by -Apache (*) -<LI>The current hosts and requests being processed (*) -</UL> - -A compile-time option must be used to display the details marked "(*)" as -the instrumentation required for obtaining these statistics does not -exist within standard Apache. - -<H2><A NAME="extendedstatus">ExtendedStatus directive</A></H2> -<!--%plaintext <?INDEX {\tt ExtendedStatus} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> ExtendedStatus <EM>On|Off</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>ExtendedStatus Off</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config <BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> - <A - HREF="directive-dict.html#Module" - REL="Help" - ><STRONG>Module:</STRONG></A> mod_status<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> ExtendedStatus is only available - in Apache 1.3.2 and later. - -<P> -This directive controls whether the server keeps track of extended -status information for each request. This is only useful if the status module -is enabled on the server. -</P> -<P> -This setting applies to the entire server, and cannot be enabled or -disabled on a virtualhost-by-virtualhost basis. -</P> - -<H2>Enabling Status Support</H2> - -To enable status reports only for browsers from the foo.com -domain add this code to your <CODE>access.conf</CODE> configuration file -<PRE> - <Location /server-status> - SetHandler server-status - - order deny,allow - deny from all - allow from .foo.com - </Location> -</PRE> -<P> -You can now access server statistics by using a Web browser to access the -page <CODE>http://your.server.name/server-status</CODE> -<P> -Note that mod_status will only work when you are running Apache in -<A HREF="core.html#servertype">standalone</A> mode and not -<A HREF="core.html#servertype">inetd</A> mode. - -<H3>Automatic Updates</H3> -You can get the status page to update itself automatically if you have -a browser that supports "refresh". Access the page -<CODE>http://your.server.name/server-status?refresh=N</CODE> to refresh the -page every N seconds. -<H3>Machine Readable Status File</H3> -A machine-readable version of the status file is available by accessing the -page <CODE>http://your.server.name/server-status?auto</CODE>. This is useful -when automatically run, see the Perl program in the <CODE>/support</CODE> -directory of Apache, <CODE>log_server_status</CODE>. - -<BLOCKQUOTE> - <STRONG> - It should be noted that if <SAMP>mod_status</SAMP> is compiled into - the server, its handler capability is available in <EM>all</EM> - configuration files, including <EM>per</EM>-directory files - (<EM>e.g.</EM>, <SAMP>.htaccess</SAMP>). This may have - security-related ramifications for your site. - </STRONG> -</BLOCKQUOTE> -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_unique_id.html b/docs/manual/mod/mod_unique_id.html deleted file mode 100644 index c9c4d3afe9..0000000000 --- a/docs/manual/mod/mod_unique_id.html +++ /dev/null @@ -1,180 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_unique_id</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_unique_id</H1> - -This module provides a magic token for each request which is guaranteed -to be unique across "all" requests under very specific conditions. -The unique identifier is even unique across multiple machines in a -properly configured cluster of machines. The environment variable -<CODE>UNIQUE_ID</CODE> is set to the identifier for each request. -Unique identifiers are useful for various reasons which are beyond the -scope of this document. - -<H2>Theory</H2> - -<P> -First a brief recap of how the Apache server works on Unix machines. -This feature currently isn't supported on Windows NT. On Unix machines, -Apache creates several children, the children process requests one at -a time. Each child can serve multiple requests in its lifetime. For the -purpose of this discussion, the children don't share any data -with each other. We'll refer to the children as httpd processes. - -<P> -Your website has one or more machines under your administrative control, -together we'll call them a cluster of machines. Each machine can -possibly run multiple instances of Apache. All of these collectively -are considered "the universe", and with certain assumptions we'll -show that in this universe we can generate unique identifiers for each -request, without extensive communication between machines in the cluster. - -<P> -The machines in your cluster should satisfy these requirements. -(Even if you have only one machine you should synchronize its clock -with NTP.) - -<UL> -<LI>The machines' times are synchronized via NTP or other network time - protocol. - -<LI>The machines' hostnames all differ, such that the module can do a - hostname lookup on the hostname and receive a different IP address - for each machine in the cluster. -</UL> - -<P> -As far as operating system assumptions go, we assume that pids (process -ids) fit in 32-bits. If the operating system uses more than 32-bits -for a pid, the fix is trivial but must be performed in the code. - -<P> -Given those assumptions, at a single point in time we can identify -any httpd process on any machine in the cluster from all other httpd -processes. The machine's IP address and the pid of the httpd process -are sufficient to do this. So in order to generate unique identifiers -for requests we need only distinguish between different points in time. - -<P> -To distinguish time we will use a Unix timestamp (seconds since January -1, 1970 UTC), and a 16-bit counter. The timestamp has only one second -granularity, so the counter is used to represent up to 65536 values -during a single second. The quadruple <EM>( ip_addr, pid, time_stamp, -counter )</EM> is sufficient to enumerate 65536 requests per second per -httpd process. There are issues however with pid reuse over -time, and the counter is used to alleviate this issue. - -<P> -When an httpd child is created, the counter is initialized with ( -current microseconds divided by 10 ) modulo 65536 (this formula was -chosen to eliminate some variance problems with the low order bits of -the microsecond timers on some systems). When a unique identifier is -generated, the time stamp used is the time the request arrived at the -web server. The counter is incremented every time an identifier is -generated (and allowed to roll over). - -<P> -The kernel generates a pid for each process as it forks the process, and -pids are allowed to roll over (they're 16-bits on many Unixes, but newer -systems have expanded to 32-bits). So over time the same pid will be -reused. However unless it is reused within the same second, it does not -destroy the uniqueness of our quadruple. That is, we assume the system -does not spawn 65536 processes in a one second interval (it may even be -32768 processes on some Unixes, but even this isn't likely to happen). - -<P> -Suppose that time repeats itself for some reason. That is, suppose that -the system's clock is screwed up and it revisits a past time (or it is -too far forward, is reset correctly, and then revisits the future time). -In this case we can easily show that we can get pid and time stamp reuse. -The choice of initializer for the counter is intended to help defeat this. -Note that we really want a random number to initialize the counter, -but there aren't any readily available numbers on most systems (<EM>i.e.</EM>, you -can't use rand() because you need to seed the generator, and can't seed -it with the time because time, at least at one second resolution, has -repeated itself). This is not a perfect defense. - -<P> -How good a defense is it? Well suppose that one of your machines serves -at most 500 requests per second (which is a very reasonable upper bound -at this writing, because systems generally do more than just shovel out -static files). To do that it will require a number of children which -depends on how many concurrent clients you have. But we'll be pessimistic -and suppose that a single child is able to serve 500 requests per second. -There are 1000 possible starting counter values such that two sequences -of 500 requests overlap. So there is a 1.5% chance that if time (at one -second resolution) repeats itself this child will repeat a counter value, -and uniqueness will be broken. This was a very pessimistic example, -and with real world values it's even less likely to occur. If your -system is such that it's still likely to occur, then perhaps you should -make the counter 32 bits (by editing the code). - -<P> -You may be concerned about the clock being "set back" during summer -daylight savings. However this isn't an issue because the times used here -are UTC, which "always" go forward. Note that x86 based Unixes may need -proper configuration for this to be true -- they should be configured to -assume that the motherboard clock is on UTC and compensate appropriately. -But even still, if you're running NTP then your UTC time will be correct -very shortly after reboot. - -<P> -The <CODE>UNIQUE_ID</CODE> environment variable is constructed by -encoding the 112-bit (32-bit IP address, 32 bit pid, 32 bit time stamp, -16 bit counter) quadruple using the alphabet <CODE>[A-Za-z0-9@-]</CODE> -in a manner similar to MIME base64 encoding, producing 19 characters. -The MIME base64 alphabet is actually <CODE>[A-Za-z0-9+/]</CODE> however -<CODE>+</CODE> and <CODE>/</CODE> need to be specially encoded in URLs, -which makes them less desirable. All values are encoded in network -byte ordering so that the encoding is comparable across architectures of -different byte ordering. The actual ordering of the encoding is: time -stamp, IP address, pid, counter. This ordering has a purpose, but it -should be emphasized that applications should not dissect the encoding. -Applications should treat the entire encoded <CODE>UNIQUE_ID</CODE> as an -opaque token, which can be compared against other <CODE>UNIQUE_ID</CODE>s -for equality only. - -<P> -The ordering was chosen such that it's possible to change the encoding -in the future without worrying about collision with an existing database -of <CODE>UNIQUE_ID</CODE>s. The new encodings should also keep the time -stamp as the first element, and can otherwise use the same alphabet and -bit length. Since the time stamps are essentially an increasing sequence, -it's sufficient to have a <EM>flag second</EM> in which all machines in the -cluster stop serving and request, and stop using the old encoding format. -Afterwards they can resume requests and begin issuing the new encodings. - -<P> -This we believe is a relatively portable solution to this problem. It can -be extended to multithreaded systems like Windows NT, and can grow with -future needs. The identifiers generated have essentially an infinite -life-time because future identifiers can be made longer as required. -Essentially no communication is required between machines in the cluster -(only NTP synchronization is required, which is low overhead), and no -communication between httpd processes is required (the communication is -implicit in the pid value assigned by the kernel). In very specific -situations the identifier can be shortened, but more information needs -to be assumed (for example the 32-bit IP address is overkill for any -site, but there is no portable shorter replacement for it). - -<HR> - -<H2>Directives</H2> - -<CODE>mod_unique_id</CODE> has no directives. - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> diff --git a/docs/manual/mod/mod_userdir.html b/docs/manual/mod/mod_userdir.html deleted file mode 100644 index 570b1b042a..0000000000 --- a/docs/manual/mod/mod_userdir.html +++ /dev/null @@ -1,123 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_userdir</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_userdir</H1> - -This module is contained in the <CODE>mod_userdir.c</CODE> file, and -is compiled in by default. It provides for user-specific directories. - - -<UL> -<LI><A HREF="#userdir">UserDir</A> -</UL> -<HR> - - -<H2><A NAME="userdir">UserDir</A></H2> -<!--%plaintext <?INDEX {\tt UserDir} directive> --> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> UserDir <EM>directory/filename</EM><BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <CODE>UserDir public_html</CODE><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> Base<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_userdir<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> All forms except the <CODE>UserDir -public_html</CODE> form are only available in Apache 1.1 or above. Use -of the <SAMP>enabled</SAMP> keyword, or <SAMP>disabled</SAMP> with a -list of usernames, is only available in Apache 1.3 and above.<P> - -The UserDir directive sets the real directory in a user's home directory -to use when a request for a document for a user is received. -<EM>Directory/filename</EM> is one of the following: -</P> -<UL> - <LI>The name of a directory or a pattern such as those shown below. - </LI> - <LI>The keyword <SAMP>disabled</SAMP>. This turns off <EM>all</EM> - username-to-directory translations except those explicitly named with - the <SAMP>enabled</SAMP> keyword (see below). - </LI> - <LI>The keyword <SAMP>disabled</SAMP> followed by a space-delimited - list of usernames. Usernames that appear in such a list will - <EM>never</EM> have directory translation performed, even if they - appear in an <SAMP>enabled</SAMP> clause. - </LI> - <LI>The keyword <SAMP>enabled</SAMP> followed by a space-delimited list - of usernames. These usernames will have directory translation - performed even if a global disable is in effect, but not if they also - appear in a <SAMP>disabled</SAMP> clause. - </LI> -</UL> -<P> -If neither the <SAMP>enabled</SAMP> nor the <SAMP>disabled</SAMP> -keywords appear in the <SAMP>Userdir</SAMP> directive, the argument is -treated as a filename pattern, and is used to turn the name into a -directory specification. A request for -<CODE>http://www.foo.com/~bob/one/two.html</CODE> will be translated to: -<PRE> -UserDir public_html -> ~bob/public_html/one/two.html -UserDir /usr/web -> /usr/web/bob/one/two.html -UserDir /home/*/www -> /home/bob/www/one/two.html -</PRE> -The following directives will send redirects to the client: -<PRE> -UserDir http://www.foo.com/users -> http://www.foo.com/users/bob/one/two.html -UserDir http://www.foo.com/*/usr -> http://www.foo.com/bob/usr/one/two.html -UserDir http://www.foo.com/~*/ -> http://www.foo.com/~bob/one/two.html -</PRE> -</P> -<BLOCKQUOTE> - <STRONG> - Be careful when using this directive; for instance, - <SAMP>"UserDir ./"</SAMP> would map - <SAMP>"/~root"</SAMP> to - <SAMP>"/"</SAMP> - which is probably undesirable. If you are - running Apache 1.3 or above, it is strongly recommended that your - configuration include a - "<SAMP>UserDir disabled root</SAMP>" declaration. - See also - the - <A - HREF="core.html#directory" - ><Directory></A> - directive and the - <A - HREF="../misc/security_tips.html" - >Security Tips</A> - page for more information. - </STRONG> -</BLOCKQUOTE> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> - diff --git a/docs/manual/mod/mod_usertrack.html b/docs/manual/mod/mod_usertrack.html deleted file mode 100644 index 87d81ac0f6..0000000000 --- a/docs/manual/mod/mod_usertrack.html +++ /dev/null @@ -1,199 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<HTML> -<HEAD> -<TITLE>Apache module mod_usertrack</TITLE> -</HEAD> - -<!-- Background white, links blue (unvisited), navy (visited), red (active) --> -<BODY - BGCOLOR="#FFFFFF" - TEXT="#000000" - LINK="#0000FF" - VLINK="#000080" - ALINK="#FF0000" -> -<!--#include virtual="header.html" --> -<H1 ALIGN="CENTER">Module mod_usertrack</H1> - -Previous releases of Apache have included a module which generates a -'clickstream' log of user activity on a site using cookies. This was -called the "cookies" module, mod_cookies. In Apache 1.2 and later this -module has been renamed the "user tracking" module, -mod_usertrack. This module has been simplified and new directives -added. - -<HR> - -<H2>Logging</H2> - -Previously, the cookies module (now the user tracking module) did its -own logging, using the <TT>CookieLog</TT> directive. In this release, -this module does no logging at all. Instead, a configurable log -format file should be used to log user click-streams. This is possible -because the logging module now allows <A -HREF="../multilogs.html">multiple log files</A>. The cookie itself is -logged by using the text <TT>%{cookie}n </TT> - -in the log file format. For example: -<PRE> -CustomLog logs/clickstream "%{cookie}n %r %t" -</PRE> - -For backward compatibility the configurable log module implements the -old <TT>CookieLog</TT> directive, but this should be upgraded to the -above <TT>CustomLog</TT> directive. - -<H2>Directives</H2> - -<UL> -<LI><A HREF="#cookieexpires">CookieExpires</A> -<LI><A HREF="#cookiename">CookieName</A> -<LI><A HREF="#cookietracking">CookieTracking</A> -</UL> - -<HR> - -<H2><A NAME="cookieexpires">CookieExpires</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CookieExpires <EM>expiry-period</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> optional<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_usertrack<P> - -When used, this directive sets an expiry time on the cookie generated -by the usertrack module. The <EM>expiry-period</EM> can be given either -as a number of seconds, or in the format such as "2 weeks 3 days 7 -hours". Valid denominations are: years, months, weeks, hours, minutes -and seconds. If the expiry time is in any format other than one -number indicating the number of seconds, it must be enclosed by -double quotes. - -<P>If this directive is not used, cookies last only for the current -browser session.</P> - -<H2><A NAME="cookiename">CookieName</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CookieName <EM>token</EM> -<BR> -<A - HREF="directive-dict.html#Default" - REL="Help" -><STRONG>Default:</STRONG></A> <EM>Apache</EM> -<BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, -.htaccess<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> optional<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_usertrack -<BR> -<A - HREF="directive-dict.html#Compatibility" - REL="Help" -><STRONG>Compatibility:</STRONG></A> Apache 1.3.7 and later -<P> -This directive allows you to change the name of the cookie this module -uses for its tracking purposes. By default the cookie is named -"<CODE>Apache</CODE>". -</P> -<P> -You must specify a valid cookie name; results are unpredictable if -you use a name containing unusual characters. Valid characters -include A-Z, a-z, 0-9, "_", and "-". -</P> - -<H2><A NAME="cookietracking">CookieTracking</A></H2> -<A - HREF="directive-dict.html#Syntax" - REL="Help" -><STRONG>Syntax:</STRONG></A> CookieTracking <EM>on | off</EM><BR> -<A - HREF="directive-dict.html#Context" - REL="Help" -><STRONG>Context:</STRONG></A> server config, virtual host, directory, -.htaccess<BR> -<A - HREF="directive-dict.html#Override" - REL="Help" -><STRONG>Override:</STRONG></A> FileInfo<BR> -<A - HREF="directive-dict.html#Status" - REL="Help" -><STRONG>Status:</STRONG></A> optional<BR> -<A - HREF="directive-dict.html#Module" - REL="Help" -><STRONG>Module:</STRONG></A> mod_usertrack<P> - -When the user track module is compiled in, and "CookieTracking on" is -set, Apache will start sending a user-tracking cookie for all new -requests. This directive can be used to turn this behavior on or off -on a per-server or per-directory basis. By default, compiling -mod_usertrack will not activate cookies. - -<HR> - -<H2>2-digit or 4-digit dates for cookies?</H2> - -(the following is from message -<022701bda43d$9d32bbb0$1201a8c0@christian.office.sane.com> in -the new-httpd archives) - -<P> - -<PRE> -From: "Christian Allen" <christian@sane.com> -Subject: Re: Apache Y2K bug in mod_usertrack.c -Date: Tue, 30 Jun 1998 11:41:56 -0400 - -Did some work with cookies and dug up some info that might be useful. - -True, Netscape claims that the correct format NOW is four digit dates, and -four digit dates do in fact work... for Netscape 4.x (Communicator), that -is. However, 3.x and below do NOT accept them. It seems that Netscape -originally had a 2-digit standard, and then with all of the Y2K hype and -probably a few complaints, changed to a four digit date for Communicator. -Fortunately, 4.x also understands the 2-digit format, and so the best way to -ensure that your expiration date is legible to the client's browser is to -use 2-digit dates. - -However, this does not limit expiration dates to the year 2000; if you use -an expiration year of "13", for example, it is interpreted as 2013, NOT -1913! In fact, you can use an expiration year of up to "37", and it will be -understood as "2037" by both MSIE and Netscape versions 3.x and up (not sure -about versions previous to those). Not sure why Netscape used that -particular year as its cut-off point, but my guess is that it was in respect -to UNIX's 2038 problem. Netscape/MSIE 4.x seem to be able to understand -2-digit years beyond that, at least until "50" for sure (I think they -understand up until about "70", but not for sure). - -Summary: Mozilla 3.x and up understands two digit dates up until "37" -(2037). Mozilla 4.x understands up until at least "50" (2050) in 2-digit -form, but also understands 4-digit years, which can probably reach up until -9999. Your best bet for sending a long-life cookie is to send it for some -time late in the year "37". -</PRE> - -<!--#include virtual="footer.html" --> -</BODY> -</HTML> |
