]> granicus.if.org Git - apache/blobdiff - docs/manual/mod/core.html.en
xforms
[apache] / docs / manual / mod / core.html.en
index ad4e407e7d9f5301afbc86f64347290819c06f4c..270e9e9868b88a7aaaa65f8ef6cae892b083e219 100644 (file)
@@ -8,16 +8,19 @@
 <title>core - Apache HTTP Server</title>
 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
-<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
+<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
+<script src="../style/scripts/prettify.js" type="text/javascript">
+</script>
+
 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
 <body>
 <div id="page-header">
-<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
-<p class="apache">Apache HTTP Server Version 2.3</p>
+<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
+<p class="apache">Apache HTTP Server Version 2.5</p>
 <img alt="" src="../images/feather.gif" /></div>
 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
 <div id="path">
-<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
+<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
 <div id="page-content">
 <div id="preamble"><h1>Apache Core Features</h1>
 <div class="toplang">
@@ -40,13 +43,17 @@ available</td></tr>
 <li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#directory">&lt;Directory&gt;</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#directorymatch">&lt;DirectoryMatch&gt;</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#else">&lt;Else&gt;</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#elseif">&lt;ElseIf&gt;</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li>
@@ -64,6 +71,7 @@ available</td></tr>
 <li><img alt="" src="../images/down.gif" /> <a href="#ifdefine">&lt;IfDefine&gt;</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#ifmodule">&lt;IfModule&gt;</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#limit">&lt;Limit&gt;</a></li>
@@ -78,10 +86,14 @@ available</td></tr>
 <li><img alt="" src="../images/down.gif" /> <a href="#locationmatch">&lt;LocationMatch&gt;</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
@@ -104,7 +116,7 @@ available</td></tr>
 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#virtualhost">&lt;VirtualHost&gt;</a></li>
 </ul>
-</div>
+<ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
 
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directive</a></h2>
@@ -118,18 +130,21 @@ available</td></tr>
 On Windows from Apache httpd 2.3.3 and later.</td></tr>
 </table>
     <p>This directive enables operating system specific optimizations for a
-       listening socket by the <code class="directive">Protocol</code>type.
+       listening socket by the <code class="directive">Protocol</code> type.
        The basic premise is for the kernel to not send a socket to the server
        process until either data is received or an entire HTTP Request is buffered.
        Only <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
-       FreeBSD's Accept Filters</a>, Linux's more primitive 
+       FreeBSD's Accept Filters</a>, Linux's more primitive
        <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
        are currently supported.</p>
 
-    <p>Using <code>none</code> for an argument will disable any accept filters 
+    <p>Using <code>none</code> for an argument will disable any accept filters
        for that protocol.  This is useful for protocols that require a server
        send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
-    <div class="example"><p><code>AcceptFilter nntp none</code></p></div>
+    <pre class="prettyprint lang-config">
+    AcceptFilter nntp none
+    </pre>
+
 
     <p>The default protocol names are <code>https</code> for port 443
        and <code>http</code> for all other ports.  To specify another protocol
@@ -138,37 +153,40 @@ On Windows from Apache httpd 2.3.3 and later.</td></tr>
        directive.</p>
 
     <p>The default values on FreeBSD are:</p>
-    <div class="example"><p><code>
-        AcceptFilter http httpready <br />
-        AcceptFilter https dataready
-    </code></p></div>
-    
+    <pre class="prettyprint lang-config">
+AcceptFilter http httpready
+AcceptFilter https dataready
+    </pre>
+
+
     <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
-       the kernel level.  Once an entire request is received, the kernel then 
-       sends it to the server. See the 
+       the kernel level.  Once an entire request is received, the kernel then
+       sends it to the server. See the
        <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
-       accf_http(9)</a> man page for more details.  Since HTTPS requests are 
+       accf_http(9)</a> man page for more details.  Since HTTPS requests are
        encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">
        accf_data(9)</a> filter is used.</p>
 
     <p>The default values on Linux are:</p>
-    <div class="example"><p><code>
-        AcceptFilter http data <br />
-        AcceptFilter https data
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+AcceptFilter http data
+AcceptFilter https data
+    </pre>
+
 
     <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
-       requests.  Any value besides <code>none</code> will enable 
+       requests.  Any value besides <code>none</code> will enable
        <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
-       see the Linux 
+       see the Linux
        <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
        tcp(7)</a> man page.</p>
 
     <p>The default values on Windows are:</p>
-    <div class="example"><p><code>
-        AcceptFilter http data <br />
-        AcceptFilter https data
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+AcceptFilter http data
+AcceptFilter https data
+    </pre>
+
 
     <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
        API, and does not support http protocol buffering.  There are two values
@@ -185,12 +203,12 @@ On Windows from Apache httpd 2.3.3 and later.</td></tr>
        and will not recycle sockets between connections.  This is useful for
        network adapters with broken driver support, as well as some virtual
        network providers such as vpn drivers, or spam, virus or spyware
-       filters.</p>  
+       filters.</p>
 
 
 <h3>See also</h3>
 <ul>
-<li><code class="directive">Protocol</code></li>
+<li><code class="directive"><a href="#protocol">Protocol</a></code></li>
 </ul>
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -250,15 +268,14 @@ On Windows from Apache httpd 2.3.3 and later.</td></tr>
     the request, so you can use the following configuration to enable
     such a script:</p>
 
-    <div class="example"><p><code>
-      &lt;Files "mypaths.shtml"&gt;<br />
-      <span class="indent">
-        Options +Includes<br />
-        SetOutputFilter INCLUDES<br />
-        AcceptPathInfo On<br />
-      </span>
-      &lt;/Files&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Files "mypaths.shtml"&gt;
+  Options +Includes
+  SetOutputFilter INCLUDES
+  AcceptPathInfo On
+&lt;/Files&gt;
+    </pre>
+
 
 
 </div>
@@ -278,9 +295,8 @@ On Windows from Apache httpd 2.3.3 and later.</td></tr>
     configuration files are <a href="#allowoverride">enabled for that
     directory</a>. For example:</p>
 
-    <div class="example"><p><code>
-      AccessFileName .acl
-    </code></p></div>
+    <pre class="prettyprint lang-config">AccessFileName .acl</pre>
+
 
     <p>before returning the document
     <code>/usr/local/web/index.html</code>, the server will read
@@ -288,13 +304,12 @@ On Windows from Apache httpd 2.3.3 and later.</td></tr>
     <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
     for directives, unless they have been disabled with</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /&gt;<br />
-      <span class="indent">
-        AllowOverride None<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory /&gt;
+    AllowOverride None
+&lt;/Directory&gt;
+    </pre>
+
 
 <h3>See also</h3>
 <ul>
@@ -329,9 +344,8 @@ content-type is <code>text/plain</code> or <code>text/html</code></td></tr>
     charset values</a> for use in Internet media types (MIME types).
     For example:</p>
 
-    <div class="example"><p><code>
-      AddDefaultCharset utf-8
-    </code></p></div>
+    <pre class="prettyprint lang-config">AddDefaultCharset utf-8</pre>
+
 
     <p><code class="directive">AddDefaultCharset</code> should only be used when all
     of the text resources to which it applies are known to be in that
@@ -354,26 +368,35 @@ content-type is <code>text/plain</code> or <code>text/html</code></td></tr>
 <table class="directive">
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
 be passed through</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off|NoDecode</code></td></tr>
 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.0.46 and later</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.0.46 and later.
+NoDecode option available in 2.3.12 and later.</td></tr>
 </table>
     <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
     which contain encoded path separators (<code>%2F</code> for <code>/</code>
     and additionally <code>%5C</code> for <code>\</code> on according systems)
-    to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
+    to be used in the path info.</p>
+
+    <p>With the default value, <code>Off</code>, such URLs are refused
+    with a 404 (Not found) error.</p>
+
+    <p>With the value <code>On</code>, such URLs are accepted, and encoded
+      slashes are decoded like all other encoded characters.</p>
+
+    <p>With the value <code>NoDecode</code>, such URLs are accepted, but
+      encoded slashes are not decoded but left in their encoded state.</p>
 
     <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
     mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
 
     <div class="note"><h3>Note</h3>
-      <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
-      Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
-      according systems) will be left as such in the otherwise decoded URL
-      string.</p>
+      <p>If encoded slashes are needed in path info, use of <code>NoDecode</code> is
+      strongly recommended as a security measure.  Allowing slashes
+      to be decoded could potentially allow unsafe paths.</p>
     </div>
 
 <h3>See also</h3>
@@ -405,10 +428,10 @@ be passed through</td></tr>
     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.
     </div>
 
-    <p>When this directive is set to <code>None</code>, then
-    <a href="#accessfilename">.htaccess</a> files are completely ignored.
-    In this case, the server will not even attempt to read
-    <code>.htaccess</code> files in the filesystem.</p>
+    <p>When this directive is set to <code>None</code> and <code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code> is set to
+    <code>None</code> <a href="#accessfilename">.htaccess</a> files are
+    completely ignored. In this case, the server will not even attempt
+    to read <code>.htaccess</code> files in the filesystem.</p>
 
     <p>When this directive is set to <code>All</code>, then any
     directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
@@ -422,7 +445,7 @@ be passed through</td></tr>
 
       <dd>
 
-      Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
+      Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_authz_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
       <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
       <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
       <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>,
@@ -440,7 +463,8 @@ be passed through</td></tr>
       <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
       <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives),
       document meta data (<code class="directive"><a href="../mod/mod_headers.html#header">Header</a></code>, <code class="directive"><a href="../mod/mod_headers.html#requestheader">RequestHeader</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvif">SetEnvIf</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookieexpires">CookieExpires</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiedomain">CookieDomain</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiestyle">CookieStyle</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookietracking">CookieTracking</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiename">CookieName</a></code>),
