configuring.html revision e062fc6828fd09a9d45ee879d4f6c2dac8d37385
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<HTML>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<HEAD>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<TITLE>Configuration Files</TITLE>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa</HEAD>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<BODY
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa BGCOLOR="#FFFFFF"
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa TEXT="#000000"
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa LINK="#0000FF"
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa VLINK="#000080"
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa ALINK="#FF0000"
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa>
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa<!--#include virtual="header.html" -->
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa<H1 ALIGN="CENTER">Configuration Files</H1>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<ul>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<li><a href="#main">Main Configuration Files</a></li>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<li><a href="#syntax">Syntax of the Configuration Files</a></li>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<li><a href="#modules">Modules</a></li>
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa<li><a href="#scope">Scope of Directives</a></li>
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa<li><a href="#htaccess">.htaccess Files</a></li>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<li><a href="#logs">Log Files</a></li>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa</ul>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa<hr>
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<H2><a name="main">Main Configuration Files</a></H2>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<table border="1"><tr><td valign="top">
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<strong>Related Modules</strong><br><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<a href="mod/mod_mime.html">mod_mime</a><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa</td>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
2007ce65c0947e10e337f55f7168590e4f7f6365Eugen Kuksa<td valign="top">
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<strong>Related Directives</strong><br><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#ifdefine">&lt;IfDefine&gt;</A><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<a href="mod/core.html#include">Include</a><br>
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa<A HREF="mod/mod_mime.html#typesconfig">TypesConfig</A><br>
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa</td></tr></table>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>Apache is configured by placing <A HREF="mod/directives.html"
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa>directives</A> in plain text configuration files. The main
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaconfiguration file is usually called <CODE>httpd.conf</CODE>. The
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksalocation of this file is set at compile-time, but may be overridden
2007ce65c0947e10e337f55f7168590e4f7f6365Eugen Kuksawith the <CODE>-f</CODE> command line flag. Some sites also have
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa<CODE>srm.conf</CODE> and <CODE>access.conf</CODE> files for <A
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen KuksaHREF="http://www.apache.org/info/three-config-files.html">historical
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksareasons</A>. In addition, other configuration files may be added using
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksathe <CODE><A HREF="mod/core.html#include">Include</A></CODE>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksadirective. Any directive may be placed in any of these configuration
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksafiles. Changes to the main configuration files are only recognized by
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaApache when it is started or restarted.</p>
2007ce65c0947e10e337f55f7168590e4f7f6365Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>New with Apache 1.3.13 is a feature where if any configuration
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksafile is actually a directory, Apache will enter that directory
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksaand parse any files (and subdirectories) found there as configuration
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksafiles. One possible use for this would be to add VirtualHosts
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksaby creating small configuration files for each host, and placing
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksathem in such a configuration directory. Thus, you can add or
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaremove VirtualHosts without editing any files at all, simply
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaadding or deleting them. This makes automating such processes
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksamuch easier.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaThe server also reads a file containing mime document types; the
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksafilename is set by the <A HREF="mod/mod_mime.html#typesconfig"
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa>TypesConfig</A> directive, and is <CODE>mime.types</CODE> by default.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<hr>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<H2><a name="syntax">Syntax of the Configuration Files</a></H2>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>Apache configuration files contain one directive per line. The
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaback-slash "\" may be used as the last character on a line to indicate
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksathat the directive continues onto the next line. There must be no
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaother characters or white space between the back-slash and the end of
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksathe line.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>Directives in the configuration files are case-insensitive, but
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaarguments to directives are often case sensitive. Lines which begin
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksawith the hash character "#" are considered comments, and are ignored.
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen KuksaComments may <STRONG>not</STRONG> be included on a line after a
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksaconfiguration directive. Blank lines and white space occurring before
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksaa directive are ignored, so you may indent directives for clarity.
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa<P>You can check your configuration files for syntax errors without
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksastarting the server by using <CODE>apachectl configtest</CODE>
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksaor the <CODE>-t</CODE> command line option.
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa<hr>
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa<H2><a name="modules">Modules</a></H2>
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa<table border="1"><tr><td valign="top">
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa<strong>Related Modules</strong><br><br>
97669a2ab79fef55a04bd6f0e51267e5119ddab7Eugen Kuksa<a href="mod/mod_so.html">mod_so</a><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa</td>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<td valign="top">
cb08b6bacfcb9c0de6d66222071adbefba898097Eugen Kuksa<strong>Related Directives</strong><br><br>
cb08b6bacfcb9c0de6d66222071adbefba898097Eugen Kuksa<A HREF="mod/core.html#addmodule">AddModule</A><br>
cb08b6bacfcb9c0de6d66222071adbefba898097Eugen Kuksa<A HREF="mod/core.html#clearmodulelist">ClearModuleList</A><br>
cb08b6bacfcb9c0de6d66222071adbefba898097Eugen Kuksa<A HREF="mod/core.html#ifmodule">&lt;IfModule&gt;</A><br>
cb08b6bacfcb9c0de6d66222071adbefba898097Eugen Kuksa<a href="mod/mod_so.html#loadmodule">LoadModule</a><br>
cb08b6bacfcb9c0de6d66222071adbefba898097Eugen Kuksa</td></tr></table>
cb08b6bacfcb9c0de6d66222071adbefba898097Eugen Kuksa
cb08b6bacfcb9c0de6d66222071adbefba898097Eugen Kuksa<P>Apache is a modular server. This implies that only the most basic
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksafunctionality is included in the core server. Extended features are
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaavailable through <A HREF="mod/index-bytype.html">modules</A> which
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksacan be loaded into Apache. By default, a <A
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaHREF="mod/module-dict.html#Status">base</A> set of modules is
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaincluded in the server at compile-time. If the server is compiled to
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graefuse <A HREF="dso.html">dynamically loaded</A> modules, then modules
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graefcan be compiled separately and added at any time using the <A
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaHREF="mod/mod_so.html#loadmodule">LoadModule</A> directive.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaOtherwise, Apache must be recompiled to add or remove modules.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaConfiguration directives may be included conditional on a presence of
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaa particular module by enclosing them in an <A
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaHREF="mod/core.html#ifmodule">&lt;IfModule&gt;</A> block.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>To see which modules are currently compiled into the server,
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksayou can use the <CODE>-l</CODE> command line option.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<hr>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13aSascha Graef<H2><a name="scope">Scope of Directives</a></H2>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<table border="1"><tr><td valign="top">
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<strong>Related Directives</strong><br><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#directory">&lt;Directory&gt;</A><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#directorymatch">&lt;DirectoryMatch&gt;</A><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#files">&lt;Files&gt;</A><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#filesmatch">&lt;FilesMatch&gt;</A><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#location">&lt;Location&gt;</A><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#locationmatch">&lt;LocationMatch&gt;</A><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<a href="mod/core.html#virtualhost">&lt;VirtualHost&gt;</a><br>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa</td></tr></table>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>Directives placed in the main configuration files apply to the entire
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaserver. If you wish to change the configuration for only a part of
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksathe server, you can scope your directives by placing them in
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<CODE><A HREF="mod/core.html#directory">&lt;Directory&gt;</A>,
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#directorymatch">&lt;DirectoryMatch&gt;</A>,
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa<A HREF="mod/core.html#files">&lt;Files&gt;</A>,
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#filesmatch">&lt;FilesMatch&gt;</A>,
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<A HREF="mod/core.html#location">&lt;Location&gt;</A>,
81da36894af70bbb8d8e24b004026ad4c5c1bc99Eugen Kuksa</CODE> and <CODE>
81da36894af70bbb8d8e24b004026ad4c5c1bc99Eugen Kuksa<A HREF="mod/core.html#locationmatch">&lt;LocationMatch&gt;</A>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa</CODE>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksasections. These sections limit the application of the directives
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksawhich they enclose to particular filesystem locations or URLs. They
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksacan also be nested, allowing for very fine grained configuration.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksa<P>Apache has the capability to serve many different websites
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksasimultaneously. This is called <A HREF="vhosts/">Virtual Hosting</A>.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaDirectives can also be scoped by placing them inside
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<CODE><A HREF="mod/core.html#virtualhost">&lt;VirtualHost&gt;</A></CODE>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksasections, so that they will only apply to requests for a particular
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksawebsite.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>Although most directives can be placed in any of these sections,
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksasome directives do not make sense in some contexts. For example,
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksadirectives controlling process creation can only be placed in the main
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaserver context. To find which directives can be placed in which
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksasections, check the <A
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaHREF="mod/directive-dict.html#Context">Context</A> of the directive.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaFor further information, we provide details on <A
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen KuksaHREF="sections.html">How Directory, Location and Files sections
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksawork</A>.
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<hr>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<H2><a name="htaccess">.htaccess Files</a></H2>
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa
e8ec59dda8f903e81cb5cceaef93d20a0812fc77Eugen Kuksa<table border="1"><tr><td valign="top">
e8ec59dda8f903e81cb5cceaef93d20a0812fc77Eugen Kuksa<strong>Related Directives</strong><br><br>
e8ec59dda8f903e81cb5cceaef93d20a0812fc77Eugen Kuksa<A HREF="mod/core.html#accessfilename">AccessFileName</A><br>
e8ec59dda8f903e81cb5cceaef93d20a0812fc77Eugen Kuksa<A HREF="mod/core.html#allowoverride">AllowOverride</A><br>
e8ec59dda8f903e81cb5cceaef93d20a0812fc77Eugen Kuksa</td></tr></table>
e8ec59dda8f903e81cb5cceaef93d20a0812fc77Eugen Kuksa
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<P>Apache allows for decentralized management of configuration via
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksaspecial files placed inside the web tree. The special files are
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksausually called <CODE>.htaccess</CODE>, but any name can be specified
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksain the <A HREF="mod/core.html#accessfilename"><CODE
aeee7f45fea603773fa9aa176ca54683af4c08bcEugen Kuksa>AccessFileName</CODE></A> directive. Directives placed in
aeee7f45fea603773fa9aa176ca54683af4c08bcEugen Kuksa<CODE>.htaccess</CODE> files apply to the directory where you place
89a44b1ca5aa6007b102831cc4a4e306fd32507bEugen Kuksathe file, and all sub-directories. The <CODE>.htaccess</CODE> files
aeee7f45fea603773fa9aa176ca54683af4c08bcEugen Kuksafollow the same syntax as the main configuration files. Since
006de713cc0c62dc3dd8549f4d74c00e8b822dd2Eugen Kuksa<CODE>.htaccess</CODE> files are read on every request, changes made
in these files take immediate effect.
<P>To find which directives can be placed in <CODE>.htaccess</CODE>
files, check the <A HREF="mod/directive-dict.html#Context">Context</A>
of the directive. The server administrator further controls what
directives may be placed in <CODE>.htaccess</CODE> files by
configuring the <A
HREF="mod/core.html#allowoverride"><CODE>AllowOverride</CODE></A>
directive in the main configuration files.
<hr>
<H2><a name="logs">Log files</a></H2>
<!-- XXX: This section should be moved to its own file -->
<H3>security warning</H3>
Anyone who can write to the directory where Apache is writing a
log file can almost certainly gain access to the uid that the server is
started as, which is normally root. Do <EM>NOT</EM> give people write
access to the directory the logs are stored in without being aware of
the consequences; see the <A HREF="misc/security_tips.html">security tips</A>
document for details.
<H3>pid file</H3>
<P>On startup, Apache saves the process id of the parent httpd process to
the file <CODE>logs/httpd.pid</CODE>. This filename can be changed
with the <A HREF="mod/core.html#pidfile">PidFile</A> directive. The
process-id is for use by the administrator in restarting and
terminating the daemon: on Unix, a HUP or USR1 signal causes the
daemon to re-read its configuration files and a TERM signal causes it
to die gracefully; on Windows, use the -k command line option instead.
For more information see the <A HREF="stopping.html">Stopping and
Restarting</A> page.
<P>
If the process dies (or is killed) abnormally, then it will be necessary to
kill the children httpd processes.
<H3>Error log</H3>
<P>The server will log error messages to a log file, by default
<CODE>logs/error_log</CODE> on Unix or <CODE>logs/error.log</CODE> on
Windows and OS/2. The filename can be set using the <A
HREF="mod/core.html#errorlog">ErrorLog</A> directive; different error
logs can be set for different <A
HREF="mod/core.html#virtualhost">virtual hosts</A>.
<H3>Transfer log</H3>
<P>The server will typically log each request to a transfer file, by
default <CODE>logs/access_log</CODE> on Unix or
<CODE>logs/access.log</CODE> on Windows and OS/2. The filename can be
set using a <A HREF="mod/mod_log_config.html#customlog">CustomLog</A>
directive; different transfer logs can be set for different <A
HREF="mod/core.html#virtualhost">virtual hosts</A>.
<!--#include virtual="footer.html" -->
</BODY>
</HTML>