configuring.xml revision f629fd8f821ed20d16d76733bc19bf5480986220
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<manualpage>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<p>This document describes the files used to configure the Apache
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndHTTP server.</p>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd <modulelist>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd </modulelist>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd <directivelist>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd <directive module="core" type="section">IfDefine</directive>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen </directivelist>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen href="mod/directives.html">directives</a> in plain text
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen configuration files. The main configuration file is usually called
0d26a2bd71224b954baab529bbadc4d676c35b95slive <code>httpd.conf</code>. The location of this file is set at
0d26a2bd71224b954baab529bbadc4d676c35b95slive compile-time, but may be overridden with the <code>-f</code>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen command line flag. In addition, other configuration files may be
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen added using the <directive module="core">Include</directive>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen directive, and wildcards can be used to include many configuration
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen files. Any directive may be placed in any of these configuration
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen files. Changes to the main configuration files are only
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen recognized by Apache when it is started or restarted.</p>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <p>The server also reads a file containing mime document types;
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen the filename is set by the <directive
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <p>Apache configuration files contain one directive per line.
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen The back-slash "\" may be used as the last character on a line
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen to indicate that the directive continues onto the next line.
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen There must be no other characters or white space between the
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen back-slash and the end of the line.</p>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <p>Directives in the configuration files are case-insensitive,
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen but arguments to directives are often case sensitive. Lines
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen that begin with the hash character "#" are considered
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen comments, and are ignored. Comments may <strong>not</strong> be
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen included on a line after a configuration directive. Blank lines
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen and white space occurring before a directive are ignored, so
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen you may indent directives for clarity.</p>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <p>You can check your configuration files for syntax errors
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen without starting the server by using <code>apachectl
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen configtest</code> or the <code>-t</code> command line
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen option.</p>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <modulelist>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen </modulelist>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <directivelist>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <directive module="core" type="section">IfModule</directive>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen </directivelist>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <p>Apache is a modular server. This implies that only the most
0d26a2bd71224b954baab529bbadc4d676c35b95slive basic functionality is included in the core server. Extended
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen features are available through <a
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen into Apache. By default, a <a
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen href="mod/module-dict.html#Status">base</a> set of modules is
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen included in the server at compile-time. If the server is
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen compiled to use <a href="dso.html">dynamically loaded</a>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen modules, then modules can be compiled separately and added at
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen any time using the <directive module="mod_so">LoadModule</directive>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen Otherwise, Apache must be recompiled to add or remove modules.
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen Configuration directives may be included conditional on a
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen presence of a particular module by enclosing them in an<directive
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen module="core" type="section">IfModule</directive> block.</p>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <p>To see which modules are currently compiled into the server,
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen you can use the <code>-l</code> command line option.</p>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <directivelist>
0d26a2bd71224b954baab529bbadc4d676c35b95slive <directive module="core" type="section">Directory</directive>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <directive module="core" type="section">DirectoryMatch</directive>
b1d5e64b28c637587fe6809bc1a19be1730545d4martin <directive module="core" type="section">Files</directive>
b9b166bce28378f88ecba40c17f788f510b8357and <directive module="core" type="section">FilesMatch</directive>
b1d5e64b28c637587fe6809bc1a19be1730545d4martin <directive module="core" type="section">Location</directive>
b1d5e64b28c637587fe6809bc1a19be1730545d4martin <directive module="core" type="section">LocationMatch</directive>
b1d5e64b28c637587fe6809bc1a19be1730545d4martin <directive module="core" type="section">VirtualHost</directive>
b1d5e64b28c637587fe6809bc1a19be1730545d4martin </directivelist>
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen <p>Directives placed in the main configuration files apply to
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen the entire server. If you wish to change the configuration for
15b99496bfd5c7809028689a3accc488b23ab0b4rbowen only a part of the server, you can scope your directives by
href="sections.html">How Directory, Location and Files sections