-      <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> directives <code class="directive"><a href="../mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>) and
+      <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> directives (<code class="directive"><a href="../mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>),
+      <code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code> directives (<code class="directive"><a href="../mod/mod_alias.html#redirect">Redirect</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirecttemp">RedirectTemp</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirectpermanent">RedirectPermanent</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirectmatch">RedirectMatch</a></code>), and
       <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> from
       <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>.
       </dd>
@@ -452,13 +476,40 @@ be passed through</td></tr>
       (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
       <code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>,
       <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
-      <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#fancyindexing">FancyIndexing</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code>,
+      <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, , <code class="directive"><a href="../mod/mod_dir.html#fallbackresource">FallbackResource</a></code>,<a href="mod_autoindex.html#indexoptions.fancyindexing"><code>FancyIndexing</code></a>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code>,
       <em>etc.</em>).</dd>
 
       <dt>Limit</dt>
 
       <dd>
-      Allow use of the directives controlling host access (<code class="directive"><a href="../mod/mod_authz_host.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_authz_host.html#deny">Deny</a></code> and <code class="directive"><a href="../mod/mod_authz_host.html#order">Order</a></code>).</dd>
+      Allow use of the directives controlling host access (<code class="directive"><a href="../mod/mod_access_compat.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_access_compat.html#deny">Deny</a></code> and <code class="directive"><a href="../mod/mod_access_compat.html#order">Order</a></code>).</dd>
+
+
+
+
+      <dt>Nonfatal=[Override|Unknown|All]</dt>
+
+      <dd>
+      Allow use of AllowOverride option to treat syntax errors in
+      .htaccess as non-fatal: instead of causing an Internal Server
+      Error, disallowed or unrecognised directives will be ignored
+      and a warning logged:
+      <ul>
+          <li><strong>Nonfatal=Override</strong> treats directives
+              forbidden by AllowOverride as non-fatal.</li>
+          <li><strong>Nonfatal=Unknown</strong> treats unknown directives
+              as non-fatal.  This covers typos and directives implemented
+              by a module that's not present.</li>
+          <li><strong>Nonfatal=All</strong> treats both the above as non-fatal.</li>
+      </ul>
+      <p>Note that a syntax error in a valid directive will still cause
+      an internal server error.</p>
+      <div class="warning"><h3>Security</h3>
+          Nonfatal errors may have security implications for .htaccess users.
+          For example, if AllowOverride disallows AuthConfig, users'
+          configuration designed to restrict access to a site will be disabled.
+      </div>
+      </dd>
 
       <dt>Options[=<var>Option</var>,...]</dt>
 
@@ -467,21 +518,33 @@ be passed through</td></tr>
       features (<code class="directive"><a href="#options">Options</a></code> and
       <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>).
       An equal sign may be given followed by a comma (but no spaces)
-      separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.</dd>
+      separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.
+
+      <div class="note"><h3>Implicit disabling of Options</h3>
+      <p>Even though the list of options that may be used in .htaccess files
+         can be limited with this directive, as long as any <code class="directive"><a href="#options">Options</a></code> directive is allowed any
+         other inherited option can be disabled by using the non-relative
+         syntax.  In other words, this mechanism cannot force a specific option
+         to remain <em>set</em> while allowing any others to be set.
+      </p></div>
+
+      <div class="example"><p><code>
+      AllowOverride Options=Indexes,MultiViews
+      </code></p></div>
+      </dd>
     </dl>
 
     <p>Example:</p>
 
-    <div class="example"><p><code>
-      AllowOverride AuthConfig Indexes
-    </code></p></div>
+    <pre class="prettyprint lang-config">AllowOverride AuthConfig Indexes</pre>
+
 
     <p>In the example above all directives that are neither in the group
     <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
     server error.</p>
 
     <div class="note"><p>For security and performance reasons, do not set
-    <code>AllowOverride</code> to anything other than <code>None</code> 
+    <code>AllowOverride</code> to anything other than <code>None</code>
     in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
     create) the <code>&lt;Directory&gt;</code> block that refers to the
     directory where you're actually planning to place a
@@ -491,6 +554,70 @@ be passed through</td></tr>
 <h3>See also</h3>
 <ul>
 <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
+<li><code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code></li>
+<li><a href="../configuring.html">Configuration Files</a></li>
+<li><a href="../howto/htaccess.html">.htaccess Files</a></li>
+</ul>
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Individual directives that are allowed in
+<code>.htaccess</code> files</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverrideList None|<var>directive</var>
+[<var>directive-type</var>] ...</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverrideList None</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+</table>
+    <p>When the server finds an <code>.htaccess</code> file (as
+    specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
+    it needs to know which directives declared in that file can override
+    earlier configuration directives.</p>
+
+    <div class="note"><h3>Only available in &lt;Directory&gt; sections</h3>
+    <code class="directive">AllowOverrideList</code> is valid only in
+    <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
+    sections specified without regular expressions, not in <code class="directive"><a href="#location">&lt;Location&gt;</a></code>, <code class="directive"><a href="#directorymatch">&lt;DirectoryMatch&gt;</a></code> or
+    <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.
+    </div>
+
+    <p>When this directive is set to <code>None</code> and <code class="directive"><a href="#allowoverride">AllowOverride</a></code> is set to <code>None</code>,
+    then <a href="#accessfilename">.htaccess</a> files are completely
+    ignored.  In this case, the server will not even attempt to read
+    <code>.htaccess</code> files in the filesystem.</p>
+
+    <p>Example:</p>
+
+    <pre class="prettyprint lang-config">
+AllowOverride None
+AllowOverrideList Redirect RedirectMatch
+    </pre>
+
+
+    <p>In the example above only the <code>Redirect</code> and
+    <code>RedirectMatch</code> directives are allowed. All others will
+    cause an internal server error.</p>
+
+    <p>Example:</p>
+
+    <pre class="prettyprint lang-config">
+AllowOverride AuthConfig
+AllowOverrideList CookieTracking CookieName
+    </pre>
+
+
+    <p>In the example above <code class="directive"><a href="#allowoverride&#10;    ">AllowOverride
+    </a></code> grants permission to the <code>AuthConfig</code>
+    directive grouping and <code class="directive">AllowOverrideList</code> grants
+    permission to only two directives from the <code>FileInfo</code> directive
+    grouping. All others will cause an internal server error.</p>
+
+<h3>See also</h3>
+<ul>
+<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
+<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
 <li><a href="../configuring.html">Configuration Files</a></li>
 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
 </ul>
@@ -553,6 +680,43 @@ headers</td></tr>
     SSI documents, output from CGI scripts, and byte range responses
     do not have this header.</p>
 
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server run-time files</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+</table>
+    <p>The <code class="directive">DefaultRuntimeDir</code> directive sets the
+    directory in which the server will create various run-time files
+    (shared memory, locks, etc.). If set as a relative path, the full path
+    will be relative to <code class="directive">ServerRoot</code>.</p>
+
+    <p><strong>Example</strong></p>
+   <pre class="prettyprint lang-config">
+DefaultRuntimeDir scratch/
+    </pre>
+
+
+    <p>The default location of <code class="directive">DefaultRuntimeDir</code> may be
+    modified by changing the <code>DEFAULT_REL_RUNTIMEDIR</code> #define
+    at build time.</p>
+
+   <p>Note: <code class="directive">ServerRoot</code> should be specified before this
+   directive is used, otherwise the default value of <code class="directive">ServerRoot</code>
+   would be used to set the base directory.</p>
+
+
+<h3>See also</h3>
+<ul>
+<li><a href="../misc/security_tips.html#serverroot">the
+    security tips</a> for information on how to properly set
+    permissions on the <code class="directive">ServerRoot</code></li>
+</ul>
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
@@ -574,9 +738,8 @@ which no other media type configuration could be found.
     of configuration files, it may be specified with the value
     <code>none</code>, meaning no default media type. For example:</p>
 
-    <div class="example"><p><code>
-      DefaultType None
-    </code></p></div>
+    <pre class="prettyprint lang-config">DefaultType None</pre>
+
 
     <p><code>DefaultType None</code> is only available in
     httpd-2.2.7 and later.</p>
@@ -593,15 +756,39 @@ which no other media type configuration could be found.
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2>
 <table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define the existence of a variable</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>parameter-name</var></code></td></tr>
-<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define a variable</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>parameter-name</var> [<var>parameter-value</var>]</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
 </table>
-    <p>Equivalent to passing the <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p>
-    <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine">&lt;IfDefine&gt;</a></code> sections without needing to alter
-    <code>-D</code> arguments in any startup scripts.</p>
+    <p>In its one parameter form, <code class="directive">Define</code> is equivalent
+    to passing the <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>. It
+    can be used to toggle the use of
+    <code class="directive"><a href="#ifdefine">&lt;IfDefine&gt;</a></code> sections
+    without needing to alter <code>-D</code> arguments in any startup
+    scripts.</p>
+
+    <p>In addition to that, if the second parameter is given, a config variable
+    is set to this value. The variable can be used in the configuration using
+    the <code>${VAR}</code> syntax. The variable is always globally defined
+    and not limited to the scope of the surrounding config section.</p>
+
+    <pre class="prettyprint lang-config">
+&lt;IfDefine TEST&gt;
+  Define servername test.example.com
+&lt;/IfDefine&gt;
+&lt;IfDefine !TEST&gt;
+  Define servername www.example.com
+  Define SSL
+&lt;/IfDefine&gt;
+
+    DocumentRoot /var/www/${servername}/htdocs
+    </pre>
+
+
+    <p>Variable names may not contain colon ":" characters, to avoid clashes
+    with <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>'s syntax.</p>
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -618,7 +805,7 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     <p><code class="directive">&lt;Directory&gt;</code> and
     <code>&lt;/Directory&gt;</code> are used to enclose a group of
     directives that will apply only to the named directory,
-    sub-directories of that directory, and the files within the respective 
+    sub-directories of that directory, and the files within the respective
     directories.  Any directive that is allowed
     in a directory context may be used. <var>Directory-path</var> is
     either the full path to a directory, or a wild-card string using
@@ -630,13 +817,12 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     <code>/home/user/public_html</code>, but <code>&lt;Directory
     /home/*/public_html&gt;</code> will match. Example:</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /usr/local/httpd/htdocs&gt;<br />
-      <span class="indent">
-        Options Indexes FollowSymLinks<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory "/usr/local/httpd/htdocs"&gt;
+  Options Indexes FollowSymLinks
+&lt;/Directory&gt;
+    </pre>
+
 
     <div class="note">
       <p>Be careful with the <var>directory-path</var> arguments:
@@ -651,9 +837,12 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     expressions</a> can also be used, with the addition of the
     <code>~</code> character. For example:</p>
 
-    <div class="example"><p><code>
-      &lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory ~ "^/www/[0-9]{3}"&gt;
+
+&lt;/Directory&gt;
+</pre>
+
 
     <p>would match directories in <code>/www/</code> that consisted of
     three numbers.</p>
@@ -664,19 +853,16 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
     with</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /&gt;<br />
-      <span class="indent">
-        AllowOverride None<br />
-      </span>
-      &lt;/Directory&gt;<br />
-      <br />
-      &lt;Directory /home/&gt;<br />
-      <span class="indent">
-        AllowOverride FileInfo<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory /&gt;
+  AllowOverride None
+&lt;/Directory&gt;
+
+&lt;Directory "/home"&gt;
+  AllowOverride FileInfo
+&lt;/Directory&gt;
+    </pre>
+
 
     <p>for access to the document <code>/home/web/dir/doc.html</code>
     the steps are:</p>
@@ -698,13 +884,12 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     expressions are tested in the order they appeared in the
     configuration file. For example, with</p>
 
-    <div class="example"><p><code>
-      &lt;Directory ~ abc$&gt;<br />
-      <span class="indent">
-        # ... directives here ...<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory ~ "abc$"&gt;
+  # ... directives here ...
+&lt;/Directory&gt;
+    </pre>
+
 
     <p>the regular expression section won't be considered until after
     all normal <code class="directive">&lt;Directory&gt;</code>s and
@@ -714,19 +899,17 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     be applied.</p>
 
    <p><strong>Note that the default access for
-    <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
+    <code>&lt;Directory /&gt;</code> is to permit all access.
     This means that Apache httpd will serve any file mapped from an URL. It is
     recommended that you change this with a block such
     as</strong></p>
 
-    <div class="example"><p><code>
-      &lt;Directory /&gt;<br />
-      <span class="indent">
-        Order Deny,Allow<br />
-        Deny from All<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory /&gt;
+  Require all denied
+&lt;/Directory&gt;
+    </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
@@ -757,14 +940,17 @@ the contents of file-system directories matching a regular expression.</td></tr>
 </table>
     <p><code class="directive">&lt;DirectoryMatch&gt;</code> and
     <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
-    of directives which will apply only to the named directory (and the files within), 
-    the same as <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>. 
-    However, it takes as an argument a 
+    of directives which will apply only to the named directory (and the files within),
+    the same as <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>.
+    However, it takes as an argument a
     <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>.  For example:</p>
 
-    <div class="example"><p><code>
-      &lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
+    # ...
+&lt;/DirectoryMatch&gt;
+</pre>
+
 
     <p>would match directories in <code>/www/</code> that consisted of three
     numbers.</p>
@@ -778,8 +964,8 @@ the contents of file-system directories matching a regular expression.</td></tr>
     </div>
 
     <div class="note"><h3>Trailing Slash</h3>
-      This directive applies to requests for directories that may or may 
-      not end in a trailing slash, so expressions that are anchored to the 
+      This directive applies to requests for directories that may or may
+      not end in a trailing slash, so expressions that are anchored to the
       end of line ($) must be written with care.
     </div>
 
@@ -809,13 +995,12 @@ from the web</td></tr>
     path from the requested URL to the document root to make the
     path to the document. Example:</p>
 
-    <div class="example"><p><code>
-      DocumentRoot /usr/web
-    </code></p></div>
+    <pre class="prettyprint lang-config">DocumentRoot "/usr/web"</pre>
+
 
     <p>then an access to
     <code>http://my.example.com/index.html</code> refers to
-    <code>/usr/web/index.html</code>. If the <var>directory-path</var> is 
+    <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
     not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
 
     <p>The <code class="directive">DocumentRoot</code> should be specified without
@@ -828,6 +1013,106 @@ Locations</a></li>
 </ul>
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="Else" id="Else">&lt;Else&gt;</a> <a name="else" id="else">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if the condition of a
+previous <code class="directive"><a href="#if">&lt;If&gt;</a></code> or
+<code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code> section is not
+satisfied by a request at runtime</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Else&gt; ... &lt;/Else&gt;</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
+<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+</table>
+    <p>The <code class="directive">&lt;Else&gt;</code> applies the enclosed
+    directives if and only if the most recent
+    <code class="directive">&lt;If&gt;</code> or
+    <code class="directive">&lt;ElseIf&gt;</code> section
+    in the same scope has not been applied.
+    For example: In </p>
+
+    <pre class="prettyprint lang-config">
+&lt;If "-z req('Host')"&gt;
+  # ...
+&lt;/If&gt;
+&lt;Else&gt;
+  # ...
+&lt;/Else&gt;
+    </pre>
+
+
+    <p> The <code class="directive">&lt;If&gt;</code> would match HTTP/1.0
+        requests without a <var>Host:</var> header and the
+        <code class="directive">&lt;Else&gt;</code> would match requests
+        with a <var>Host:</var> header.</p>
+
+
+<h3>See also</h3>
+<ul>
+<li><code class="directive"><a href="#if">&lt;If&gt;</a></code></li>
+<li><code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code></li>
+<li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
+    &lt;Files&gt; sections work</a> for an explanation of how these
+    different sections are combined when a request is received.
+    <code class="directive">&lt;If&gt;</code>,
+    <code class="directive">&lt;ElseIf&gt;</code>, and
+    <code class="directive">&lt;Else&gt;</code> are applied last.</li>
+</ul>
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="ElseIf" id="ElseIf">&lt;ElseIf&gt;</a> <a name="elseif" id="elseif">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is satisfied
+by a request at runtime while the condition of a previous
+<code class="directive"><a href="#if">&lt;If&gt;</a></code> or
+<code class="directive">&lt;ElseIf&gt;</code> section is not
+satisfied</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;ElseIf <var>expression</var>&gt; ... &lt;/ElseIf&gt;</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
+<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+</table>
+    <p>The <code class="directive">&lt;ElseIf&gt;</code> applies the enclosed
+    directives if and only if both the given condition evaluates to true and
+    the most recent <code class="directive">&lt;If&gt;</code> or
+    <code class="directive">&lt;ElseIf&gt;</code> section in the same scope has
+    not been applied.  For example: In </p>
+
+    <pre class="prettyprint lang-config">
+&lt;If "-R '10.1.0.0/16'"&gt;
+  #...
+&lt;/If&gt;
+&lt;ElseIf "-R '10.0.0.0/8'"&gt;
+  #...
+&lt;/ElseIf&gt;
+&lt;Else&gt;
+  #...
+&lt;/Else&gt;
+    </pre>
+
+
+    <p>The <code class="directive">&lt;ElseIf&gt;</code> would match if
+    the remote address of a request belongs to the subnet 10.0.0.0/8 but
+    not to the subnet 10.1.0.0/16.</p>
+
+
+<h3>See also</h3>
+<ul>
+<li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
+for a complete reference and more examples.</li>
+<li><code class="directive"><a href="#if">&lt;If&gt;</a></code></li>
+<li><code class="directive"><a href="#else">&lt;Else&gt;</a></code></li>
+<li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
+    &lt;Files&gt; sections work</a> for an explanation of how these
+    different sections are combined when a request is received.
+    <code class="directive">&lt;If&gt;</code>,
+    <code class="directive">&lt;ElseIf&gt;</code>, and
+    <code class="directive">&lt;Else&gt;</code> are applied last.</li>
+</ul>
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
 <table class="directive">
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
@@ -861,20 +1146,18 @@ Locations</a></li>
     <p>For server configurations that are vulnerable to these problems,
     you should disable memory-mapping of delivered files by specifying:</p>
 
-    <div class="example"><p><code>
-      EnableMMAP Off
-    </code></p></div>
+    <pre class="prettyprint lang-config">EnableMMAP Off</pre>
+
 
     <p>For NFS mounted files, this feature may be disabled explicitly for
     the offending files by specifying:</p>
 
-    <div class="example"><p><code>
-      &lt;Directory "/path-to-nfs-files"&gt;
-      <span class="indent">
-        EnableMMAP Off
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory "/path-to-nfs-files"&gt;
+  EnableMMAP Off
+&lt;/Directory&gt;
+    </pre>
+
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -909,8 +1192,8 @@ version 2.3.9.</td></tr>
     support.</li>
     <li>On Linux the use of sendfile triggers TCP-checksum
     offloading bugs on certain networking cards when using IPv6.</li>
-    <li>On Linux on Itanium, sendfile may be unable to handle files
-    over 2GB in size.</li>
+    <li>On Linux on Itanium, <code>sendfile</code> may be unable to handle
+    files over 2GB in size.</li>
     <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS, SMB, CIFS, FUSE),
     the kernel may be unable to serve the network file through
     its own cache.</li>
@@ -919,20 +1202,18 @@ version 2.3.9.</td></tr>
     <p>For server configurations that are not vulnerable to these problems,
     you may enable this feature by specifying:</p>
 
-    <div class="example"><p><code>
-      EnableSendfile On
-    </code></p></div>
+    <pre class="prettyprint lang-config">EnableSendfile On</pre>
+
 
     <p>For network mounted files, this feature may be disabled explicitly
     for the offending files by specifying:</p>
 
-    <div class="example"><p><code>
-      &lt;Directory "/path-to-nfs-files"&gt;
-      <span class="indent">
-        EnableSendfile Off
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory "/path-to-nfs-files"&gt;
+  EnableSendfile Off
+&lt;/Directory&gt;
+    </pre>
+
     <p>Please note that the per-directory and .htaccess configuration
        of <code class="directive">EnableSendfile</code> is not supported by
        <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code>.
@@ -956,24 +1237,26 @@ version 2.3.9.</td></tr>
     configuration parsing.  The typical use is for reporting required
     modules which are missing from the configuration.</p>
 
-    <div class="example"><h3>Example</h3><p><code>
-      # ensure that mod_include is loaded<br />
-      &lt;IfModule !include_module&gt;<br />
-      Error mod_include is required by mod_foo.  Load it with LoadModule.<br />
-      &lt;/IfModule&gt;<br />
-      <br />
-      # ensure that exactly one of SSL,NOSSL is defined<br />
-      &lt;IfDefine SSL&gt;<br />
-      &lt;IfDefine NOSSL&gt;<br />
-      Error Both SSL and NOSSL are defined.  Define only one of them.<br />
-      &lt;/IfDefine&gt;<br />
-      &lt;/IfDefine&gt;<br />
-      &lt;IfDefine !SSL&gt;<br />
-      &lt;IfDefine !NOSSL&gt;<br />
-      Error Either SSL or NOSSL must be defined.<br />
-      &lt;/IfDefine&gt;<br />
-      &lt;/IfDefine&gt;<br />
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+# Example
+# ensure that mod_include is loaded
+&lt;IfModule !include_module&gt;
+  Error "mod_include is required by mod_foo.  Load it with LoadModule."
+&lt;/IfModule&gt;
+
+# ensure that exactly one of SSL,NOSSL is defined
+&lt;IfDefine SSL&gt;
+&lt;IfDefine NOSSL&gt;
+  Error "Both SSL and NOSSL are defined.  Define only one of them."
+&lt;/IfDefine&gt;
+&lt;/IfDefine&gt;
+&lt;IfDefine !SSL&gt;
+&lt;IfDefine !NOSSL&gt;
+  Error "Either SSL or NOSSL must be defined."
+&lt;/IfDefine&gt;
+&lt;/IfDefine&gt;
+    </pre>
+
 
 
 </div>
@@ -1014,12 +1297,14 @@ in case of an error</td></tr>
     full URL which the client can resolve. Alternatively, a message
     can be provided to be displayed by the browser. Examples:</p>
 
-    <div class="example"><p><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></p></div>
+    <pre class="prettyprint lang-config">
+ErrorDocument 500 http://foo.example.com/cgi-bin/tester
+ErrorDocument 404 /cgi-bin/bad_urls.pl
+ErrorDocument 401 /subscription_info.html
+ErrorDocument 403 "Sorry can't allow you access today"
+ErrorDocument 403 Forbidden!
+    </pre>
+
 
     <p>Additionally, the special value <code>default</code> can be used
     to specify Apache httpd's simple hardcoded message.  While not required
@@ -1027,14 +1312,14 @@ in case of an error</td></tr>
     Apache httpd's simple hardcoded message for configurations that would
     otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
 
-    <div class="example"><p><code>
-      ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
-      &lt;Directory /web/docs&gt;<br />
-      <span class="indent">
-        ErrorDocument 404 default<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+ErrorDocument 404 /cgi-bin/bad_urls.pl
+
+&lt;Directory /web/docs&gt;
+  ErrorDocument 404 default
+&lt;/Directory&gt;
+    </pre>
+
 
     <p>Note that when you specify an <code class="directive">ErrorDocument</code>
     that points to a remote URL (ie. anything with a method such as
@@ -1060,14 +1345,14 @@ in case of an error</td></tr>
     error rather than masking it.  More information is available in
     Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
 
-    <p>Although most error messages can be overriden, there are certain
+    <p>Although most error messages can be overridden, there are certain
     circumstances where the internal messages are used regardless of the
     setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>.  In
     particular, if a malformed request is detected, normal request processing
     will be immediately halted and the internal error message returned.
     This is necessary to guard against security problems caused by
     bad requests.</p>
-   
+
     <p>If you are using mod_proxy, you may wish to enable
     <code class="directive"><a href="../mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide
     custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
@@ -1091,20 +1376,18 @@ in case of an error</td></tr>
 </table>
     <p>The <code class="directive">ErrorLog</code> directive sets the name of
     the file to which the server will log any errors it encounters. If
-    the <var>file-path</var> is not absolute then it is assumed to be 
+    the <var>file-path</var> is not absolute then it is assumed to be
     relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
 
-    <div class="example"><h3>Example</h3><p><code>
-    ErrorLog /var/log/httpd/error_log
-    </code></p></div>
+    <pre class="prettyprint lang-config">ErrorLog "/var/log/httpd/error_log"</pre>
+
 
     <p>If the <var>file-path</var>
     begins with a pipe character "<code>|</code>" then it is assumed to be a
     command to spawn to handle the error log.</p>
 
-    <div class="example"><h3>Example</h3><p><code>
-    ErrorLog "|/usr/local/bin/httpd_errors"
-    </code></p></div>
+    <pre class="prettyprint lang-config">ErrorLog "|/usr/local/bin/httpd_errors"</pre>
+
 
     <p>See the notes on <a href="../logs.html#piped">piped logs</a> for
     more information.</p>
@@ -1118,9 +1401,8 @@ in case of an error</td></tr>
     in individual virtual hosts, the final facility specified affects the
     entire server.</p>
 
-    <div class="example"><h3>Example</h3><p><code>
-    ErrorLog syslog:user
-    </code></p></div>
+    <pre class="prettyprint lang-config">ErrorLog syslog:user</pre>
+
 
     <p>SECURITY: See the <a href="../misc/security_tips.html#serverroot">security tips</a>
     document for details on why your security could be compromised
@@ -1129,7 +1411,7 @@ in case of an error</td></tr>
     <div class="warning"><h3>Note</h3>
       <p>When entering a file path on non-Unix platforms, care should be taken
       to make sure that only forward slashes are used even though the platform
-      may allow the use of back slashes. In general it is a good idea to always 
+      may allow the use of back slashes. In general it is a good idea to always
       use forward slashes throughout the configuration files.</p>
     </div>
 
@@ -1143,7 +1425,7 @@ in case of an error</td></tr>
 <div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">Directive</a></h2>
 <table class="directive">
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Format specification for error log entries</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLog [connection|request] <var>format</var></code></td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
@@ -1153,14 +1435,16 @@ in case of an error</td></tr>
     supplementary information is logged in the error log in addition to the
     actual log message.</p>
 
-    <div class="example"><h3>Simple example</h3><p><code>
-        ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+#Simple example
+ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
+    </pre>
+
 
     <p>Specifying <code>connection</code> or <code>request</code> as first
-    paramter allows to specify additional formats, causing additional
+    parameter allows to specify additional formats, causing additional
     information to be logged when the first message is logged for a specific
-    connection or request, respectivly. This additional information is only
+    connection or request, respectively. This additional information is only
     logged once per connection/request. If a connection or request is processed
     without causing any log message, the additional information is not logged
     either.</p>
@@ -1169,77 +1453,103 @@ in case of an error</td></tr>
     example, the Referer header is only present if the log message is
     associated to a request and the log message happens at a time when the
     Referer header has already been read from the client.  If no output is
-    produced, the default behaviour is to delete everything from the preceeding
+    produced, the default behavior is to delete everything from the preceding
     space character to the next space character.  This means the log line is
     implicitly divided into fields on non-whitespace to whitespace transitions.
     If a format string item does not produce output, the whole field is
-    ommitted.  For example, if the remote address <code>%a</code> in the log
+    omitted.  For example, if the remote address <code>%a</code> in the log
     format <code>[%t] [%l] [%a] %M&nbsp;</code> is not available, the surrounding
     brackets are not logged either.  Space characters can be escaped with a
     backslash to prevent them from delimiting a field.  The combination '%&nbsp;'
-    (percent space) is a zero-witdh field delimiter that does not produce any
+    (percent space) is a zero-width field delimiter that does not produce any
     output.</p>
 
-    <p>The above behaviour can be changed by adding modifiers to the format
+    <p>The above behavior can be changed by adding modifiers to the format
     string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
     respective item does not produce any output. In once-per-connection/request
     formats, it is also possible to use the <code>+</code> (plus) modifier. If an
     item with the plus modifier does not produce any output, the whole line is
-    ommitted.</p>
+    omitted.</p>
 
     <p>A number as modifier can be used to assign a log severity level to a
     format item. The item will only be logged if the severity of the log
     message is not higher than the specified log severity level. The number can
     range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
 
+    <p>For example, here's what would happen if you added modifiers to
+    the <code>%{Referer}i</code> token, which logs the
+    <code>Referer</code> request header.</p>
+
+    <table class="bordered"><tr class="header"><th>Modified Token</th><th>Meaning</th></tr>
+<tr>
+    <td><code>%-{Referer}i</code></td>
+    <td>Logs a <code>-</code> if <code>Referer</code> is not set.</td>
+    </tr>
+<tr class="odd">
+    <td><code>%+{Referer}i</code></td>
+    <td>Omits the entire line if <code>Referer</code> is not set.</td>
+    </tr>
+<tr>
+    <td><code>%4{Referer}i</code></td>
+    <td>Logs the <code>Referer</code> only if the log message severity
+    is higher than 4.</td>
+    </tr>
+</table>
+
     <p>Some format string items accept additional parameters in braces.</p>
 
     <table class="bordered"><tr class="header"><th>Format&nbsp;String</th> <th>Description</th></tr>
 <tr><td><code>%%</code></td>
         <td>The percent sign</td></tr>
-<tr class="odd"><td><code>%...a</code></td>
-        <td>Remote IP-address and port</td></tr>
-<tr><td><code>%...A</code></td>
+<tr class="odd"><td><code>%a</code></td>
+        <td>Client IP address and port of the request</td></tr>
+<tr><td><code>%{c}a</code></td>
+        <td>Underlying peer IP address and port of the connection (see the
+            <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> module)</td></tr>
+<tr class="odd"><td><code>%A</code></td>
         <td>Local IP-address and port</td></tr>
-<tr class="odd"><td><code>%...{name}e</code></td>
-        <td>Request environment variable <code>name</code></td></tr>
-<tr><td><code>%...E</code></td>
+<tr><td><code>%{<em>name</em>}e</code></td>
+        <td>Request environment variable <em>name</em></td></tr>
+<tr class="odd"><td><code>%E</code></td>
         <td>APR/OS error status code and string</td></tr>
-<tr class="odd"><td><code>%...F</code></td>
+<tr><td><code>%F</code></td>
         <td>Source file name and line number of the log call</td></tr>
-<tr><td><code>%...{name}i</code></td>
-        <td>Request header <code>name</code></td></tr>
-<tr class="odd"><td><code>%...k</code></td>
+<tr class="odd"><td><code>%{<em>name</em>}i</code></td>
+        <td>Request header <em>name</em></td></tr>
+<tr><td><code>%k</code></td>
         <td>Number of keep-alive requests on this connection</td></tr>
-<tr><td><code>%...l</code></td>
+<tr class="odd"><td><code>%l</code></td>
         <td>Loglevel of the message</td></tr>
-<tr class="odd"><td><code>%...L</code></td>
+<tr><td><code>%L</code></td>
         <td>Log ID of the request</td></tr>
-<tr><td><code>%...{c}L</code></td>
+<tr class="odd"><td><code>%{c}L</code></td>
         <td>Log ID of the connection</td></tr>
-<tr class="odd"><td><code>%...{C}L</code></td>
+<tr><td><code>%{C}L</code></td>
         <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
-<tr><td><code>%...m</code></td>
+<tr class="odd"><td><code>%m</code></td>
         <td>Name of the module logging the message</td></tr>
-<tr class="odd"><td><code>%M</code></td>
+<tr><td><code>%M</code></td>
         <td>The actual log message</td></tr>
-<tr><td><code>%...{name}n</code></td>
-        <td>Request note <code>name</code></td></tr>
-<tr class="odd"><td><code>%...P</code></td>
+<tr class="odd"><td><code>%{<em>name</em>}n</code></td>
+        <td>Request note <em>name</em></td></tr>
+<tr><td><code>%P</code></td>
         <td>Process ID of current process</td></tr>
-<tr><td><code>%...T</code></td>
+<tr class="odd"><td><code>%T</code></td>
         <td>Thread ID of current thread</td></tr>
-<tr class="odd"><td><code>%...t</code></td>
+<tr><td><code>%{g}T</code></td>
+        <td>System unique thread ID of current thread (the same ID as
+            displayed by e.g. <code>top</code>; currently Linux only)</td></tr>
+<tr class="odd"><td><code>%t</code></td>
         <td>The current time</td></tr>
-<tr><td><code>%...{u}t</code></td>
+<tr><td><code>%{u}t</code></td>
         <td>The current time including micro-seconds</td></tr>
-<tr class="odd"><td><code>%...{cu}t</code></td>
+<tr class="odd"><td><code>%{cu}t</code></td>
         <td>The current time in compact ISO 8601 format, including
             micro-seconds</td></tr>
-<tr><td><code>%...v</code></td>
+<tr><td><code>%v</code></td>
         <td>The canonical <code class="directive"><a href="#servername">ServerName</a></code>
             of the current server.</td></tr>
-<tr class="odd"><td><code>%...V</code></td>
+<tr class="odd"><td><code>%V</code></td>
         <td>The server name of the server serving the request according to the
             <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>
             setting.</td></tr>
@@ -1257,24 +1567,37 @@ in case of an error</td></tr>
     with error log lines. If <code class="module"><a href="../mod/mod_unique_id.html">mod_unique_id</a></code> is loaded, its
     unique id will be used as log ID for requests.</p>
 
-    <div class="example"><h3>Example (somewhat similar to default format)</h3><p><code>
-        ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P] %7F: %E: [client\ %a]
-        %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+#Example (default format)
+ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
+    </pre>
 
-    <div class="example"><h3>Example (similar to the 2.2.x format)</h3><p><code>
-        ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a]
-        %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
-    </code></p></div>
 
-    <div class="example"><h3>Advanced example with request/connection log IDs</h3><p><code>
-        ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"<br />
-        ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"<br />
-        ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"<br />
-        ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"<br />
-        ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"<br />
+    <p>This would result in error messages such as:</p>
+
+       <div class="example"><p><code>
+    [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico
     </code></p></div>
 
+    <p>Notice that, as discussed above, some fields are omitted
+    entirely because they are not defined.</p>
+
+    <pre class="prettyprint lang-config">
+#Example (similar to the 2.2.x format)
+ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
+    </pre>
+
+
+    <pre class="prettyprint lang-config">
+#Advanced example with request/connection log IDs
+ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
+ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
+ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
+ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
+ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
+    </pre>
+
+
 
 <h3>See also</h3>
 <ul>
@@ -1286,7 +1609,7 @@ in case of an error</td></tr>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Directive</a></h2>
 <table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Keep track of extended status information for each 
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Keep track of extended status information for each
 request</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ExtendedStatus On|Off</code></td></tr>
 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr>
@@ -1295,8 +1618,8 @@ request</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
 </table>
     <p>This option tracks additional data per worker about the
-    currently executing request, and a utilization summary; you 
-    can see these variables during runtime by configuring 
+    currently executing request, and a utilization summary; you
+    can see these variables during runtime by configuring
     <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>.  Note that other modules may
     rely on this scoreboard.</p>
 
@@ -1307,7 +1630,7 @@ request</td></tr>
     during a graceful restart.</p>
 
     <div class="note">
-    <p>Note that loading <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> will change 
+    <p>Note that loading <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> will change
     the default behavior to ExtendedStatus On, while other
     third party modules may do the same.  Such modules rely on
     collecting detailed information about the state of all workers.
@@ -1323,11 +1646,13 @@ request</td></tr>
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File attributes used to create the ETag
 HTTP response header for static files</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
-<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag INode MTime Size</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag MTime Size</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The default used to be "INode&nbsp;MTime&nbsp;Size" in 2.3.14 and
+earlier.</td></tr>
 </table>
     <p>
     The <code class="directive">FileETag</code> directive configures the file
@@ -1348,7 +1673,8 @@ HTTP response header for static files</td></tr>
      <dd>The number of bytes in the file will be included</dd>
      <dt><strong>All</strong></dt>
      <dd>All available fields will be used. This is equivalent to:
-         <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd>
+         <pre class="prettyprint lang-config">FileETag INode MTime Size</pre>
+</dd>
      <dt><strong>None</strong></dt>
      <dd>If a document is file-based, no <code>ETag</code> field will be
        included in the response</dd>
@@ -1369,14 +1695,14 @@ HTTP response header for static files</td></tr>
     <div class="warning"><h3>Warning</h3>
     Do not change the default for directories or locations that have WebDAV
     enabled and use <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider.
-    <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>INode&nbsp;MTime&nbsp;Size</code>
+    <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>MTime&nbsp;Size</code>
     as a fixed format for <code>ETag</code> comparisons on conditional requests.
     These conditional requests will break if the <code>ETag</code> format is
     changed via <code class="directive">FileETag</code>.
     </div>
     <div class="note"><h3>Server Side Includes</h3>
-    An ETag is not generated for responses parsed by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>, 
-    since the response entity can change without a change of the INode, MTime, or Size 
+    An ETag is not generated for responses parsed by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>,
+    since the response entity can change without a change of the INode, MTime, or Size
     of the static file with embedded SSI directives.
     </div>
 
@@ -1410,14 +1736,27 @@ filenames</td></tr>
 
     <p>The <var>filename</var> argument should include a filename, or
     a wild-card string, where <code>?</code> matches any single character,
-    and <code>*</code> matches any sequences of characters.
-    <a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a> 
+    and <code>*</code> matches any sequences of characters.</p>
+    <pre class="prettyprint lang-config">
+&lt;Files "cat.html"&gt;
+    # Insert stuff that applies to cat.html here
+&lt;/Files&gt;
+
+&lt;Files "?at.*"&gt;
+    # This would apply to cat.html, bat.html, hat.php and so on.
+&lt;/Files&gt;
+</pre>
+
+    <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a>
     can also be used, with the addition of the
     <code>~</code> character. For example:</p>
 
-    <div class="example"><p><code>
-      &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
+    #...
+&lt;/Files&gt;
+</pre>
+
 
     <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch">&lt;FilesMatch&gt;</a></code> is preferred,
     however.</p>
@@ -1448,12 +1787,15 @@ filenames</td></tr>
     <p>The <code class="directive">&lt;FilesMatch&gt;</code> directive
     limits the scope of the enclosed directives by filename, just as the
     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> directive
-    does. However, it accepts a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular 
+    does. However, it accepts a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular
     expression</a>. For example:</p>
 
-    <div class="example"><p><code>
-      &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
-    </code></p></div>
+<pre class="prettyprint lang-config">
+&lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
+    # ...
+&lt;/FilesMatch&gt;
+</pre>
+
 
     <p>would match most common Internet graphics formats.</p>
 
@@ -1486,9 +1828,8 @@ media type in the HTTP Content-Type header field</td></tr>
     GIF files, but did not want to label them all with <code>.gif</code>,
     you might want to use:</p>
 
-    <div class="example"><p><code>
-      ForceType image/gif
-    </code></p></div>
+    <pre class="prettyprint lang-config">ForceType image/gif</pre>
+
 
     <p>Note that this directive overrides other indirect media type
     associations defined in mime.types or via the
@@ -1498,25 +1839,22 @@ media type in the HTTP Content-Type header field</td></tr>
     <code class="directive">ForceType</code> settings
     by using the value of <code>None</code>:</p>
 
-    <div class="example"><p><code>
-      # force all files to be image/gif:<br />
-      &lt;Location /images&gt;<br />
-        <span class="indent">
-          ForceType image/gif<br />
-        </span>
-      &lt;/Location&gt;<br />
-      <br />
-      # but normal mime-type associations here:<br />
-      &lt;Location /images/mixed&gt;<br />
-      <span class="indent">
-        ForceType None<br />
-      </span>
-      &lt;/Location&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+# force all files to be image/gif:
+&lt;Location /images&gt;
+  ForceType image/gif
+&lt;/Location&gt;
+
+# but normal mime-type associations here:
+&lt;Location /images/mixed&gt;
+  ForceType None
+&lt;/Location&gt;
+    </pre>
+
 
     <p>This directive primarily overrides the content types generated for
-    static files served out of the filesystem.  For resources other than 
-    static files, where the generator of the response typically specifies 
+    static files served out of the filesystem.  For resources other than
+    static files, where the generator of the response typically specifies
     a Content-Type, this directive has no effect.</p>
 
 
@@ -1530,13 +1868,13 @@ media type in the HTTP Content-Type header field</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
 </table>
-    <p>When the server has been compiled with gprof profiling suppport,
+    <p>When the server has been compiled with gprof profiling support,
     <code class="directive">GprofDir</code> causes <code>gmon.out</code> files to
     be written to the specified directory when the process exits.  If the
     argument ends with a percent symbol ('%'), subdirectories are created
     for each process id.</p>
 
-    <p>This directive currently only works with the <code class="module"><a href="../mod/prefork.html">prefork</a></code> 
+    <p>This directive currently only works with the <code class="module"><a href="../mod/prefork.html">prefork</a></code>
     MPM.</p>
 
 </div>
@@ -1580,6 +1918,10 @@ media type in the HTTP Content-Type header field</td></tr>
     directory, can be used to look up host names from logged IP addresses
     offline.</p>
 
+    <p>Finally, if you have <a href="mod_authz_host.html#reqhost">hostname-based Require
+    directives</a>, a hostname lookup will be performed regardless of
+    the setting of <code>HostnameLookups</code>.</p>
+
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="If" id="If">&lt;If&gt;</a> <a name="if" id="if">Directive</a></h2>
@@ -1597,33 +1939,38 @@ satisfied by a request at runtime</td></tr>
     directives if and only if the expression evaluates to true.
     For example:</p>
 
-    <div class="example"><p><code>
-        &lt;If "$req{Host} = ''"&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">&lt;If "-z req('Host')"&gt;</pre>
 
-    <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
 
-    <p>You may compare the value of any variable in the request headers
-    ($req), response headers ($resp) or environment ($env) in your
-    expression.</p>
+    <p>would match HTTP/1.0 requests without a <var>Host:</var> header.
+    Expressions may contain various shell-like operators for string
+    comparison (<code>=</code>, <code>!=</code>, <code>&lt;</code>, ...),
+    integer comparison (<code>-eq</code>, <code>-ne</code>, ...),
+    and others (<code>-n</code>, <code>-z</code>, <code>-f</code>, ...).
+    It is also possible to use regular expressions, </p>
 
-    <p>Apart from <code>=</code>, <code>If</code> can use the <code>IN</code>
-    operator to compare if the expression is in a given range:</p>
+    <pre class="prettyprint lang-config">&lt;If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"&gt;</pre>
 
-    <div class="example"><p><code>
-        &lt;If %{REQUEST_METHOD} IN GET,HEAD,OPTIONS&gt;
-    </code></p></div>
+
+    <p>shell-like pattern matches and many other operations. These operations
+    can be done on request headers (<code>req</code>), environment variables
+    (<code>env</code>), and a large number of other properties. The full
+    documentation is available in <a href="../expr.html">Expressions in
+    Apache HTTP Server</a>.</p>
 
 
 <h3>See also</h3>
 <ul>
 <li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
 for a complete reference and more examples.</li>
+<li><code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code></li>
+<li><code class="directive"><a href="#else">&lt;Else&gt;</a></code></li>
 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
     &lt;Files&gt; sections work</a> for an explanation of how these
     different sections are combined when a request is received.
-    <code class="directive">&lt;If&gt;</code> has the same precedence
-    and usage as <code class="directive">&lt;Files&gt;</code></li>
+    <code class="directive">&lt;If&gt;</code>,
+    <code class="directive">&lt;ElseIf&gt;</code>, and
+    <code class="directive">&lt;Else&gt;</code> are applied last.</li>
 </ul>
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -1667,32 +2014,23 @@ if a test is true at startup</td></tr>
     nest-able, which can be used to implement simple
     multiple-parameter tests. Example:</p>
 
-    <div class="example"><p><code>
-      httpd -DReverseProxy -DUseCache -DMemCache ...<br />
-      <br />
-      # httpd.conf<br />
-      &lt;IfDefine ReverseProxy&gt;<br />
-      <span class="indent">
-        LoadModule proxy_module   modules/mod_proxy.so<br />
-        LoadModule proxy_http_module   modules/mod_proxy_http.so<br />
-        &lt;IfDefine UseCache&gt;<br />
-        <span class="indent">
-          LoadModule cache_module   modules/mod_cache.so<br />
-          &lt;IfDefine MemCache&gt;<br />
-          <span class="indent">
-            LoadModule mem_cache_module   modules/mod_mem_cache.so<br />
-          </span>
-          &lt;/IfDefine&gt;<br />
-          &lt;IfDefine !MemCache&gt;<br />
-          <span class="indent">
-            LoadModule cache_disk_module   modules/mod_cache_disk.so<br />
-          </span>
-          &lt;/IfDefine&gt;
-        </span>
-        &lt;/IfDefine&gt;
-      </span>
-      &lt;/IfDefine&gt;
-    </code></p></div>
+    <div class="example"><p><code>httpd -DReverseProxy -DUseCache -DMemCache ...</code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;IfDefine ReverseProxy&gt;
+  LoadModule proxy_module   modules/mod_proxy.so
+  LoadModule proxy_http_module   modules/mod_proxy_http.so
+  &lt;IfDefine UseCache&gt;
+    LoadModule cache_module   modules/mod_cache.so
+    &lt;IfDefine MemCache&gt;
+      LoadModule mem_cache_module   modules/mod_mem_cache.so
+    &lt;/IfDefine&gt;
+    &lt;IfDefine !MemCache&gt;
+      LoadModule cache_disk_module   modules/mod_cache_disk.so
+    &lt;/IfDefine&gt;
+  &lt;/IfDefine&gt;
+&lt;/IfDefine&gt;
+    </pre>
+
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -1753,7 +2091,7 @@ later.</td></tr>
 <table class="directive">
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
 the server configuration files</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include [<var>optional</var>|<var>strict</var>] <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
@@ -1774,72 +2112,71 @@ wildcard matching available in 2.3.6 and later</td></tr>
     wildcard syntax shown below, to include files that match a particular
     pattern, such as *.conf, for example.</p>
 
-    <p>When a wildcard is specified for a <strong>file</strong> component of
-    the path, and no file matches the wildcard, the
-    <code class="directive"><a href="#include">Include</a></code>
-    directive will be <strong>silently ignored</strong>. When a wildcard is
-    specified for a <strong>directory</strong> component of the path, and
-    no directory matches the wildcard, the
-    <code class="directive"><a href="#include">Include</a></code> directive will
-    <strong>fail with an error</strong> saying the directory cannot be found.
-    </p>
+    <p>The <code class="directive"><a href="#include">Include</a></code> directive will
+    <strong>fail with an error</strong> if a wildcard expression does not
+    match any file. The <code class="directive"><a href="#includeoptional">IncludeOptional</a></code>
+    directive can be used if non-matching wildcards should be ignored.</p>
 
-    <p>For further control over the behaviour of the server when no files or
-    directories match, prefix the path with the modifiers <var>optional</var>
-    or <var>strict</var>. If <var>optional</var> is specified, any wildcard
-    file or directory that does not match will be silently ignored. If
-    <var>strict</var> is specified, any wildcard file or directory that does
-    not match at least one file will cause server startup to fail.</p>
-
-    <p>When a directory or file component of the path is
-    specified exactly, and that directory or file does not exist,
-    <code class="directive"><a href="#include">Include</a></code> directive will fail with an
-    error saying the file or directory cannot be found.</p>
-
-    <p>The file path specified may be an absolute path, or may be relative 
+    <p>The file path specified may be an absolute path, or may be relative
     to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
 
     <p>Examples:</p>
 
-    <div class="example"><p><code>
-      Include /usr/local/apache2/conf/ssl.conf<br />
-      Include /usr/local/apache2/conf/vhosts/*.conf
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+Include /usr/local/apache2/conf/ssl.conf
+Include /usr/local/apache2/conf/vhosts/*.conf
+    </pre>
+
 
     <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
 
-    <div class="example"><p><code>
-      Include conf/ssl.conf<br />
-      Include conf/vhosts/*.conf
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+Include conf/ssl.conf
+Include conf/vhosts/*.conf
+    </pre>
+
 
     <p>Wildcards may be included in the directory or file portion of the
-    path. In the following example, the server will fail to load if no
-    directories match conf/vhosts/*, but will load successfully if no
-    files match *.conf.</p>
-  
-    <div class="example"><p><code>
-      Include conf/vhosts/*/vhost.conf<br />
-      Include conf/vhosts/*/*.conf
-    </code></p></div>
+    path. This example will fail if there is no subdirectory in conf/vhosts
+    that contains at least one *.conf file:</p>
 
-    <p>In this example, the server will fail to load if either
-    conf/vhosts/* matches no directories, or if *.conf matches no files:</p>
+    <pre class="prettyprint lang-config">Include conf/vhosts/*/*.conf</pre>
+
+
+    <p>Alternatively, the following command will just be ignored in case of
+    missing files or directories:</p>
+
+    <pre class="prettyprint lang-config">IncludeOptional conf/vhosts/*/*.conf</pre>
 
-    <div class="example"><p><code>
-      Include strict conf/vhosts/*/*.conf
-    </code></p></div>
-  
-    <p>In this example, the server load successfully if either conf/vhosts/*
-    matches no directories, or if *.conf matches no files:</p>
 
-    <div class="example"><p><code>
-      Include optional conf/vhosts/*/*.conf
-    </code></p></div>
 
+<h3>See also</h3>
+<ul>
+<li><code class="directive"><a href="#includeoptional">IncludeOptional</a></code></li>
+<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
+</ul>
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
+the server configuration files</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.3.6 and later</td></tr>
+</table>
+    <p>This directive allows inclusion of other configuration files
+    from within the server configuration files. It works identically to the
+    <code class="directive"><a href="#include">Include</a></code> directive, with the
+    exception that if wildcards do not match any file or directory, the
+    <code class="directive"><a href="#includeoptional">IncludeOptional</a></code> directive will be
+    silently ignored instead of causing an error.</p>
 
 <h3>See also</h3>
 <ul>
+<li><code class="directive"><a href="#include">Include</a></code></li>
 <li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
 </ul>
 </div>
@@ -1892,7 +2229,7 @@ requests on a persistent connection</td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Specifying a value in milliseconds is available in 
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Specifying a value in milliseconds is available in
 Apache httpd 2.3.2 and later</td></tr>
 </table>
     <p>The number of seconds Apache httpd will wait for a subsequent
@@ -1905,10 +2242,9 @@ Apache httpd 2.3.2 and later</td></tr>
     may cause performance problems in heavily loaded servers. The
     higher the timeout, the more server processes will be kept
     occupied waiting on connections with idle clients.</p>
-    
+
     <p>In a name-based virtual host context, the value of the first
-    defined virtual host (the default host) in a set of <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> will be used.
-    The other values will be ignored.</p>
+    defined virtual host best matching the local IP and port will be used.</p>
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -1937,13 +2273,12 @@ methods</td></tr>
     only to the methods <code>POST</code>, <code>PUT</code>, and
     <code>DELETE</code>, leaving all other methods unprotected:</p>
 
-    <div class="example"><p><code>
-      &lt;Limit POST PUT DELETE&gt;<br />
-      <span class="indent">
-        Require valid-user<br />
-      </span>
-      &lt;/Limit&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Limit POST PUT DELETE&gt;
+  Require valid-user
+&lt;/Limit&gt;
+    </pre>
+
 
     <p>The method names listed can be one or more of: <code>GET</code>,
     <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
@@ -1979,18 +2314,15 @@ methods</td></tr>
     <code>Require group editors</code> directive will be ignored
     in all cases:</p>
 
-    <div class="example"><p><code>
-      &lt;LimitExcept GET&gt;
-      <span class="indent">
-        Require valid-user
-      </span> 
-      &lt;/LimitExcept&gt;<br />
-      &lt;Limit POST&gt;
-      <span class="indent">
-        Require group editors
-      </span> 
-      &lt;/Limit&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;LimitExcept GET&gt;
+  Require valid-user
+&lt;/LimitExcept&gt;
+&lt;Limit POST&gt;
+  Require group editors
+&lt;/Limit&gt;
+    </pre>
+
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -2015,13 +2347,12 @@ except the named ones</td></tr>
 
     <p>For example:</p>
 
-    <div class="example"><p><code>
-      &lt;LimitExcept POST GET&gt;<br />
-      <span class="indent">
-        Require valid-user<br />
-      </span>
-      &lt;/LimitExcept&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;LimitExcept POST GET&gt;
+  Require valid-user
+&lt;/LimitExcept&gt;
+    </pre>
+
 
 
 </div>
@@ -2054,9 +2385,8 @@ subrequests</td></tr>
     determines, how deep subrequests may be nested. If you specify only one
     <var>number</var>, it will be assigned to both limits.</p>
 
-    <div class="example"><h3>Example</h3><p><code>
-      LimitInternalRecursion 5
-    </code></p></div>
+    <pre class="prettyprint lang-config">LimitInternalRecursion 5</pre>
+
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -2098,11 +2428,10 @@ from the client</td></tr>
     location, and wish to limit the size of the uploaded file to 100K,
     you might use the following directive:</p>
 
-    <div class="example"><p><code>
-      LimitRequestBody 102400
-    </code></p></div>
-    
-    <div class="note"><p>For a full description of how this directive is interpreted by 
+    <pre class="prettyprint lang-config">LimitRequestBody 102400</pre>
+
+
+    <div class="note"><p>For a full description of how this directive is interpreted by
     proxy requests, see the <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> documentation.</p>
     </div>
 
@@ -2144,14 +2473,13 @@ will be accepted from the client</td></tr>
 
     <p>For example:</p>
 
-    <div class="example"><p><code>
-      LimitRequestFields 50
-    </code></p></div>
+    <pre class="prettyprint lang-config">LimitRequestFields 50</pre>
+
 
      <div class="warning"><h3>Warning</h3>
-     <p> When name-based virtual hosting is used, the value for this 
+     <p> When name-based virtual hosting is used, the value for this
      directive is taken from the default (first-listed) virtual host for the
-     <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
+     local IP and port combination.</p>
      </div>
 
 
@@ -2171,11 +2499,11 @@ client</td></tr>
     that will be allowed in an HTTP request header.</p>
 
     <p>The <code class="directive">LimitRequestFieldSize</code> directive
-    allows the server administrator to reduce or increase the limit 
+    allows the server administrator to set the limit
     on the allowed size of an HTTP request header field. 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, 
+    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. SPNEGO
     authentication headers can be up to 12392 bytes.</p>
@@ -2186,20 +2514,18 @@ client</td></tr>
 
     <p>For example:</p>
 
-    <div class="example"><p><code>
-      LimitRequestFieldSize 4094
-    </code></p></div>
+    <pre class="prettyprint lang-config">LimitRequestFieldSize 4094</pre>
+
 
     <div class="note">Under normal conditions, the value should not be changed from
     the default.</div>
 
     <div class="warning"><h3>Warning</h3>
-    <p> When name-based virtual hosting is used, the value for this 
-    directive is taken from the default (first-listed) virtual host for the
-    <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
+    <p> When name-based virtual hosting is used, the value for this
+    directive is taken from the default (first-listed) virtual host best
+    matching the current IP address and port combination.</p>
     </div>
 
-
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directive</a></h2>
@@ -2212,11 +2538,11 @@ from the client</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
 </table>
-    <p>This directive sets the number of <var>bytes</var> that will be 
+    <p>This directive sets the number of <var>bytes</var> that will be
     allowed on the HTTP request-line.</p>
 
     <p>The <code class="directive">LimitRequestLine</code> directive allows
-    the server administrator to reduce or increase the limit on the allowed size
+    the server administrator to set the limit on the allowed size
     of a client's HTTP request-line. Since the request-line consists of the
     HTTP method, URI, and protocol version, the
     <code class="directive">LimitRequestLine</code> directive places a
@@ -2231,17 +2557,17 @@ from the client</td></tr>
 
     <p>For example:</p>
 
-    <div class="example"><p><code>
-      LimitRequestLine 4094
-    </code></p></div>
+    <pre class="prettyprint lang-config">LimitRequestLine 4094</pre>
+
 
     <div class="note">Under normal conditions, the value should not be changed from
-    the default.</div>
+    the default. Also, you can't set this higher than 8190 without
+    modifying the source and rebuilding.</div>
 
     <div class="warning"><h3>Warning</h3>
-    <p> When name-based virtual hosting is used, the value for this 
-    directive is taken from the default (first-listed) virtual host for the
-    <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
+    <p> When name-based virtual hosting is used, the value for this
+    directive is taken from the default (first-listed) virtual host best
+    matching the current IP address and port combination.</p>
     </div>
 
 
@@ -2262,9 +2588,8 @@ from the client</td></tr>
 
     <p>Example:</p>
 
-    <div class="example"><p><code>
-      LimitXMLRequestBody 0
-    </code></p></div>
+    <pre class="prettyprint lang-config">LimitXMLRequestBody 0</pre>
+
 
 
 </div>
@@ -2300,38 +2625,42 @@ URLs</td></tr>
     <ul>
       <li>The specified location matches exactly the path component of the URL.
       </li>
-      <li>The specified location, which ends in a forward slash, is a prefix 
+      <li>The specified location, which ends in a forward slash, is a prefix
       of the path component of the URL (treated as a context root).
       </li>
-      <li>The specified location, with the addition of a trailing slash, is a 
+      <li>The specified location, with the addition of a trailing slash, is a
       prefix of the path component of the URL (also treated as a context root).
       </li>
     </ul>
     <p>
-    In the example below, where no trailing slash is used, requests to 
+    In the example below, where no trailing slash is used, requests to
     /private1, /private1/ and /private1/file.txt will have the enclosed
-    directives applied, but /private1other would not. 
+    directives applied, but /private1other would not.
     </p>
-    <div class="example"><p><code>
-      &lt;Location /private1&gt;
-          ...
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Location /private1&gt;
+    #  ...
+&lt;/Location&gt;
+    </pre>
+
     <p>
-    In the example below, where a trailing slash is used, requests to 
+    In the example below, where a trailing slash is used, requests to
     /private2/ and /private2/file.txt will have the enclosed
-    directives applied, but /private2 and /private2other would not. 
+    directives applied, but /private2 and /private2other would not.
     </p>
-    <div class="example"><p><code>
-      &lt;Location /private2<em>/</em>&gt;
-          ...
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Location /private2<em>/</em>&gt;
+    # ...
+&lt;/Location&gt;
+    </pre>
+
 
     <div class="note"><h3>When to use <code class="directive">&lt;Location&gt;</code></h3>
 
     <p>Use <code class="directive">&lt;Location&gt;</code> to apply
     directives to content that lives outside the filesystem.  For
     content that lives in the filesystem, use <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> and <code class="directive"><a href="#files">&lt;Files&gt;</a></code>.  An exception is
-    <code>&lt;Location /&gt;</code>, which is an easy way to 
+    <code>&lt;Location /&gt;</code>, which is an easy way to
     apply a configuration to the entire server.</p>
     </div>
 
@@ -2347,12 +2676,15 @@ URLs</td></tr>
     characters. Neither wildcard character matches a / in the URL-path.</p>
 
     <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a>
-    can also be used, with the addition of the <code>~</code> 
+    can also be used, with the addition of the <code>~</code>
     character. For example:</p>
 
-    <div class="example"><p><code>
-      &lt;Location ~ "/(extra|special)/data"&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Location ~ "/(extra|special)/data"&gt;
+    #...
+&lt;/Location&gt;
+</pre>
+
 
     <p>would match URLs that contained the substring <code>/extra/data</code>
     or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code> behaves
@@ -2366,14 +2698,13 @@ URLs</td></tr>
     directive. For example, to enable status requests, but allow them
     only from browsers at <code>example.com</code>, you might use:</p>
 
-    <div class="example"><p><code>
-      &lt;Location /status&gt;<br />
-      <span class="indent">
-        SetHandler server-status<br />
-        Require host example.com<br />
-      </span>
-      &lt;/Location&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Location /status&gt;
+  SetHandler server-status
+  Require host example.com
+&lt;/Location&gt;
+    </pre>
+
 
     <div class="note"><h3>Note about / (slash)</h3>
       <p>The slash character has special meaning depending on where in a
@@ -2419,9 +2750,12 @@ matching URLs</td></tr>
     it takes a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
     as an argument instead of a simple string. For example:</p>
 
-    <div class="example"><p><code>
-      &lt;LocationMatch "/(extra|special)/data"&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;LocationMatch "/(extra|special)/data"&gt;
+    # ...
+&lt;/LocationMatch&gt;
+</pre>
+
 
     <p>would match URLs that contained the substring <code>/extra/data</code>
     or <code>/special/data</code>.</p>
@@ -2597,9 +2931,8 @@ matching URLs</td></tr>
 
     <p>For example:</p>
 
-    <div class="example"><p><code>
-      LogLevel notice
-    </code></p></div>
+    <pre class="prettyprint lang-config">LogLevel notice</pre>
+
 
     <div class="note"><h3>Note</h3>
       <p>When logging to a regular file messages of the level
@@ -2616,20 +2949,22 @@ matching URLs</td></tr>
     as module specification. This means the following three specifications
     are equivalent:</p>
 
-    <div class="example"><p><code>
-      LogLevel info ssl:warn<br />
-      LogLevel info mod_ssl.c:warn<br />
-      LogLevel info ssl_module:warn<br />
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+LogLevel info ssl:warn
+LogLevel info mod_ssl.c:warn
+LogLevel info ssl_module:warn
+    </pre>
+
 
     <p>It is also possible to change the level per directory:</p>
 
-    <div class="example"><p><code>
-        LogLevel info<br />
-        &lt;Directory /usr/local/apache/htdocs/app&gt;<br />
-        &nbsp; LogLevel debug<br />
-        &lt;/Files&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+LogLevel info
+&lt;Directory "/usr/local/apache/htdocs/app"&gt;
+  LogLevel debug
+&lt;/Directory&gt;
+    </pre>
+
 
     <div class="note">
         Per directory loglevel configuration only affects messages that are
@@ -2659,9 +2994,110 @@ connection</td></tr>
 
     <p>For example:</p>
 
-    <div class="example"><p><code>
-      MaxKeepAliveRequests 500
-    </code></p></div>
+    <pre class="prettyprint lang-config">MaxKeepAliveRequests 500</pre>
+
+
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of overlapping ranges (eg: <code>100-200,150-300</code>) allowed before returning the complete
+        resource </td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
+</table>
+        <p>The <code class="directive">MaxRangeOverlaps</code> directive
+            limits the number of overlapping HTTP ranges the server is willing to
+            return to the client.  If more overlapping ranges then permitted are requested,
+            the complete resource is returned instead.</p>
+
+        <dl>
+            <dt><strong>default</strong></dt>
+            <dd>Limits the number of overlapping ranges to a compile-time default of 20.</dd>
+
+            <dt><strong>none</strong></dt>
+            <dd>No overlapping Range headers are allowed.</dd>
+
+            <dt><strong>unlimited</strong></dt>
+            <dd>The server does not limit the number of overlapping ranges it is
+                willing to satisfy.</dd>
+
+            <dt><var>number-of-ranges</var></dt>
+            <dd>A positive number representing the maximum number of overlapping ranges the
+                server is willing to satisfy.</dd>
+        </dl>
+    
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of range reversals (eg: <code>100-200,50-70</code>) allowed before returning the complete
+        resource </td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeReversals default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeReversals 20</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
+</table>
+        <p>The <code class="directive">MaxRangeReversals</code> directive
+            limits the number of HTTP Range reversals the server is willing to
+            return to the client.  If more ranges reversals then permitted are requested,
+            the complete resource is returned instead.</p>
+
+        <dl>
+            <dt><strong>default</strong></dt>
+            <dd>Limits the number of range reversals to a compile-time default of 20.</dd>
+
+            <dt><strong>none</strong></dt>
+            <dd>No Range reversals headers are allowed.</dd>
+
+            <dt><strong>unlimited</strong></dt>
+            <dd>The server does not limit the number of range reversals it is
+                willing to satisfy.</dd>
+
+            <dt><var>number-of-ranges</var></dt>
+            <dd>A positive number representing the maximum number of range reversals the
+                server is willing to satisfy.</dd>
+        </dl>
+    
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of ranges allowed before returning the complete
+resource </td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRanges default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRanges 200</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
+</table>
+    <p>The <code class="directive">MaxRanges</code> directive
+    limits the number of HTTP ranges the server is willing to
+    return to the client.  If more ranges then permitted are requested,
+    the complete resource is returned instead.</p>
+
+    <dl>
+      <dt><strong>default</strong></dt>
+      <dd>Limits the number of ranges to a compile-time default of 200.</dd>
+
+      <dt><strong>none</strong></dt>
+      <dd>Range headers are ignored.</dd>
+
+      <dt><strong>unlimited</strong></dt>
+      <dd>The server does not limit the number of ranges it is
+          willing to satisfy.</dd>
+
+      <dt><var>number-of-ranges</var></dt>
+      <dd>A positive number representing the maximum number of ranges the
+      server is willing to satisfy.</dd>
+    </dl>
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -2709,7 +3145,7 @@ or specified mutexes</td></tr>
         <li><code>default | yes</code>
         <p>This selects the default locking implementation, as determined by
         <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a>.  The default locking implementation can
-        be displayed by running <code class="program"><a href="../programs/httpd.html">httpd</a></code> with the 
+        be displayed by running <code class="program"><a href="../programs/httpd.html">httpd</a></code> with the
         <code>-V</code> option.</p></li>
 
         <li><code>none | no</code>
@@ -2730,7 +3166,7 @@ or specified mutexes</td></tr>
         <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
 
         <div class="warning"><h3>Warning</h3>
-        <p>It is possible to "leak" SysV semaphores if processes crash 
+        <p>It is possible to "leak" SysV semaphores if processes crash
         before the semaphore is removed.</p>
        </div>
 
@@ -2765,7 +3201,7 @@ or specified mutexes</td></tr>
         </li>
 
         <li><code>fcntl:/path/to/mutex</code>
-        <p>This is a mutex variant where a physical (lock-)file and the 
+        <p>This is a mutex variant where a physical (lock-)file and the
         <code>fcntl()</code> function are used as the mutex.</p>
 
         <div class="warning"><h3>Warning</h3>
@@ -2787,25 +3223,27 @@ or specified mutexes</td></tr>
         order.</p></li>
     </ul>
 
-    <p>Most mechanisms are only available on selected platforms, where the 
+    <p>Most mechanisms are only available on selected platforms, where the
     underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> support it.  Mechanisms
     which aren't available on all platforms are <em>posixsem</em>,
-    <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>, 
+    <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
     <em>flock</em>, and <em>file</em>.</p>
 
     <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
     the path, if provided, is a directory where the lock file will be created.
-    The default directory is httpd's run-time file directory relative to
-    <code class="directive"><a href="#serverroot">ServerRoot</a></code>.  Always use a local disk
-    filesystem for <code>/path/to/mutex</code> and never a directory residing
+    The default directory is httpd's run-time file directory,
+    <code class="directive"><a href="#defaultruntimedir">DefaultRuntimeDir</a></code>.  If a relative
+    path is provided, it is relative to
+    <code class="directive"><a href="#defaultruntimedir">DefaultRuntimeDir</a></code>.  Always use a local
+    disk filesystem for <code>/path/to/mutex</code> and never a directory residing
     on a NFS- or AFS-filesystem.  The basename of the file will be the mutex
     type, an optional instance string provided by the module, and unless the
-    <code>OmitPID</code> keyword is specified, the process id of the httpd 
+    <code>OmitPID</code> keyword is specified, the process id of the httpd
     parent process will be appended to to make the file name unique, avoiding
     conflicts when multiple httpd instances share a lock file directory.  For
     example, if the mutex name is <code>mpm-accept</code> and the lock file
     directory is <code>/var/httpd/locks</code>, the lock file name for the
-    httpd instance with parent process id 12345 would be 
+    httpd instance with parent process id 12345 would be
     <code>/var/httpd/locks/mpm-accept.12345</code>.</p>
 
     <div class="warning"><h3>Security</h3>
@@ -2879,16 +3317,17 @@ or specified mutexes</td></tr>
     <code>/var/httpd/locks</code>.  The mutex mechanism for all other mutexes
     will be changed from the compiled-in default to <code>sysvsem</code>.</p>
 
-    <div class="example"><p><code>
-    Mutex default sysvsem<br />
-    Mutex mpm-accept fcntl:/var/httpd/locks
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+Mutex sysvsem default
+Mutex fcntl:/var/httpd/locks mpm-accept
+    </pre>
+
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
 <table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Designates an IP address for name-virtual
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>DEPRECATED: Designates an IP address for name-virtual
 hosting</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
@@ -2896,80 +3335,13 @@ hosting</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
 </table>
 
-<p>A single <code class="directive">NameVirtualHost</code> directive 
-identifies a set of identical virtual hosts on which the server will  
-further select from on the basis of the <em>hostname</em> 
-requested by the client.  The <code class="directive">NameVirtualHost</code>
-directive is a required directive if you want to configure 
-<a href="../vhosts/">name-based virtual hosts</a>.</p>
-
-<p>This directive, and the corresponding <code class="directive">VirtualHost</code>,
-<em>must</em> be qualified with a port number if the server supports both HTTP 
-and HTTPS connections.</p>
-
-<p>Although <var>addr</var> can be a hostname, it is recommended
-that you always use an IP address or a wildcard.  A wildcard
-NameVirtualHost matches only virtualhosts that also have a literal wildcard
-as their argument.</p>
-
-<p>In cases where a firewall or other proxy receives the requests and 
-forwards them on a different IP address to the server, you must specify the
-IP address of the physical interface on the machine which will be
-servicing the requests. </p>
-
-<p> In the example below, requests received on interface 192.0.2.1 and port 80 
-will only select among the first two virtual hosts. Requests received on
-port 80 on any other interface will only select among the third and fourth
-virtual hosts. In the common case where the interface isn't important 
-to the mapping, only the "*:80" NameVirtualHost and VirtualHost directives 
-are necessary.</p>
-
-   <div class="example"><p><code>
-      NameVirtualHost 192.0.2.1:80<br />
-      NameVirtualHost *:80<br /><br />
-
-      &lt;VirtualHost 192.0.2.1:80&gt;<br />
-      &nbsp; ServerName namebased-a.example.com<br />
-      &lt;/VirtualHost&gt;<br />
-      <br />
-      &lt;VirtualHost 192.0.2.1:80&gt;<br />
-      &nbsp; Servername namebased-b.example.com<br />
-      &lt;/VirtualHost&gt;<br />
-      <br />
-      &lt;VirtualHost *:80&gt;<br />
-      &nbsp; ServerName namebased-c.example.com <br />
-      &lt;/VirtualHost&gt;<br />
-      <br />
-      &lt;VirtualHost *:80&gt;<br />
-      &nbsp; ServerName namebased-d.example.com <br />
-      &lt;/VirtualHost&gt;<br />
-      <br />
-
-    </code></p></div>
-
-    <p>If no matching virtual host is found, then the first listed
-    virtual host that matches the IP address and port will be used.</p>
-
-
-    <p>IPv6 addresses must be enclosed in square brackets, as shown
-    in the following example:</p>
-
-    <div class="example"><p><code>
-      NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
-    </code></p></div>
-
-    <div class="note"><h3>Argument to <code class="directive">&lt;VirtualHost&gt;</code>
-      directive</h3>
-      <p>Note that the argument to the <code class="directive">&lt;VirtualHost&gt;</code> directive must
-      exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
+<p>Prior to 2.3.11, <code class="directive">NameVirtualHost</code> was required
+to instruct the server that a particular IP address and port combination
+was usable as a name-based virtual host.  In 2.3.11 and later,
+any time an IP address and port combination is used in multiple virtual
+hosts, name-based virtual hosting is automatically enabled for that address.</p>
 
-      <div class="example"><p><code>
-        NameVirtualHost 192.0.2.2:80<br />
-        &lt;VirtualHost 192.0.2.2:80&gt;<br />
-        # ...<br />
-        &lt;/VirtualHost&gt;<br />
-      </code></p></div>
-    </div>
+<p>This directive currently has no effect.</p>
 
 <h3>See also</h3>
 <ul>
@@ -2984,11 +3356,12 @@ documentation</a></li>
 directory</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
     [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
-<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options FollowSymLinks</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options FollowSymlinks</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The default was changed from All to FollowSymlinks in 2.3.11</td></tr>
 </table>
     <p>The <code class="directive">Options</code> directive controls which
     server features are available in a particular directory.</p>
@@ -3000,8 +3373,7 @@ directory</td></tr>
     <dl>
       <dt><code>All</code></dt>
 
-      <dd>All options except for <code>MultiViews</code>. This is the default
-      setting.</dd>
+      <dd>All options except for <code>MultiViews</code>.</dd>
 
       <dt><code>ExecCGI</code></dt>
 
@@ -3012,14 +3384,16 @@ directory</td></tr>
       <dt><code>FollowSymLinks</code></dt>
 
       <dd>
-
-      The server will follow symbolic links in this directory.
+      The server will follow symbolic links in this directory. This is
+      the default setting.
       <div class="note">
       <p>Even though the server follows the symlink it does <em>not</em>
       change the pathname used to match against <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections.</p>
-      <p>Note also, that this option <strong>gets ignored</strong> if set
-      inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
-      section.</p>
+
+      <p>The <code>FollowSymLinks</code> and
+      <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections or
+      <code>.htaccess</code> files.</p>
+
       <p>Omitting this option should not be considered a security restriction,
       since symlink testing is subject to race conditions that make it
       circumventable.</p>
@@ -3067,12 +3441,15 @@ directory</td></tr>
       target file or directory is owned by the same user id as the
       link.
 
-      <div class="note"><h3>Note</h3> <p>This option gets ignored if
-      set inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code> section.</p>
+      <div class="note"><h3>Note</h3>
+      <p>The <code>FollowSymLinks</code> and
+      <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections or
+      <code>.htaccess</code> files.</p>
+
       <p>This option should not be considered a security restriction,
       since symlink testing is subject to race conditions that make it
-      circumventable.</p></div>
-      </dd>
+      circumventable.</p>
+      </div> </dd>
     </dl>
 
     <p>Normally, if multiple <code class="directive">Options</code> could
@@ -3086,46 +3463,40 @@ directory</td></tr>
     <code>-</code> are removed from the options currently in
     force. </p>
 
-    <div class="warning"><h3>Warning</h3>
+    <div class="note"><h3>Note</h3>
     <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
-    <code>-</code> with those without is not valid syntax, and is likely
-    to cause unexpected results.</p>
+    <code>-</code> with those without is not valid syntax, and will be
+    rejected during server startup by the syntax check with an abort.</p>
     </div>
 
     <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /web/docs&gt;<br />
-      <span class="indent">
-        Options Indexes FollowSymLinks<br />
-      </span>
-      &lt;/Directory&gt;<br />
-      <br />
-      &lt;Directory /web/docs/spec&gt;<br />
-      <span class="indent">
-        Options Includes<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory "/web/docs"&gt;
+  Options Indexes FollowSymLinks
+&lt;/Directory&gt;
+
+&lt;Directory "/web/docs/spec"&gt;
+  Options Includes
+&lt;/Directory&gt;
+    </pre>
+
 
     <p>then only <code>Includes</code> will be set for the
     <code>/web/docs/spec</code> directory. However if the second
     <code class="directive">Options</code> directive uses the <code>+</code> and
     <code>-</code> symbols:</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /web/docs&gt;<br />
-      <span class="indent">
-        Options Indexes FollowSymLinks<br />
-      </span>
-      &lt;/Directory&gt;<br />
-      <br />
-      &lt;Directory /web/docs/spec&gt;<br />
-      <span class="indent">
-        Options +Includes -Indexes<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory "/web/docs"&gt;
+  Options Indexes FollowSymLinks
+&lt;/Directory&gt;
+
+&lt;Directory "/web/docs/spec"&gt;
+  Options +Includes -Indexes
+&lt;/Directory&gt;
+    </pre>
+
 
     <p>then the options <code>FollowSymLinks</code> and
     <code>Includes</code> are set for the <code>/web/docs/spec</code>
@@ -3138,7 +3509,7 @@ directory</td></tr>
     </div>
 
     <p>The default in the absence of any other settings is
-    <code>All</code>.</p>
+    <code>FollowSymlinks</code>.</p>
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -3161,17 +3532,33 @@ On Windows from Apache 2.3.3 and later.</td></tr>
 
     <p>For example, if you are running <code>https</code> on a non-standard port, specify the protocol explicitly:</p>
 
-    <div class="example"><p><code>
-      Protocol https
-    </code></p></div>
+    <pre class="prettyprint lang-config">Protocol https</pre>
+
 
     <p>You can also specify the protocol using the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive.</p>
 
 <h3>See also</h3>
 <ul>
-<li><code class="directive">AcceptFilter</code></li>
+<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li>
 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
 </ul>
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a> <a name="registerhttpmethod" id="registerhttpmethod">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Register non-standard HTTP methods</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
+</table>
+<p>HTTP Methods that are not conforming to the relvant RFCs are normally
+rejected by request processing in Apache HTTPD. To avoid this, modules
+can register non-standard HTTP methods they support.
+The <code class="directive">RegisterHttpMethod</code> allows to register such
+methods manually. This can be useful for if such methods are forwared
+for external processing, e.g. to a CGI script.</p>
+
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
@@ -3310,15 +3697,13 @@ later</td></tr>
     by the shebang line (first line, starting with <code>#!</code>) in the
     script. On Win32 systems this line usually looks like:</p>
 
-    <div class="example"><p><code>
-      #!C:/Perl/bin/perl.exe
-    </code></p></div>
+    <pre class="prettyprint lang-perl">#!C:/Perl/bin/perl.exe</pre>
+
 
     <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
 
-    <div class="example"><p><code>
-      #!perl
-    </code></p></div>
+    <pre class="prettyprint lang-perl">#!perl</pre>
+
 
     <p>Setting <code>ScriptInterpreterSource Registry</code> will
     cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
@@ -3365,7 +3750,7 @@ of a request or the last 63, assuming the request itself is greater than
 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.2.7 and later.</td></tr>
 </table>
     <p>mod_status with <code>ExtendedStatus On</code>
-    displays the actual request being handled. 
+    displays the actual request being handled.
     For historical purposes, only 63 characters of the request
     are actually stored for display purposes. This directive
     controls whether the 1st 63 characters are stored (the previous
@@ -3412,9 +3797,8 @@ messages sent to the client</td></tr>
 
     <p>It may be worth setting up a dedicated address for this, e.g.</p>
 
-    <div class="example"><p><code>
-      ServerAdmin www-admin@foo.example.com
-    </code></p></div>
+    <pre class="prettyprint lang-config">ServerAdmin www-admin@foo.example.com</pre>
+
     <p>as users do not always mention that they are talking about the
     server!</p>
 
@@ -3433,15 +3817,25 @@ to name-virtual hosts</td></tr>
     alternate names for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>. The
     <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
 
-    <div class="example"><p><code>
-      &lt;VirtualHost *:80&gt;<br />
-      ServerName server.example.com<br />
-      ServerAlias server server2.example.com server2<br />
-      ServerAlias *.example.com<br />
-      UseCanonicalName Off<br />
-      # ...<br />
-      &lt;/VirtualHost&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;VirtualHost *:80&gt;
+  ServerName server.example.com
+  ServerAlias server server2.example.com server2
+  ServerAlias *.example.com
+  UseCanonicalName Off
+  # ...
+&lt;/VirtualHost&gt;
+    </pre>
+
+
+    <p>Name-based virtual hosts for the best-matching set of  <code class="directive"><a href="#virtualhost">&lt;virtualhost&gt;</a></code>s are processed
+    in the order they appear in the configuration.  The first matching <code class="directive"><a href="#servername">ServerName</a></code> or <code class="directive"><a href="#serveralias">ServerAlias</a></code> is used, with no different precedence for wildcards
+    (nor for ServerName vs. ServerAlias).  </p>
+
+    <p>The complete list of names in the <code class="directive">VirtualHost</code>
+    directive are treated just like a (non wildcard) 
+    <code class="directive">ServerAlias</code>.</p>
+
 
 <h3>See also</h3>
 <ul>
@@ -3467,16 +3861,15 @@ itself</td></tr>
     <p>Additionally, <code class="directive">ServerName</code> is used (possibly
     in conjunction with <code class="directive">ServerAlias</code>) to uniquely
     identify a virtual host, when using <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p>
-    
+
     <p>For example, if the name of the
     machine hosting the web server is <code>simple.example.com</code>,
     but the machine also has the DNS alias <code>www.example.com</code>
     and you wish the web server to be so identified, the following
     directive should be used:</p>
 
-    <div class="example"><p><code>
-      ServerName www.example.com:80
-    </code></p></div>
+    <pre class="prettyprint lang-config">ServerName www.example.com</pre>
+
 
     <p>The <code class="directive">ServerName</code> directive
     may appear anywhere within the definition of a server. However,
@@ -3503,7 +3896,7 @@ itself</td></tr>
     <code>https://</code> scheme and the port number to which the
     clients connect in the <code class="directive">ServerName</code> directive
     to make sure that the server generates the correct
-    self-referential URLs. 
+    self-referential URLs.
     </p>
 
     <p>See the description of the
@@ -3534,7 +3927,6 @@ itself</td></tr>
     documentation</a></li>
 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
-<li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li>
 <li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
 </ul>
 </div>
@@ -3569,12 +3961,17 @@ is accessed by an incompatible browser</td></tr>
     <p>The <code class="directive">ServerRoot</code> directive sets the
     directory in which the server lives. Typically it will contain the
     subdirectories <code>conf/</code> and <code>logs/</code>. Relative
-    paths in other configuration directives (such as <code class="directive"><a href="#include">Include</a></code> or <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>, for example) are taken as 
+    paths in other configuration directives (such as <code class="directive"><a href="#include">Include</a></code> or <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>, for example) are taken as
     relative to this directory.</p>
 
-    <div class="example"><h3>Example</h3><p><code>
-      ServerRoot /home/httpd
-    </code></p></div>
+    <pre class="prettyprint lang-config">ServerRoot "/home/httpd"</pre>
+
+
+    <p>The default location of <code class="directive">ServerRoot</code> may be
+    modified by using the <code>--prefix</code> argument to
+    <a href="../programs/configure.html"><code>configure</code></a>, and
+    most third-party distributions of the server have a different
+    default location from the one listed above.</p>
 
 
 <h3>See also</h3>
@@ -3641,7 +4038,7 @@ header</td></tr>
     <dl>
       <dt><code>ServerTokens Full</code> (or not specified)</dt>
 
-      <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
+      <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
       (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
 
       <dt><code>ServerTokens Prod[uctOnly]</code></dt>
@@ -3662,11 +4059,11 @@ header</td></tr>
       <dt><code>ServerTokens Min[imal]</code></dt>
 
       <dd>Server sends (<em>e.g.</em>): <code>Server:
-      Apache/2.4.1</code></dd>
+      Apache/2.4.2</code></dd>
 
       <dt><code>ServerTokens OS</code></dt>
 
-      <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
+      <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
       (Unix)</code></dd>
 
     </dl>
@@ -3676,7 +4073,7 @@ header</td></tr>
 
     <p>After version 2.0.44, this directive also controls the
     information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
-    
+
     <div class="note">Setting <code class="directive">ServerTokens</code> to less than
     <code>minimal</code> is not recommended because it makes it more
     difficult to debug interoperational problems. Also note that
@@ -3712,28 +4109,38 @@ handler</td></tr>
     of extension, you might put the following into an
     <code>.htaccess</code> file in that directory:</p>
 
-    <div class="example"><p><code>
-      SetHandler imap-file
-    </code></p></div>
+    <pre class="prettyprint lang-config">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 <code>httpd.conf</code>:</p>
 
-    <div class="example"><p><code>
-      &lt;Location /status&gt;<br />
-      <span class="indent">
-        SetHandler server-status<br />
-      </span>
-      &lt;/Location&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Location "/status"&gt;
+  SetHandler server-status
+&lt;/Location&gt;
+    </pre>
+
+
+    <p>You could also use this directive to configure a particular
+    handler for files with a particular file extension. For example:</p>
+
+    <pre class="prettyprint lang-config">
+&lt;FilesMatch \.php$&gt;
+    SetHandler application/x-httpd-php
+&lt;/FilesMatch&gt;
+    </pre>
+
 
     <p>You can override an earlier defined <code class="directive">SetHandler</code>
     directive by using the value <code>None</code>.</p>
-    <p><strong>Note:</strong> because SetHandler overrides default handlers,
-    normal behaviour such as handling of URLs ending in a slash (/) as
-    directories or index files is suppressed.</p>
+
+    <div class="note"><h3>Note</h3>
+    <p>Because <code class="directive">SetHandler</code> overrides default handlers,
+    normal behavior such as handling of URLs ending in a slash (/) as
+    directories or index files is suppressed.</p></div>
 
 <h3>See also</h3>
 <ul>
@@ -3789,13 +4196,12 @@ server</td></tr>
     in the <code>/www/data/</code> directory for server-side
     includes.</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /www/data/&gt;<br />
-      <span class="indent">
-        SetOutputFilter INCLUDES<br />
-      </span>
-      &lt;/Directory&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;Directory "/www/data/"&gt;
+  SetOutputFilter INCLUDES
+&lt;/Directory&gt;
+    </pre>
+
 
     <p>If more than one filter is specified, they must be separated
     by semicolons in the order in which they should process the
@@ -3812,7 +4218,7 @@ server</td></tr>
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for
 certain events before failing a request</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
-<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 300</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 60</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
@@ -3845,10 +4251,10 @@ certain events before failing a request</td></tr>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
 <table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behaviour on <code>TRACE</code> requests</td></tr>
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behavior on <code>TRACE</code> requests</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr>
-<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 1.3.34, 2.0.55 and later</td></tr>
@@ -3862,13 +4268,20 @@ certain events before failing a request</td></tr>
     allowed) error to the client.</p>
 
     <p>Finally, for testing and diagnostic purposes only, request
-    bodies may be allowed using the non-compliant <code>TraceEnable 
+    bodies may be allowed using the non-compliant <code>TraceEnable
     extended</code> directive.  The core (as an origin server) will
     restrict the request body to 64k (plus 8k for chunk headers if
     <code>Transfer-Encoding: chunked</code> is used).  The core will
     reflect the full headers and all chunk headers with the response
     body.  As a proxy server, the request body is not restricted to 64k.</p>
 
+    <div class="note"><h3>Note</h3>
+    <p>Despite claims to the contrary, <code>TRACE</code> is not
+    a security vulnerability and there is no viable reason for
+    it to be disabled. Doing so necessarily makes your server
+    non-compliant.</p>
+    </div>
+
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Directive</a></h2>
@@ -3922,8 +4335,8 @@ port</td></tr>
     <code>http://www.example.com/splat/</code>. If you have
     authentication enabled, this will cause the user to have to
     authenticate twice (once for <code>www</code> and once again
-    for <code>www.example.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
-    FAQ on this subject for more information</a>). But if
+    for <code>www.example.com</code> -- see <a href="http://wiki.apache.org/httpd/FAQ#Why_does_Apache_ask_for_my_password_twice_before_serving_a_file.3F">
+    the FAQ on this subject for more information</a>). But if
     <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
     Apache httpd will redirect to <code>http://www/splat/</code>.</p>
 
@@ -3952,8 +4365,7 @@ port</td></tr>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2>
 <table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
-port</td></tr>
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own port</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
@@ -3971,21 +4383,28 @@ port</td></tr>
     relying on all configured information to construct a valid port number.</p>
 
     <div class="note"><h3>Note</h3>
-    <p>The ordering of when the physical port is used is as follows:<br /><br />
-     <code>UseCanonicalName On</code></p>
-     <ul>
-      <li>Port provided in <code>Servername</code></li>
+    <p>The ordering of the lookup when the physical port is used is as
+    follows:</p>
+     <dl>
+     <dt><code>UseCanonicalName On</code></dt>
+     <dd>
+     <ol>
+      <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li>
       <li>Physical port</li>
       <li>Default port</li>
-     </ul>
-     <code>UseCanonicalName Off | DNS</code>
-     <ul>
+     </ol>
+     </dd>
+     <dt><code>UseCanonicalName Off | DNS</code></dt>
+     <dd>
+     <ol>
       <li>Parsed port from <code>Host:</code> header</li>
       <li>Physical port</li>
-      <li>Port provided in <code>Servername</code></li>
+      <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li>
       <li>Default port</li>
-     </ul>
-    
+     </ol>
+     </dd>
+     </dl>
+
     <p>With <code>UseCanonicalPhysicalPort Off</code>, the
     physical ports are removed from the ordering.</p>
     </div>
@@ -4017,7 +4436,8 @@ hostname or IP address</td></tr>
     used. When the server receives a request for a document on a
     particular virtual host, it uses the configuration directives
     enclosed in the <code class="directive">&lt;VirtualHost&gt;</code>
-    section. <var>Addr</var> can be:</p>
+    section. <var>Addr</var> can be any of the following, optionally followed by
+    a colon and a port number (or *):</p>
 
     <ul>
       <li>The IP address of the virtual host;</li>
@@ -4025,41 +4445,39 @@ hostname or IP address</td></tr>
       <li>A fully qualified domain name for the IP address of the
       virtual host (not recommended);</li>
 
-      <li>The character <code>*</code>, which is used only in combination with
-      <code>NameVirtualHost *</code> to match all IP addresses; or</li>
+      <li>The character <code>*</code>, which acts as a wildcard and matches
+      any IP address.</li>
+
+      <li>The string <code>_default_</code>, which is an alias for <code>*</code></li>
 
-      <li>The string <code>_default_</code>, which is used only
-      with IP virtual hosting to catch unmatched IP addresses.</li>
     </ul>
 
-    <div class="example"><h3>Example</h3><p><code>
-      &lt;VirtualHost 10.1.2.3&gt;<br />
-      <span class="indent">
-        ServerAdmin webmaster@host.example.com<br />
-        DocumentRoot /www/docs/host.example.com<br />
-        ServerName host.example.com<br />
-        ErrorLog logs/host.example.com-error_log<br />
-        TransferLog logs/host.example.com-access_log<br />
-      </span>
-      &lt;/VirtualHost&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;VirtualHost 10.1.2.3:80&gt;
+  ServerAdmin webmaster@host.example.com
+  DocumentRoot /www/docs/host.example.com
+  ServerName host.example.com
+  ErrorLog logs/host.example.com-error_log
+  TransferLog logs/host.example.com-access_log
+&lt;/VirtualHost&gt;
+    </pre>
+
 
 
     <p>IPv6 addresses must be specified in square brackets because
     the optional port number could not be determined otherwise.  An
     IPv6 example is shown below:</p>
 
-    <div class="example"><p><code>
-      &lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]&gt;<br />
-      <span class="indent">
-        ServerAdmin webmaster@host.example.com<br />
-        DocumentRoot /www/docs/host.example.com<br />
-        ServerName host.example.com<br />
-        ErrorLog logs/host.example.com-error_log<br />
-        TransferLog logs/host.example.com-access_log<br />
-      </span>
-      &lt;/VirtualHost&gt;
-    </code></p></div>
+    <pre class="prettyprint lang-config">
+&lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80&gt;
+  ServerAdmin webmaster@host.example.com
+  DocumentRoot /www/docs/host.example.com
+  ServerName host.example.com
+  ErrorLog logs/host.example.com-error_log
+  TransferLog logs/host.example.com-access_log
+&lt;/VirtualHost&gt;
+    </pre>
+
 
     <p>Each Virtual Host must correspond to a different IP address,
     different port number or a different host name for the server,
@@ -4076,30 +4494,24 @@ hostname or IP address</td></tr>
     using <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p>
     </div>
 
-    <p>When using IP-based virtual hosting, 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 <code>_default_</code> virtual host the "main" server config,
-    consisting of all those definitions outside any VirtualHost
-    section, is used when no IP-match occurs.</p>
-
-    <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 class="directive"><a href="../mod/mpm_common.html#listen">Listen</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>
-
     <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
     specified inside each <code class="directive">&lt;VirtualHost&gt;</code> block. If it is absent, the
     <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
     server configuration will be inherited.</p>
 
-    <p>If no matching virtual host is found, then the first listed
-    virtual host that matches the IP address will be used.  As a
-    consequence, the first listed virtual host is the default virtual
-    host.</p>
+    <p>When a request is received, the server first maps it to the best matching
+    <code class="directive">&lt;VirtualHost&gt;</code> based on the local
+    IP address and port combination only.  Non-wildcards have a higher
+    precedence. If no match based on IP and port occurs at all, the
+    "main" server configuration is used.</p>
+
+    <p>If multiple virtual hosts contain the best matching IP address and port,
+    the server selects from these virtual hosts the best match based on the
+    requested hostname.  If no matching name-based virtual host is found,
+    then the first listed virtual host that matched the IP address will be
+    used.  As a consequence, the first listed virtual host for a given IP address
+    and port combination is default virtual host for that IP and port
+    combination.</p>
 
     <div class="warning"><h3>Security</h3>
     <p>See the <a href="../misc/security_tips.html">security tips</a>
@@ -4128,7 +4540,28 @@ hostname or IP address</td></tr>
 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
-</div><div id="footer">
-<p class="apache">Copyright 2010 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
-<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
+</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
+<script type="text/javascript"><!--//--><![CDATA[//><!--
+var comments_shortname = 'httpd';
+var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/core.html';
+(function(w, d) {
+    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
+        d.write('<div id="comments_thread"><\/div>');
+        var s = d.createElement('script');
+        s.type = 'text/javascript';
+        s.async = true;
+        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
+        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
+    }
+    else {
+        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
+    }
+})(window, document);
+//--><!]]></script></div><div id="footer">
+<p class="apache">Copyright 2012 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
+<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
+if (typeof(prettyPrint) !== 'undefined') {
+    prettyPrint();
+}
+//--><!]]></script>
 </body></html>
\ No newline at end of file