core.html.en revision e2c56835b9788101b569d70661151ba7bb0ea2d6
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0" encoding="ISO-8859-1"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
e942c741056732f50da2074b36fe59805d370650slive<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd This file is generated from xml source: DO NOT EDIT
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding -->
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<title>core - Apache HTTP Server</title>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<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" />
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<script src="/style/scripts/prettify.js" type="text/javascript">
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd</script>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<body>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<div id="page-header">
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<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>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<p class="apache">Apache HTTP Server Version 2.5</p>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<img alt="" src="/images/feather.gif" /></div>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<div id="path">
7db9f691a00ead175b03335457ca296a33ddf31bnd<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div id="page-content">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div id="preamble"><h1>Apache Core Features</h1>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="toplang">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<p><span>Available Languages: </span><a href="/de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
530eba85dbd41b8a0fa5255d3648d1440199a661slive<a href="/en/mod/core.html" title="English">&nbsp;en&nbsp;</a> |
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<a href="/es/mod/core.html" hreflang="es" rel="alternate" title="Espa�ol">&nbsp;es&nbsp;</a> |
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<a href="/fr/mod/core.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<a href="/ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<a href="/tr/mod/core.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</div>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are always
158222078a98fb13cddf2793b42f7eb8eafe51aerjungavailable</td></tr>
158222078a98fb13cddf2793b42f7eb8eafe51aerjung<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</div>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<div id="quickview"><h3 class="directives">Directives</h3>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<ul id="toc">
31127de9133204b2f09f6226250592ed93b61023rbowen<li><img alt="" src="/images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<li><img alt="" src="/images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<li><img alt="" src="/images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<li><img alt="" src="/images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#define">Define</a></li>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<li><img alt="" src="/images/down.gif" /> <a href="#directory">&lt;Directory&gt;</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#directorymatch">&lt;DirectoryMatch&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier<li><img alt="" src="/images/down.gif" /> <a href="#else">&lt;Else&gt;</a></li>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier<li><img alt="" src="/images/down.gif" /> <a href="#elseif">&lt;ElseIf&gt;</a></li>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier<li><img alt="" src="/images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier<li><img alt="" src="/images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier<li><img alt="" src="/images/down.gif" /> <a href="#error">Error</a></li>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier<li><img alt="" src="/images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#fileetag">FileETag</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#files">&lt;Files&gt;</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#filesmatch">&lt;FilesMatch&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#forcetype">ForceType</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#gprofdir">GprofDir</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#if">&lt;If&gt;</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#ifdefine">&lt;IfDefine&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#ifmodule">&lt;IfModule&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#include">Include</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#limit">&lt;Limit&gt;</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#limitexcept">&lt;LimitExcept&gt;</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#location">&lt;Location&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#locationmatch">&lt;LocationMatch&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#maxranges">MaxRanges</a></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><img alt="" src="/images/down.gif" /> <a href="#mutex">Mutex</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#options">Options</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#protocol">Protocol</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#servername">ServerName</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<li><img alt="" src="/images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<li><img alt="" src="/images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#timeout">TimeOut</a></li>
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh<li><img alt="" src="/images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#undefine">UnDefine</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#virtualhost">&lt;VirtualHost&gt;</a></li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures optimizations for a Protocol's Listener Sockets</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.1.5 and later.
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveOn Windows from Apache httpd 2.3.3 and later.</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive enables operating system specific optimizations for a
fb77c505254b6e9c925e23e734463e87574f8f40kess listening socket by the <code class="directive">Protocol</code>type.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The basic premise is for the kernel to not send a socket to the server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process until either data is received or an entire HTTP Request is buffered.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Only <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FreeBSD's Accept Filters</a>, Linux's more primitive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive are currently supported.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Using <code>none</code> for an argument will disable any accept filters
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for that protocol. This is useful for protocols that require a server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
fb77c505254b6e9c925e23e734463e87574f8f40kess AcceptFilter nntp none
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default protocol names are <code>https</code> for port 443
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code>http</code> for all other ports. To specify another protocol
fb77c505254b6e9c925e23e734463e87574f8f40kess is being used with a listening port, add the <var>protocol</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive argument to the <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The default values on FreeBSD are:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAcceptFilter http httpready
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAcceptFilter https dataready
fb77c505254b6e9c925e23e734463e87574f8f40kess </pre>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
fb77c505254b6e9c925e23e734463e87574f8f40kess the kernel level. Once an entire request is received, the kernel then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sends it to the server. See the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accf_http(9)</a> man page for more details. Since HTTPS requests are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">
fb77c505254b6e9c925e23e734463e87574f8f40kess accf_data(9)</a> filter is used.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default values on Linux are:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <pre class="prettyprint lang-config">
fb77c505254b6e9c925e23e734463e87574f8f40kessAcceptFilter http data
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAcceptFilter https data
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </pre>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh requests. Any value besides <code>none</code> will enable
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
2aa51ed61adb484602e94de3d2214ec267aecedbigalic see the Linux
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd tcp(7)</a> man page.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default values on Windows are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAcceptFilter http data
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAcceptFilter https data
003f0c9fda6664daf5092a0e42f65ede20098153slive </pre>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive API, and does not support http protocol buffering. There are two values
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which utilize the Windows AcceptEx() API and will recycle network
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sockets between connections. <code>data</code> waits until data has
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess been transmitted as documented above, and the initial data buffer and
003f0c9fda6664daf5092a0e42f65ede20098153slive network endpoint addresses are all retrieved from the single AcceptEx()
003f0c9fda6664daf5092a0e42f65ede20098153slive invocation. <code>connect</code> will use the AcceptEx() API, also
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess retrieve the network endpoint addresses, but like <code>none</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the <code>connect</code> option does not wait for the initial data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive transmission.</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>On Windows, <code>none</code> uses accept() rather than AcceptEx()
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and will not recycle sockets between connections. This is useful for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive network adapters with broken driver support, as well as some virtual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive network providers such as vpn drivers, or spam, virus or spyware
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filters.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<h3>See also</h3>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<ul>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<li><code class="directive"><a href="#protocol">Protocol</a></code></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</ul>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Resources accept trailing pathname information</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.0.30 and later</td></tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether requests that contain trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pathname information that follows an actual filename (or
003f0c9fda6664daf5092a0e42f65ede20098153slive non-existent file in an existing directory) will be accepted or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rejected. The trailing pathname information can be made
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive available to scripts in the <code>PATH_INFO</code> environment
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding variable.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>For example, assume the location <code>/test/</code> points to
684f2a9a422185adda0692a1203c5ad6687fc5c5nd a directory that contains only the single file
a8ce9095d102e43fecb81093a132b90b9a227f78kess <code>here.html</code>. Then requests for
684f2a9a422185adda0692a1203c5ad6687fc5c5nd <code>/test/here.html/more</code> and
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>/test/nothere.html/more</code> both collect
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>/more</code> as <code>PATH_INFO</code>.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>The three possible arguments for the
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code class="directive">AcceptPathInfo</code> directive are:</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <dl>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <dt><code>Off</code></dt><dd>A request will only be accepted if it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive maps to a literal path that exists. Therefore a request with
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh trailing pathname information after the true filename such as
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>/test/here.html/more</code> in the above example will return
684f2a9a422185adda0692a1203c5ad6687fc5c5nd a 404 NOT FOUND error.</dd>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <dt><code>On</code></dt><dd>A request will be accepted if a
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding leading path component maps to a file that exists. The above
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding example <code>/test/here.html/more</code> will be accepted if
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>/test/here.html</code> maps to a valid file.</dd>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <dt><code>Default</code></dt><dd>The treatment of requests with
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding trailing pathname information is determined by the <a href="/handler.html">handler</a> responsible for the request.
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding The core handler for normal files defaults to rejecting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a href="mod_cgi.html">cgi-script</a> and <a href="mod_isapi.html">isapi-handler</a>, generally accept
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>PATH_INFO</code> by default.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The primary purpose of the <code>AcceptPathInfo</code>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd directive is to allow you to override the handler's choice of
9583adab6bc4b3758e41963c905d9dad9f067131nd accepting or rejecting <code>PATH_INFO</code>. This override is required,
77ead9e0262e4f08ec336d1a65b2edef7705c839nd for example, when you use a <a href="/filter.html">filter</a>, such
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier as <a href="mod_include.html">INCLUDES</a>, to generate content
77ead9e0262e4f08ec336d1a65b2edef7705c839nd based on <code>PATH_INFO</code>. The core handler would usually reject
77ead9e0262e4f08ec336d1a65b2edef7705c839nd the request, so you can use the following configuration to enable
77ead9e0262e4f08ec336d1a65b2edef7705c839nd such a script:</p>
158222078a98fb13cddf2793b42f7eb8eafe51aerjung
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <pre class="prettyprint lang-config">
77ead9e0262e4f08ec336d1a65b2edef7705c839nd&lt;Files "mypaths.shtml"&gt;
77ead9e0262e4f08ec336d1a65b2edef7705c839nd Options +Includes
77ead9e0262e4f08ec336d1a65b2edef7705c839nd SetOutputFilter INCLUDES
77ead9e0262e4f08ec336d1a65b2edef7705c839nd AcceptPathInfo On
77ead9e0262e4f08ec336d1a65b2edef7705c839nd&lt;/Files&gt;
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier </pre>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier</div>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directive</a></h2>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<table class="directive">
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the distributed configuration file</td></tr>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</table>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>While processing a request the server looks for
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier the first existing configuration file from this list of names in
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier every directory of the path to the document, if distributed
77ead9e0262e4f08ec336d1a65b2edef7705c839nd configuration files are <a href="#allowoverride">enabled for that
77ead9e0262e4f08ec336d1a65b2edef7705c839nd directory</a>. For example:</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <pre class="prettyprint lang-config">AccessFileName .acl</pre>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>before returning the document
003f0c9fda6664daf5092a0e42f65ede20098153slive <code>/usr/local/web/index.html</code>, the server will read
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>/.acl</code>, <code>/usr/.acl</code>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd for directives, unless they have been disabled with</p>
4ea161d94782fa56f4b36d496f35ff8577c43065covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory /&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None
fb77c505254b6e9c925e23e734463e87574f8f40kess&lt;/Directory&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess </pre>
fb77c505254b6e9c925e23e734463e87574f8f40kess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<ul>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/configuring.html">Configuration Files</a></li>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd</ul>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd</div>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directive</a></h2>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<table class="directive">
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default charset parameter to be added when a response
113961f0559eb026ea0d379cb7350f82bc09d710druggericontent-type is <code>text/plain</code> or <code>text/html</code></td></tr>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive specifies a default value for the media type
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive charset parameter (the name of a character encoding) to be added
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to a response if and only if the response's content-type is either
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>text/plain</code> or <code>text/html</code>. This should override
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any charset specified in the body of the response via a <code>META</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive element, though the exact behavior is often dependent on the user's client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. A setting of <code>AddDefaultCharset Off</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive disables this functionality. <code>AddDefaultCharset On</code> enables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a default charset of <code>iso-8859-1</code>. Any other value is assumed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to be the <var>charset</var> to be used, which should be one of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="http://www.iana.org/assignments/character-sets">IANA registered
0834a50e694f91f4bf20ddf030fd0812e65cafc7rbowen charset values</a> for use in Internet media types (MIME types).
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz For example:</p>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl <pre class="prettyprint lang-config">AddDefaultCharset utf-8</pre>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl <p><code class="directive">AddDefaultCharset</code> should only be used when all
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the text resources to which it applies are known to be in that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive character encoding and it is too inconvenient to label their charset
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive individually. One such example is to add the charset parameter
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to resources containing generated content, such as legacy CGI
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding scripts, that might be vulnerable to cross-site scripting attacks
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding due to user-provided data being included in the output. Note, however,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding that a better solution is to just fix (or delete) those scripts, since
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding setting a default charset does not protect users that have enabled
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding the "auto-detect character encoding" feature on their browser.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<h3>See also</h3>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<ul>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<li><code class="directive"><a href="/mod/mod_mime.html#addcharset">AddCharset</a></code></li>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</ul>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</div>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<table class="directive">
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluembe passed through</td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off|NoDecode</code></td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
c94e2389b3470486af5b341013b8def7e201db30humbedooh<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.0.46 and later.
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluemNoDecode option available in 2.3.12 and later.</td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</table>
86554dc60e298c76fd567161f47abd687008d6cchumbedooh <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
86554dc60e298c76fd567161f47abd687008d6cchumbedooh which contain encoded path separators (<code>%2F</code> for <code>/</code>
86554dc60e298c76fd567161f47abd687008d6cchumbedooh and additionally <code>%5C</code> for <code>\</code> on according systems)
86554dc60e298c76fd567161f47abd687008d6cchumbedooh to be used in the path info.</p>
86554dc60e298c76fd567161f47abd687008d6cchumbedooh
86554dc60e298c76fd567161f47abd687008d6cchumbedooh <p>With the default value, <code>Off</code>, such URLs are refused
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem with a 404 (Not found) error.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>With the value <code>On</code>, such URLs are accepted, and encoded
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slashes are decoded like all other encoded characters.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>With the value <code>NoDecode</code>, such URLs are accepted, but
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive encoded slashes are not decoded but left in their encoded state.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If encoded slashes are needed in path info, use of <code>NoDecode</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive strongly recommended as a security measure. Allowing slashes
06cec0eb90affb7f85de964d1822fddc77553c32humbedooh to be decoded could potentially allow unsafe paths.</p>
06cec0eb90affb7f85de964d1822fddc77553c32humbedooh </div>
0834a50e694f91f4bf20ddf030fd0812e65cafc7rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<code>.htaccess</code> files</td></tr>
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen[<var>directive-type</var>] ...</code></td></tr>
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier)</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
83f7a8612f5d7899d2d84d6f3f83f1ca4f86cc56rbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
83f7a8612f5d7899d2d84d6f3f83f1ca4f86cc56rbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
83f7a8612f5d7899d2d84d6f3f83f1ca4f86cc56rbowen</table>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <p>When the server finds an <code>.htaccess</code> file (as
e67969aeb443b18bbb3837690c4010c3f1961842jim specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
e67969aeb443b18bbb3837690c4010c3f1961842jim it needs to know which directives declared in that file can override
eb73941bd697cd7e8226ceaf04183ade6c66934dniq earlier configuration directives.</p>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <div class="note"><h3>Only available in &lt;Directory&gt; sections</h3>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <code class="directive">AllowOverride</code> is valid only in
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq 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
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.
eb73941bd697cd7e8226ceaf04183ade6c66934dniq </div>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <p>When this directive is set to <code>None</code> and <code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code> is set to
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <code>None</code> <a href="#accessfilename">.htaccess</a> files are
eb73941bd697cd7e8226ceaf04183ade6c66934dniq completely ignored. In this case, the server will not even attempt
eb73941bd697cd7e8226ceaf04183ade6c66934dniq to read <code>.htaccess</code> files in the filesystem.</p>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
184255c60354393e95feca30bbc8dec660f612abnd <p>When this directive is set to <code>All</code>, then any
eb73941bd697cd7e8226ceaf04183ade6c66934dniq directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <code>.htaccess</code> files.</p>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <p>The <var>directive-type</var> can be one of the following
eb73941bd697cd7e8226ceaf04183ade6c66934dniq groupings of directives.</p>
beefdf2539f2cd75fd45f5d560cbb26783ff9db1jim
beefdf2539f2cd75fd45f5d560cbb26783ff9db1jim <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>AuthConfig</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna Allow use of the authorization directives (<code class="directive"><a href="/mod/mod_authz_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna <code class="directive"><a href="/mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess <code class="directive"><a href="/mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
9970ad80054f477c708284a0d030a5bd26e412a9covener <code class="directive"><a href="/mod/mod_authn_core.html#authname">AuthName</a></code>,
9970ad80054f477c708284a0d030a5bd26e412a9covener <code class="directive"><a href="/mod/mod_authn_core.html#authtype">AuthType</a></code>, <code class="directive"><a href="/mod/mod_authn_file.html#authuserfile">AuthUserFile</a></code>, <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code>, <em>etc.</em>).</dd>
9970ad80054f477c708284a0d030a5bd26e412a9covener
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt>FileInfo</dt>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
9970ad80054f477c708284a0d030a5bd26e412a9covener <dd>
9970ad80054f477c708284a0d030a5bd26e412a9covener Allow use of the directives controlling document types
9970ad80054f477c708284a0d030a5bd26e412a9covener (<code class="directive"><a href="#errordocument">ErrorDocument</a></code>,
9970ad80054f477c708284a0d030a5bd26e412a9covener <code class="directive"><a href="#forcetype">ForceType</a></code>,
9970ad80054f477c708284a0d030a5bd26e412a9covener <code class="directive"><a href="/mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
d8655d95f4c9f281adc457de9ef702b46b003153rbowen <code class="directive"><a href="#sethandler">SetHandler</a></code>,
d8655d95f4c9f281adc457de9ef702b46b003153rbowen <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>,
08a6627a8cb9a9c85392cd0d8680c112a7f857cetrawick <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
d8655d95f4c9f281adc457de9ef702b46b003153rbowen <code class="module"><a href="/mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives),
9970ad80054f477c708284a0d030a5bd26e412a9covener 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>),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_actions.html#action">Action</a></code> from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_actions.html">mod_actions</a></code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dd>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <dt>Indexes</dt>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <dd>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd Allow use of the directives controlling directory indexing
da637bcae7b6e150470e701af29da5604a34a17erbowen (<code class="directive"><a href="/mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <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>,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code class="directive"><a href="/mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <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>, <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>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <em>etc.</em>).</dd>
da637bcae7b6e150470e701af29da5604a34a17erbowen
da637bcae7b6e150470e701af29da5604a34a17erbowen <dt>Limit</dt>
da637bcae7b6e150470e701af29da5604a34a17erbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf 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>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf
7802d43d20007fa575e43b6ae77d5177ceffdb71sf <dt>Nonfatal=[Override|Unknown|All]</dt>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf
86120957a14f91da0a1a103eaf4d7710b1dd9e2asf <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of AllowOverride option to treat syntax errors in
113961f0559eb026ea0d379cb7350f82bc09d710druggeri .htaccess as non-fatal: instead of causing an Internal Server
113961f0559eb026ea0d379cb7350f82bc09d710druggeri Error, disallowed or unrecognised directives will be ignored
113961f0559eb026ea0d379cb7350f82bc09d710druggeri and a warning logged:
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <ul>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <li><strong>Nonfatal=Override</strong> treats directives
113961f0559eb026ea0d379cb7350f82bc09d710druggeri forbidden by AllowOverride as non-fatal.</li>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <li><strong>Nonfatal=Unknown</strong> treats unknown directives
113961f0559eb026ea0d379cb7350f82bc09d710druggeri as non-fatal. This covers typos and directives implemented
113961f0559eb026ea0d379cb7350f82bc09d710druggeri by a module that's not present.</li>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <li><strong>Nonfatal=All</strong> treats both the above as non-fatal.</li>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </ul>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Note that a syntax error in a valid directive will still cause
113961f0559eb026ea0d379cb7350f82bc09d710druggeri an internal server error.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <div class="warning"><h3>Security</h3>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri Nonfatal errors may have security implications for .htaccess users.
113961f0559eb026ea0d379cb7350f82bc09d710druggeri For example, if AllowOverride disallows AuthConfig, users'
113961f0559eb026ea0d379cb7350f82bc09d710druggeri configuration designed to restrict access to a site will be disabled.
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </div>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </dd>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <dt>Options[=<var>Option</var>,...]</dt>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <dd>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri Allow use of the directives controlling specific directory
113961f0559eb026ea0d379cb7350f82bc09d710druggeri features (<code class="directive"><a href="#options">Options</a></code> and
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code class="directive"><a href="/mod/mod_include.html#xbithack">XBitHack</a></code>).
113961f0559eb026ea0d379cb7350f82bc09d710druggeri An equal sign may be given followed by a comma (but no spaces)
113961f0559eb026ea0d379cb7350f82bc09d710druggeri separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <div class="note"><h3>Implicit disabling of Options</h3>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Even though the list of options that may be used in .htaccess files
113961f0559eb026ea0d379cb7350f82bc09d710druggeri can be limited with this directive, as long as any <code class="directive"><a href="#options">Options</a></code> directive is allowed any
2aa51ed61adb484602e94de3d2214ec267aecedbigalic other inherited option can be disabled by using the non-relative
2aa51ed61adb484602e94de3d2214ec267aecedbigalic syntax. In other words, this mechanism cannot force a specific option
2aa51ed61adb484602e94de3d2214ec267aecedbigalic to remain <em>set</em> while allowing any others to be set.
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </p></div>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </dd>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </dl>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Example:</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <pre class="prettyprint lang-config">AllowOverride AuthConfig Indexes</pre>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>In the example above all directives that are neither in the group
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
2aa51ed61adb484602e94de3d2214ec267aecedbigalic server error.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <div class="note"><p>For security and performance reasons, do not set
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>AllowOverride</code> to anything other than <code>None</code>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
44d199e4e31c535de0afd97844a2146529a03ed1rbowen create) the <code>&lt;Directory&gt;</code> block that refers to the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri directory where you're actually planning to place a
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>.htaccess</code> file.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/configuring.html">Configuration Files</a></li>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess</div>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">Directive</a></h2>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<table class="directive">
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Individual directives that are allowed in
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<code>.htaccess</code> files</td></tr>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverrideList None|<var>directive</var>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes[<var>directive-type</var>] ...</code></td></tr>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverrideList None</code></td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>When the server finds an <code>.htaccess</code> file (as
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes it needs to know which directives declared in that file can override
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes earlier configuration directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Only available in &lt;Directory&gt; sections</h3>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive">AllowOverrideList</code> is valid only in
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then <a href="#accessfilename">.htaccess</a> files are completely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ignored. In this case, the server will not even attempt to read
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files in the filesystem.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAllowOverride None
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAllowOverrideList Redirect RedirectMatch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the example above only the <code>Redirect</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>RedirectMatch</code> directives are allowed. All others will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause an internal server error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <pre class="prettyprint lang-config">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndAllowOverride AuthConfig
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndAllowOverrideList CookieTracking CookieName
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the example above <code class="directive"><a href="#allowoverride&#10; ">AllowOverride
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </a></code> grants permission to the <code>AuthConfig</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive grouping and <code class="directive">AllowOverrideList</code> grants
fb77c505254b6e9c925e23e734463e87574f8f40kess permission to only two directves from the <code>FileInfo</code> directive
fb77c505254b6e9c925e23e734463e87574f8f40kess grouping. All others will cause an internal server error.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<li><a href="/configuring.html">Configuration Files</a></li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim</ul>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim</div>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<table class="directive">
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
2dada762fb99649c2a57bb9e19fe1666f2c20c38jimscripts</td></tr>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
3339ba66526d917876a7c4453c6face113f7d5a1trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>NetWare only</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</table>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <p>This directive is used to control how Apache httpd finds the
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim interpreter used to run CGI scripts. For example, setting
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <code>CGIMapExtension sys:\foo.nlm .foo</code> will
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim cause all CGI script files with a <code>.foo</code> extension to
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim be passed to the FOO interpreter.</p>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim</div>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<table class="directive">
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response
2dada762fb99649c2a57bb9e19fe1666f2c20c38jimheaders</td></tr>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest Off</code></td></tr>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</table>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>This directive enables the generation of
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <code>Content-MD5</code> headers as defined in RFC1864
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding respectively RFC2616.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>MD5 is an algorithm for computing a "message digest"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (sometimes called "fingerprint") of arbitrary-length data, with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a high degree of confidence that any alterations in the data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be reflected in alterations in the message digest.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
158222078a98fb13cddf2793b42f7eb8eafe51aerjung <p>The <code>Content-MD5</code> header provides an end-to-end
158222078a98fb13cddf2793b42f7eb8eafe51aerjung message integrity check (MIC) of the entity-body. A proxy or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client may check this header for detecting accidental
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modification of the entity-body in transit. Example header:</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <div class="example"><p><code>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
e4881891552e185a7408318dfc7f62ebabe73cf6niq <p>Note that this can cause performance problems on your server
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding since the message digest is computed on every request (the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding values are not cached).</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p><code>Content-MD5</code> is only sent for documents served
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding by the <code class="module"><a href="/mod/core.html">core</a></code>, and not by any module. For example,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding SSI documents, output from CGI scripts, and byte range responses
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding do not have this header.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</div>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server run-time files</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</table>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>The <code class="directive">DefaultRuntimeDir</code> directive sets the
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl directory in which the server will create various run-time files
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf (shared memory, locks, etc.). If set as a relative path, the full path
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf will be relative to <code class="directive">ServerRoot</code></p>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p><strong>Example</strong></p>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <pre class="prettyprint lang-config">
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsfDefaultRuntimeDir scratch/
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf </pre>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p>The default location of <code class="directive">DefaultRuntimeDir</code> may be
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf modified by changing the <code>DEFAULT_REL_RUNTIMEDIR</code> #define
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf at build time.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Note: <code class="directive">ServerRoot</code> should be specified before this
2aa51ed61adb484602e94de3d2214ec267aecedbigalic directive is used, otherwise the default value of <code class="directive">ServerRoot</code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic would be used to set the base directory.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<h3>See also</h3>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<ul>
b69e5120af5b107504c74dbe0228946378ab80b2rbowen<li><a href="/misc/security_tips.html#serverroot">the
da819920f5e424a6e7deb118379e959b177518f0rbowen security tips</a> for information on how to properly set
2aa51ed61adb484602e94de3d2214ec267aecedbigalic permissions on the <code class="directive">ServerRoot</code></li>
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf</ul>
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf</div>
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<table class="directive">
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>This directive has no effect other than to emit warnings
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveif the value is not <code>none</code>. In prior versions, DefaultType
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewould specify a default media type to assign to response content for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewhich no other media type configuration could be found.
898475b582dd849de5915df0f2089b72ed8b2e2bcovener</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType none</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The argument <code>none</code> is available in Apache httpd 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
898475b582dd849de5915df0f2089b72ed8b2e2bcovener <p>This directive has been disabled. For backwards compatibility
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor of configuration files, it may be specified with the value
898475b582dd849de5915df0f2089b72ed8b2e2bcovener <code>none</code>, meaning no default media type. For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
003f0c9fda6664daf5092a0e42f65ede20098153slive <pre class="prettyprint lang-config">DefaultType None</pre>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p><code>DefaultType None</code> is only available in
fb77c505254b6e9c925e23e734463e87574f8f40kess httpd-2.2.7 and later.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Use the mime.types configuration file and the
003f0c9fda6664daf5092a0e42f65ede20098153slive <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code> to configure media
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type assignments via file extensions, or the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure
2aa51ed61adb484602e94de3d2214ec267aecedbigalic the media type for specific resources. Otherwise, the server will
2aa51ed61adb484602e94de3d2214ec267aecedbigalic send the response without a Content-Type header field and the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic recipient may attempt to guess the media type.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define a variable</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen</table>
030108b1816bcda3d925df65357feabdce83bc94slive <p>In its one parameter form, <code class="directive">Define</code> is equivalent
030108b1816bcda3d925df65357feabdce83bc94slive to passing the <code>-D</code> argument to <code class="program"><a href="/programs/httpd.html">httpd</a></code>. It
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can be used to toggle the use of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><a href="#ifdefine">&lt;IfDefine&gt;</a></code> sections
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh without needing to alter <code>-D</code> arguments in any startup
2531f46e415fc4e43fd1724a8687782fcc58be77humbedooh scripts.</p>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <p>In addition to that, if the second parameter is given, a config variable
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh is set to this value. The variable can be used in the configuration using
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the <code>${VAR}</code> syntax. The variable is always globally defined
fb77c505254b6e9c925e23e734463e87574f8f40kess and not limited to the scope of the surrounding config section.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess&lt;IfDefine TEST&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Define servername test.example.com
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;IfDefine !TEST&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Define servername www.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Define SSL
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Variable names may not contain colon ":" characters, to avoid clashes
2aa51ed61adb484602e94de3d2214ec267aecedbigalic with <code class="directive"><a href="/mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>'s syntax.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</div>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<div class="directive-section"><h2><a name="Directory" id="Directory">&lt;Directory&gt;</a> <a name="directory" id="directory">Directive</a></h2>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivenamed file-system directory, sub-directories, and their contents.</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Directory <var>directory-path</var>&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive... &lt;/Directory&gt;</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive">&lt;Directory&gt;</code> and
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>&lt;/Directory&gt;</code> are used to enclose a group of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives that will apply only to the named directory,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess sub-directories of that directory, and the files within the respective
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess directories. Any directive that is allowed
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess in a directory context may be used. <var>Directory-path</var> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive either the full path to a directory, or a wild-card string using
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Unix shell-style matching. In a wild-card string, <code>?</code> matches
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any single character, and <code>*</code> matches any sequences of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive characters. You may also use <code>[]</code> character ranges. None
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the wildcards match a `/' character, so <code>&lt;Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /*/public_html&gt;</code> will not match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/user/public_html</code>, but <code>&lt;Directory
2aa51ed61adb484602e94de3d2214ec267aecedbigalic /home/*/public_html&gt;</code> will match. Example:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh <pre class="prettyprint lang-config">
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;Directory "/usr/local/httpd/htdocs"&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic Options Indexes FollowSymLinks
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </pre>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <div class="note">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>Be careful with the <var>directory-path</var> arguments:
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess They have to literally match the filesystem path which Apache httpd uses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to access the files. Directives applied to a particular
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>&lt;Directory&gt;</code> will not apply to files accessed from
4e10c61d7f924071cad435df940a8f325015b2d3rbowen that same directory via a different path, such as via different symbolic
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen links.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular
2aa51ed61adb484602e94de3d2214ec267aecedbigalic expressions</a> can also be used, with the addition of the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>~</code> character. For example:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <pre class="prettyprint lang-config">
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in <code>/www/</code> that consisted of
fb77c505254b6e9c925e23e734463e87574f8f40kess three numbers.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If multiple (non-regular expression) <code class="directive">&lt;Directory&gt;</code> sections
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive match the directory (or one of its parents) containing a document,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then the directives are applied in the order of shortest match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess with</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory /&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/home"&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess AllowOverride FileInfo
898475b582dd849de5915df0f2089b72ed8b2e2bcovener&lt;/Directory&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </pre>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>for access to the document <code>/home/web/dir/doc.html</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the steps are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride None</code>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor (disabling <code>.htaccess</code> files).</li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <li>Apply directive <code>AllowOverride FileInfo</code> (for
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener directory <code>/home</code>).</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <li>Apply any <code>FileInfo</code> directives in
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <code>/home/web/dir/.htaccess</code> in that order.</li>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh </ul>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Regular expressions are not considered until after all of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive normal sections have been applied. Then all of the regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions are tested in the order they appeared in the
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener configuration file. For example, with</p>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <pre class="prettyprint lang-config">
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener&lt;Directory ~ "abc$"&gt;
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener # ... directives here ...
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener&lt;/Directory&gt;
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener </pre>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <p>the regular expression section won't be considered until after
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor all normal <code class="directive">&lt;Directory&gt;</code>s and
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>.htaccess</code> files have been applied. Then the regular
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener expression will match on <code>/home/abc/public_html/abc</code> and
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener the corresponding <code class="directive">&lt;Directory&gt;</code> will
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin be applied.</p>
4dc1bd46d9e8353c0d312f7bfd53080ad2b86ed2sf
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin <p><strong>Note that the default access for
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin <code>&lt;Directory /&gt;</code> is to permit all access.
ae382386f18506586972cdd63c09bb27a1685062nd This means that Apache httpd will serve any file mapped from an URL. It is
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin recommended that you change this with a block such
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin as</strong></p>
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin <pre class="prettyprint lang-config">
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin&lt;Directory /&gt;
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin Require all denied
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin&lt;/Directory&gt;
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>and then override this for directories you
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <em>want</em> accessible. See the <a href="/misc/security_tips.html">Security Tips</a> page for more
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive details.</strong></p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The directory sections occur in the <code>httpd.conf</code> file.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive">&lt;Directory&gt;</code> directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cannot nest, and cannot appear in a <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> or <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
003f0c9fda6664daf5092a0e42f65ede20098153slive<li><a href="/sections.html">How &lt;Directory&gt;,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd explanation of how these different sections are combined when a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request is received</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch">&lt;DirectoryMatch&gt;</a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<table class="directive">
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
fb77c505254b6e9c925e23e734463e87574f8f40kessthe contents of file-system directories matching a regular expression.</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;DirectoryMatch <var>regex</var>&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess... &lt;/DirectoryMatch&gt;</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick <p><code class="directive">&lt;DirectoryMatch&gt;</code> and
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor of directives which will apply only to the named directory (and the files within),
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess the same as <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive However, it takes as an argument a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular expression</a>. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen&lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen # ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/DirectoryMatch&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</pre>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>would match directories in <code>/www/</code> that consisted of three
6b15044d54a096e6323ff1540f1a491e8de7622dsf numbers.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <div class="note"><h3>Compatability</h3>
6b15044d54a096e6323ff1540f1a491e8de7622dsf Prior to 2.3.9, this directive implicitly applied to sub-directories
6b15044d54a096e6323ff1540f1a491e8de7622dsf (like <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>) and
6b15044d54a096e6323ff1540f1a491e8de7622dsf could not match the end of line symbol ($). In 2.3.9 and later,
6b15044d54a096e6323ff1540f1a491e8de7622dsf only directories that match the expression are affected by the enclosed
6b15044d54a096e6323ff1540f1a491e8de7622dsf directives.
6b15044d54a096e6323ff1540f1a491e8de7622dsf </div>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <div class="note"><h3>Trailing Slash</h3>
6b15044d54a096e6323ff1540f1a491e8de7622dsf This directive applies to requests for directories that may or may
6b15044d54a096e6323ff1540f1a491e8de7622dsf not end in a trailing slash, so expressions that are anchored to the
6b15044d54a096e6323ff1540f1a491e8de7622dsf end of line ($) must be written with care.
6b15044d54a096e6323ff1540f1a491e8de7622dsf </div>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<h3>See also</h3>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<ul>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> for
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooha description of how regular expressions are mixed in with normal
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<code class="directive">&lt;Directory&gt;</code>s</li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh&lt;Files&gt; sections work</a> for an explanation of how these different
2aa51ed61adb484602e94de3d2214ec267aecedbigalicsections are combined when a request is received</li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</ul>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</div>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<table class="directive">
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
6b15044d54a096e6323ff1540f1a491e8de7622dsffrom the web</td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</table>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>This directive sets the directory from which <code class="program"><a href="/programs/httpd.html">httpd</a></code>
6b15044d54a096e6323ff1540f1a491e8de7622dsf will serve files. Unless matched by a directive like <code class="directive"><a href="/mod/mod_alias.html#alias">Alias</a></code>, the server appends the
6b15044d54a096e6323ff1540f1a491e8de7622dsf path from the requested URL to the document root to make the
6b15044d54a096e6323ff1540f1a491e8de7622dsf path to the document. Example:</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <pre class="prettyprint lang-config">DocumentRoot "/usr/web"</pre>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>then an access to
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>http://my.example.com/index.html</code> refers to
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
6b15044d54a096e6323ff1540f1a491e8de7622dsf not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The <code class="directive">DocumentRoot</code> should be specified without
6b15044d54a096e6323ff1540f1a491e8de7622dsf a trailing slash.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<h3>See also</h3>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<ul>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<li><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
6b15044d54a096e6323ff1540f1a491e8de7622dsfLocations</a></li>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</ul>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</div>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<div class="directive-section"><h2><a name="Else" id="Else">&lt;Else&gt;</a> <a name="else" id="else">Directive</a></h2>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<table class="directive">
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if the condition of a
2aa51ed61adb484602e94de3d2214ec267aecedbigalicprevious <code class="directive"><a href="#if">&lt;If&gt;</a></code> or
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh<code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code> section is not
2aa51ed61adb484602e94de3d2214ec267aecedbigalicsatisfied by a request at runtime</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Else&gt; ... &lt;/Else&gt;</code></td></tr>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</table>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The <code class="directive">&lt;Else&gt;</code> applies the enclosed
6b15044d54a096e6323ff1540f1a491e8de7622dsf directives if and only if the most recent
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code class="directive">&lt;If&gt;</code> or
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code class="directive">&lt;ElseIf&gt;</code> section
6b15044d54a096e6323ff1540f1a491e8de7622dsf in the same scope has not been applied.
6b15044d54a096e6323ff1540f1a491e8de7622dsf For example: In </p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <pre class="prettyprint lang-config">
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;If "-z req('Host')"&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf # ...
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;/If&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;Else&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf # ...
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;/Else&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf </pre>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p> The <code class="directive">&lt;If&gt;</code> would match HTTP/1.0
6b15044d54a096e6323ff1540f1a491e8de7622dsf requests without a <var>Host:</var> header and the
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code class="directive">&lt;Else&gt;</code> would match requests
6b15044d54a096e6323ff1540f1a491e8de7622dsf with a <var>Host:</var> header.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
003f0c9fda6664daf5092a0e42f65ede20098153slive<h3>See also</h3>
fb77c505254b6e9c925e23e734463e87574f8f40kess<ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><code class="directive"><a href="#if">&lt;If&gt;</a></code></li>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<li><code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code></li>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
af18698b10b429b270551ca3a5d51a75e1c9db22brianp &lt;Files&gt; sections work</a> for an explanation of how these
003f0c9fda6664daf5092a0e42f65ede20098153slive different sections are combined when a request is received.
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <code class="directive">&lt;If&gt;</code>,
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <code class="directive">&lt;ElseIf&gt;</code>, and
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <code class="directive">&lt;Else&gt;</code> are applied last.</li>
003f0c9fda6664daf5092a0e42f65ede20098153slive</ul>
003f0c9fda6664daf5092a0e42f65ede20098153slive</div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<div class="directive-section"><h2><a name="ElseIf" id="ElseIf">&lt;ElseIf&gt;</a> <a name="elseif" id="elseif">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is satisfied
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndby a request at runtime while the condition of a previous
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<code class="directive"><a href="#if">&lt;If&gt;</a></code> or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<code class="directive">&lt;ElseIf&gt;</code> section is not
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndsatisfied</td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<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>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier</table>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier <p>The <code class="directive">&lt;ElseIf&gt;</code> applies the enclosed
af18698b10b429b270551ca3a5d51a75e1c9db22brianp directives if and only if both the given condition evaluates to true and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the most recent <code class="directive">&lt;If&gt;</code> or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">&lt;ElseIf&gt;</code> section in the same scope has
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd not been applied. For example: In </p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <pre class="prettyprint lang-config">
41ef8b3051855b802104193ee0a587515af60a37wrowe&lt;If "-R '10.1.0.0/16'"&gt;
41ef8b3051855b802104193ee0a587515af60a37wrowe #...
41ef8b3051855b802104193ee0a587515af60a37wrowe&lt;/If&gt;
41ef8b3051855b802104193ee0a587515af60a37wrowe&lt;ElseIf "-R '10.0.0.0/8'"&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic #...
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;/ElseIf&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;Else&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic #...
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;/Else&gt;
41ef8b3051855b802104193ee0a587515af60a37wrowe </pre>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>The <code class="directive">&lt;ElseIf&gt;</code> would match if
41ef8b3051855b802104193ee0a587515af60a37wrowe the remote address of a request belongs to the subnet 10.0.0.0/8 but
41ef8b3051855b802104193ee0a587515af60a37wrowe not to the subnet 10.1.0.0/16.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf
41ef8b3051855b802104193ee0a587515af60a37wrowe<h3>See also</h3>
41ef8b3051855b802104193ee0a587515af60a37wrowe<ul>
41ef8b3051855b802104193ee0a587515af60a37wrowe<li><a href="/expr.html">Expressions in Apache HTTP Server</a>,
41ef8b3051855b802104193ee0a587515af60a37wrowefor a complete reference and more examples.</li>
158222078a98fb13cddf2793b42f7eb8eafe51aerjung<li><code class="directive"><a href="#if">&lt;If&gt;</a></code></li>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf<li><code class="directive"><a href="#else">&lt;Else&gt;</a></code></li>
41ef8b3051855b802104193ee0a587515af60a37wrowe<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
41ef8b3051855b802104193ee0a587515af60a37wrowe &lt;Files&gt; sections work</a> for an explanation of how these
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd different sections are combined when a request is received.
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <code class="directive">&lt;If&gt;</code>,
41ef8b3051855b802104193ee0a587515af60a37wrowe <code class="directive">&lt;ElseIf&gt;</code>, and
41ef8b3051855b802104193ee0a587515af60a37wrowe <code class="directive">&lt;Else&gt;</code> are applied last.</li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</ul>
41ef8b3051855b802104193ee0a587515af60a37wrowe</div>
41ef8b3051855b802104193ee0a587515af60a37wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<table class="directive">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableMMAP On</code></td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</table>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley <p>This directive controls whether the <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley memory-mapping if it needs to read the contents of a file during
2025fe01de41805f6148851335693aa5ebe2faffnd delivery. By default, when the handling of a request requires
2025fe01de41805f6148851335693aa5ebe2faffnd access to the data within a file -- for example, when delivering a
9fb925624300c864fe3969a264e52aa83f3c2dd0slive server-parsed file using <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> -- Apache httpd
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf memory-maps the file if the OS supports it.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
9fb925624300c864fe3969a264e52aa83f3c2dd0slive <p>This memory-mapping sometimes yields a performance improvement.
41ef8b3051855b802104193ee0a587515af60a37wrowe But in some environments, it is better to disable the memory-mapping
41ef8b3051855b802104193ee0a587515af60a37wrowe to prevent operational problems:</p>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <ul>
41ef8b3051855b802104193ee0a587515af60a37wrowe <li>On some multiprocessor systems, memory-mapping can reduce the
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh performance of the <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</li>
41ef8b3051855b802104193ee0a587515af60a37wrowe <li>Deleting or truncating a file while <code class="program"><a href="/programs/httpd.html">httpd</a></code>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf has it memory-mapped can cause <code class="program"><a href="/programs/httpd.html">httpd</a></code> to
9fb925624300c864fe3969a264e52aa83f3c2dd0slive crash with a segmentation fault.
41ef8b3051855b802104193ee0a587515af60a37wrowe </li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </ul>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>For server configurations that are vulnerable to these problems,
2aa51ed61adb484602e94de3d2214ec267aecedbigalic you should disable memory-mapping of delivered files by specifying:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <pre class="prettyprint lang-config">EnableMMAP Off</pre>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <p>For NFS mounted files, this feature may be disabled explicitly for
832853bb93c1831daf24e4727c5ca0e1b1786e83lars the offending files by specifying:</p>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <pre class="prettyprint lang-config">
af18698b10b429b270551ca3a5d51a75e1c9db22brianp&lt;Directory "/path-to-nfs-files"&gt;
af18698b10b429b270551ca3a5d51a75e1c9db22brianp EnableMMAP Off
79c754eb51681c3389cd966753e902c429f78939trawick&lt;/Directory&gt;
79c754eb51681c3389cd966753e902c429f78939trawick </pre>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick</div>
79c754eb51681c3389cd966753e902c429f78939trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
79c754eb51681c3389cd966753e902c429f78939trawick<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
79c754eb51681c3389cd966753e902c429f78939trawick<table class="directive">
79c754eb51681c3389cd966753e902c429f78939trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use the kernel sendfile support to deliver files to the client</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile Off</code></td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.44 and later. Default changed to Off in
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedoohversion 2.3.9.</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</table>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>This directive controls whether <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use the
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh sendfile support from the kernel to transmit file contents to the client.
2aa51ed61adb484602e94de3d2214ec267aecedbigalic By default, when the handling of a request requires no access
2aa51ed61adb484602e94de3d2214ec267aecedbigalic to the data within a file -- for example, when delivering a
2aa51ed61adb484602e94de3d2214ec267aecedbigalic static file -- Apache httpd uses sendfile to deliver the file contents
2aa51ed61adb484602e94de3d2214ec267aecedbigalic without ever reading the file if the OS supports it.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh <p>This sendfile mechanism avoids separate read and send operations,
2aa51ed61adb484602e94de3d2214ec267aecedbigalic and buffer allocations. But on some platforms or within some
2aa51ed61adb484602e94de3d2214ec267aecedbigalic filesystems, it is better to disable this feature to avoid
2aa51ed61adb484602e94de3d2214ec267aecedbigalic operational problems:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh <ul>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <li>Some platforms may have broken sendfile support that the build
2aa51ed61adb484602e94de3d2214ec267aecedbigalic system did not detect, especially if the binaries were built on
2aa51ed61adb484602e94de3d2214ec267aecedbigalic another box and moved to such a machine with broken sendfile
79c754eb51681c3389cd966753e902c429f78939trawick support.</li>
79c754eb51681c3389cd966753e902c429f78939trawick <li>On Linux the use of sendfile triggers TCP-checksum
79c754eb51681c3389cd966753e902c429f78939trawick offloading bugs on certain networking cards when using IPv6.</li>
79c754eb51681c3389cd966753e902c429f78939trawick <li>On Linux on Itanium, <code>sendfile</code> may be unable to handle
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive files over 2GB in size.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS, SMB, CIFS, FUSE),
003f0c9fda6664daf5092a0e42f65ede20098153slive the kernel may be unable to serve the network file through
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own cache.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are not vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you may enable this feature by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">EnableSendfile On</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For network mounted files, this feature may be disabled explicitly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the offending files by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/path-to-nfs-files"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
19ca5ef2613bf4b9cafcc0935f7d3c499d51ff7ccovener </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Please note that the per-directory and .htaccess configuration
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of <code class="directive">EnableSendfile</code> is not supported by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_cache_disk.html">mod_cache_disk</a></code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Only global definition of <code class="directive">EnableSendfile</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is taken into account by the module.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Abort configuration parsing with a custom error message</td></tr>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Error <var>message</var></code></td></tr>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.3.9 and later</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</table>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>If an error can be detected within the configuration, this
2aa51ed61adb484602e94de3d2214ec267aecedbigalic directive can be used to generate a custom error message, and halt
2aa51ed61adb484602e94de3d2214ec267aecedbigalic configuration parsing. The typical use is for reporting required
2aa51ed61adb484602e94de3d2214ec267aecedbigalic modules which are missing from the configuration.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
f7fe99050600166042c04b8e595fb75499eed7f0geoff# Example
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen# ensure that mod_include is loaded
f7fe99050600166042c04b8e595fb75499eed7f0geoff&lt;IfModule !include_module&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Error "mod_include is required by mod_foo. Load it with LoadModule."
f7fe99050600166042c04b8e595fb75499eed7f0geoff&lt;/IfModule&gt;
f7fe99050600166042c04b8e595fb75499eed7f0geoff
2aa51ed61adb484602e94de3d2214ec267aecedbigalic# ensure that exactly one of SSL,NOSSL is defined
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;IfDefine SSL&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;IfDefine NOSSL&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic Error "Both SSL and NOSSL are defined. Define only one of them."
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;/IfDefine&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;/IfDefine&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;IfDefine !SSL&gt;
f7fe99050600166042c04b8e595fb75499eed7f0geoff&lt;IfDefine !NOSSL&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Error "Either SSL or NOSSL must be defined."
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/IfDefine&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>What the server will return to the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivein case of an error</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess</table>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive <p>In the event of a problem or error, Apache httpd can be configured
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive to do one of four things,</p>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <ol>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>output a simple hardcoded error message</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive <li>output a customized message</li>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <li>redirect to a local <var>URL-path</var> to handle the
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive problem/error</li>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <li>redirect to an external <var>URL</var> to handle the
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive problem/error</li>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive </ol>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen <p>The first option is the default, while options 2-4 are
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen configured using the <code class="directive">ErrorDocument</code>
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen directive, which is followed by the HTTP response code and a URL
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen or a message. Apache httpd will sometimes offer additional information
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regarding the problem/error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>URLs can begin with a slash (/) for local web-paths (relative
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive full URL which the client can resolve. Alternatively, a message
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can be provided to be displayed by the browser. Examples:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessErrorDocument 500 http://foo.example.com/cgi-bin/tester
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndErrorDocument 404 /cgi-bin/bad_urls.pl
4a13940dc2990df0a798718d3a3f9cf1566c2217bjhErrorDocument 401 /subscription_info.html
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorDocument 403 "Sorry can't allow you access today"
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorDocument 403 Forbidden!
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Additionally, the special value <code>default</code> can be used
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor to specify Apache httpd's simple hardcoded message. While not required
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess under normal circumstances, <code>default</code> will restore
fb109b84906e3ee61680aa289953c2f9e859354erbowen Apache httpd's simple hardcoded message for configurations that would
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
fb109b84906e3ee61680aa289953c2f9e859354erbowen <pre class="prettyprint lang-config">
960188481b7025ac8ef7221b67af83dd27e46cd0rjungErrorDocument 404 /cgi-bin/bad_urls.pl
960188481b7025ac8ef7221b67af83dd27e46cd0rjung
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory /web/docs&gt;
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh ErrorDocument 404 default
fb109b84906e3ee61680aa289953c2f9e859354erbowen&lt;/Directory&gt;
960188481b7025ac8ef7221b67af83dd27e46cd0rjung </pre>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung
960188481b7025ac8ef7221b67af83dd27e46cd0rjung
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that when you specify an <code class="directive">ErrorDocument</code>
56589be3d7a3e9343370df240010c6928cc78b39jkaluza that points to a remote URL (ie. anything with a method such as
56589be3d7a3e9343370df240010c6928cc78b39jkaluza <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
56589be3d7a3e9343370df240010c6928cc78b39jkaluza client to tell it where to find the document, even if the
56589be3d7a3e9343370df240010c6928cc78b39jkaluza document ends up being on the same server. This has several
5155e92c6100b47513159eee1b2b9914ab204a5acovener implications, the most important being that the client will not
5155e92c6100b47513159eee1b2b9914ab204a5acovener receive the original error status code, but instead will
5155e92c6100b47513159eee1b2b9914ab204a5acovener receive a redirect status code. This in turn can confuse web
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive robots and other clients which try to determine if a URL is
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh valid using the status code. In addition, if you use a remote
fb109b84906e3ee61680aa289953c2f9e859354erbowen URL in an <code>ErrorDocument 401</code>, the client will not
56589be3d7a3e9343370df240010c6928cc78b39jkaluza know to prompt the user for a password since it will not
56589be3d7a3e9343370df240010c6928cc78b39jkaluza receive the 401 status code. Therefore, <strong>if you use an
56589be3d7a3e9343370df240010c6928cc78b39jkaluza <code>ErrorDocument 401</code> directive then it must refer to a local
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Microsoft Internet Explorer (MSIE) will by default ignore
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick server-generated error messages when they are "too small" and substitute
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own "friendly" error messages. The size threshold varies depending on
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes the type of error, but in general, if you make your error document
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes greater than 512 bytes, then MSIE will show the server-generated
d950cf9262224a223e2ff5c51393708071e14b94covener error rather than masking it. More information is available in
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <p>Although most error messages can be overridden, there are certain
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive circumstances where the internal messages are used regardless of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. In
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen particular, if a malformed request is detected, normal request processing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be immediately halted and the internal error message returned.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This is necessary to guard against security problems caused by
e302f38fd646764ce1a1e1c578d794aef514a9e5sf bad requests.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>If you are using mod_proxy, you may wish to enable
2851546ce44280e54301016a7e92b00a87745509sf <code class="directive"><a href="/mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide
e302f38fd646764ce1a1e1c578d794aef514a9e5sf custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf Apache httpd will not generate custom error documents for proxied content.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<h3>See also</h3>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<ul>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<li><a href="/custom-error.html">documentation of
e302f38fd646764ce1a1e1c578d794aef514a9e5sf customizable responses</a></li>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</ul>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</div>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<table class="directive">
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</code></td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</code></td></tr>
18ee8bb3db5cc3b04291f89301bd5d14dc271066lgentis<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</table>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <code class="directive">ErrorLog</code> directive sets the name of
e302f38fd646764ce1a1e1c578d794aef514a9e5sf the file to which the server will log any errors it encounters. If
e302f38fd646764ce1a1e1c578d794aef514a9e5sf the <var>file-path</var> is not absolute then it is assumed to be
e302f38fd646764ce1a1e1c578d794aef514a9e5sf relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <pre class="prettyprint lang-config">ErrorLog "/var/log/httpd/error_log"</pre>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>If the <var>file-path</var>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf begins with a pipe character "<code>|</code>" then it is assumed to be a
e302f38fd646764ce1a1e1c578d794aef514a9e5sf command to spawn to handle the error log.</p>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <pre class="prettyprint lang-config">ErrorLog "|/usr/local/bin/httpd_errors"</pre>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
4c14866954f240e6e2c17c164900c4aa7900bbeehumbedooh <p>See the notes on <a href="/logs.html#piped">piped logs</a> for
e302f38fd646764ce1a1e1c578d794aef514a9e5sf more information.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>Using <code>syslog</code> instead of a filename enables logging
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf via syslogd(8) if the system supports it. The default is to use
e302f38fd646764ce1a1e1c578d794aef514a9e5sf syslog facility <code>local7</code>, but you can override this by
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf using the <code>syslog:<var>facility</var></code> syntax where
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <var>facility</var> can be one of the names usually documented in
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh syslog(1). The facility is effectively global, and if it is changed
e302f38fd646764ce1a1e1c578d794aef514a9e5sf in individual virtual hosts, the final facility specified affects the
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf entire server.</p>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <pre class="prettyprint lang-config">ErrorLog syslog:user</pre>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
221a06bb836af6024708190895834af79c90d1c8rbowen <p>SECURITY: See the <a href="/misc/security_tips.html#serverroot">security tips</a>
221a06bb836af6024708190895834af79c90d1c8rbowen document for details on why your security could be compromised
221a06bb836af6024708190895834af79c90d1c8rbowen if the directory where log files are stored is writable by
221a06bb836af6024708190895834af79c90d1c8rbowen anyone other than the user that starts the server.</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <div class="warning"><h3>Note</h3>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>When entering a file path on non-Unix platforms, care should be taken
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen to make sure that only forward slashes are used even though the platform
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen may allow the use of back slashes. In general it is a good idea to always
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen use forward slashes throughout the configuration files.</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen </div>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<h3>See also</h3>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<ul>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<li><a href="/logs.html">Apache HTTP Server Log Files</a></li>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</ul>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</div>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">Directive</a></h2>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<table class="directive">
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Format specification for error log entries</td></tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.3.9 and later</td></tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</table>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p><code class="directive">ErrorLogFormat</code> allows to specify what
e302f38fd646764ce1a1e1c578d794aef514a9e5sf supplementary information is logged in the error log in addition to the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf actual log message.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <pre class="prettyprint lang-config">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf#Simple example
e302f38fd646764ce1a1e1c578d794aef514a9e5sfErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </pre>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>Specifying <code>connection</code> or <code>request</code> as first
2d391792b33e3c27e070739f74d74989c77fea8eminfrin parameter allows to specify additional formats, causing additional
e302f38fd646764ce1a1e1c578d794aef514a9e5sf information to be logged when the first message is logged for a specific
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin connection or request, respectively. This additional information is only
2d391792b33e3c27e070739f74d74989c77fea8eminfrin logged once per connection/request. If a connection or request is processed
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin without causing any log message, the additional information is not logged
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin either.</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>It can happen that some format string items do not produce output. For
e302f38fd646764ce1a1e1c578d794aef514a9e5sf example, the Referer header is only present if the log message is
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen associated to a request and the log message happens at a time when the
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen Referer header has already been read from the client. If no output is
4497075b5e08b0c8ee89425a1758258ae80550fcsf produced, the default behavior is to delete everything from the preceding
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen space character to the next space character. This means the log line is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf implicitly divided into fields on non-whitespace to whitespace transitions.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf If a format string item does not produce output, the whole field is
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen omitted. For example, if the remote address <code>%a</code> in the log
e302f38fd646764ce1a1e1c578d794aef514a9e5sf format <code>[%t] [%l] [%a] %M&nbsp;</code> is not available, the surrounding
e302f38fd646764ce1a1e1c578d794aef514a9e5sf brackets are not logged either. Space characters can be escaped with a
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen backslash to prevent them from delimiting a field. The combination '%&nbsp;'
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen (percent space) is a zero-witdh field delimiter that does not produce any
e302f38fd646764ce1a1e1c578d794aef514a9e5sf output.</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The above behavior can be changed by adding modifiers to the format
e302f38fd646764ce1a1e1c578d794aef514a9e5sf string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen respective item does not produce any output. In once-per-connection/request
e302f38fd646764ce1a1e1c578d794aef514a9e5sf formats, it is also possible to use the <code>+</code> (plus) modifier. If an
e302f38fd646764ce1a1e1c578d794aef514a9e5sf item with the plus modifier does not produce any output, the whole line is
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen omitted.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>A number as modifier can be used to assign a log severity level to a
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen format item. The item will only be logged if the severity of the log
e302f38fd646764ce1a1e1c578d794aef514a9e5sf message is not higher than the specified log severity level. The number can
e302f38fd646764ce1a1e1c578d794aef514a9e5sf range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>For example, here's what would happen if you added modifiers to
e302f38fd646764ce1a1e1c578d794aef514a9e5sf the <code>%{Referer}i</code> token, which logs the
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <code>Referer</code> request header.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <table class="bordered"><tr class="header"><th>Modified Token</th><th>Meaning</th></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td><code>%-{Referer}i</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Logs a <code>-</code> if <code>Referer</code> is not set.</td>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen </tr>
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen<tr class="odd">
4497075b5e08b0c8ee89425a1758258ae80550fcsf <td><code>%+{Referer}i</code></td>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <td>Omits the entire line if <code>Referer</code> is not set.</td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <td><code>%4{Referer}i</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Logs the <code>Referer</code> only if the log message severity
e302f38fd646764ce1a1e1c578d794aef514a9e5sf is higher than 4.</td>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen </tr>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf</table>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf <p>Some format string items accept additional parameters in braces.</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <table class="bordered"><tr class="header"><th>Format&nbsp;String</th> <th>Description</th></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr><td><code>%%</code></td>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <td>The percent sign</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr class="odd"><td><code>%a</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Client IP address and port of the request</td></tr>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<tr><td><code>%{c}a</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Underlying peer IP address and port of the connection (see the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code class="module"><a href="/mod/mod_remoteip.html">mod_remoteip</a></code> module)</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr class="odd"><td><code>%A</code></td>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <td>Local IP-address and port</td></tr>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<tr><td><code>%{<em>name</em>}e</code></td>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <td>Request environment variable <em>name</em></td></tr>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<tr class="odd"><td><code>%E</code></td>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <td>APR/OS error status code and string</td></tr>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<tr><td><code>%F</code></td>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <td>Source file name and line number of the log call</td></tr>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<tr class="odd"><td><code>%{<em>name</em>}i</code></td>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <td>Request header <em>name</em></td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr><td><code>%k</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Number of keep-alive requests on this connection</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr class="odd"><td><code>%l</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Loglevel of the message</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr><td><code>%L</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Log ID of the request</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr class="odd"><td><code>%{c}L</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Log ID of the connection</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr><td><code>%{C}L</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr class="odd"><td><code>%m</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Name of the module logging the message</td></tr>
ce4dc40a4e87991087488f70d96d3447d7557294sf<tr><td><code>%M</code></td>
ce4dc40a4e87991087488f70d96d3447d7557294sf <td>The actual log message</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr class="odd"><td><code>%{<em>name</em>}n</code></td>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <td>Request note <em>name</em></td></tr>
10573a2de70ec898ec188946921fed2cb98622e5rbowen<tr><td><code>%P</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Process ID of current process</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr class="odd"><td><code>%T</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Thread ID of current thread</td></tr>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen<tr><td><code>%{g}T</code></td>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <td>System unique thread ID of current thread (the same ID as
2aa51ed61adb484602e94de3d2214ec267aecedbigalic displayed by e.g. <code>top</code>; currently Linux only)</td></tr>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen<tr class="odd"><td><code>%t</code></td>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <td>The current time</td></tr>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen<tr><td><code>%{u}t</code></td>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh <td>The current time including micro-seconds</td></tr>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen<tr class="odd"><td><code>%{cu}t</code></td>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <td>The current time in compact ISO 8601 format, including
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh micro-seconds</td></tr>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<tr><td><code>%v</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>The canonical <code class="directive"><a href="#servername">ServerName</a></code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic of the current server.</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<tr class="odd"><td><code>%V</code></td>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <td>The server name of the server serving the request according to the
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic setting.</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><td><code>\&nbsp;</code> (backslash space)</td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Non-field delimiting space</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr class="odd"><td><code>%&nbsp;</code> (percent space)</td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Field delimiter (no output)</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</table>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The log ID format <code>%L</code> produces a unique id for a connection
e302f38fd646764ce1a1e1c578d794aef514a9e5sf or request. This can be used to correlate which log lines belong to the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf same connection or request, which request happens on which connection.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf A <code>%L</code> format string is also available in
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code class="module"><a href="/mod/mod_log_config.html">mod_log_config</a></code>, to allow to correlate access log entries
e302f38fd646764ce1a1e1c578d794aef514a9e5sf with error log lines. If <code class="module"><a href="/mod/mod_unique_id.html">mod_unique_id</a></code> is loaded, its
a8ee031b2224ce5473826c9d4f603681589245fawrowe unique id will be used as log ID for requests.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <pre class="prettyprint lang-config">
a8ee031b2224ce5473826c9d4f603681589245fawrowe#Example (default format)
a8ee031b2224ce5473826c9d4f603681589245fawroweErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
a8ee031b2224ce5473826c9d4f603681589245fawrowe </pre>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>This would result in error messages such as:</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <div class="example"><p><code>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor [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
a8ee031b2224ce5473826c9d4f603681589245fawrowe </code></p></div>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>Notice that, as discussed above, some fields are omitted
a8ee031b2224ce5473826c9d4f603681589245fawrowe entirely because they are not defined.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <pre class="prettyprint lang-config">
a8ee031b2224ce5473826c9d4f603681589245fawrowe#Example (similar to the 2.2.x format)
a8ee031b2224ce5473826c9d4f603681589245fawroweErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
a8ee031b2224ce5473826c9d4f603681589245fawrowe </pre>
34b157732214cedcd129cd9fe7c4290757505d60minfrin
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
a8ee031b2224ce5473826c9d4f603681589245fawrowe <pre class="prettyprint lang-config">
a8ee031b2224ce5473826c9d4f603681589245fawrowe#Advanced example with request/connection log IDs
a8ee031b2224ce5473826c9d4f603681589245fawroweErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
a8ee031b2224ce5473826c9d4f603681589245fawroweErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
02c86afa991026c4146423dc84bc126e57d28df6wroweErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
34b157732214cedcd129cd9fe7c4290757505d60minfrinErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
34b157732214cedcd129cd9fe7c4290757505d60minfrinErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
34b157732214cedcd129cd9fe7c4290757505d60minfrin </pre>
34b157732214cedcd129cd9fe7c4290757505d60minfrin
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
003f0c9fda6664daf5092a0e42f65ede20098153slive<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/logs.html">Apache HTTP Server Log Files</a></li>
fec106c7688e279dfde4403bc3c935fec97c1d62sf</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
fec106c7688e279dfde4403bc3c935fec97c1d62sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Keep track of extended status information for each
fec106c7688e279dfde4403bc3c935fec97c1d62sfrequest</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ExtendedStatus On|Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener</table>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This option tracks additional data per worker about the
c976a7c7d20f2be319b128dd7d0b1568da224c0arbowen currently executing request, and a utilization summary; you
fb77c505254b6e9c925e23e734463e87574f8f40kess can see these variables during runtime by configuring
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="module"><a href="/mod/mod_status.html">mod_status</a></code>. Note that other modules may
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rely on this scoreboard.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>This setting applies to the entire server, and cannot be
530eba85dbd41b8a0fa5255d3648d1440199a661slive enabled or disabled on a virtualhost-by-virtualhost basis.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The collection of extended status information can slow down
530eba85dbd41b8a0fa5255d3648d1440199a661slive the server. Also note that this setting cannot be changed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive during a graceful restart.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note">
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>Note that loading <code class="module"><a href="/mod/mod_status.html">mod_status</a></code> will change
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the default behavior to ExtendedStatus On, while other
2aa51ed61adb484602e94de3d2214ec267aecedbigalic third party modules may do the same. Such modules rely on
530eba85dbd41b8a0fa5255d3648d1440199a661slive collecting detailed information about the state of all workers.
fb77c505254b6e9c925e23e734463e87574f8f40kess The default is changed by <code class="module"><a href="/mod/mod_status.html">mod_status</a></code> beginning
fb77c505254b6e9c925e23e734463e87574f8f40kess with version 2.3.6; the previous default was always Off.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File attributes used to create the ETag
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndHTTP response header for static files</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag MTime Size</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem<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
0db981f8fdfb62c5149efa079f0369b73d472d04rpluemearlier.</td></tr>
fec106c7688e279dfde4403bc3c935fec97c1d62sf</table>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <p>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem The <code class="directive">FileETag</code> directive configures the file
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem attributes that are used to create the <code>ETag</code> (entity
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem tag) response header field when the document is based on a static file.
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener (The <code>ETag</code> value is used in cache management to save
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor network bandwidth.) The
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code class="directive">FileETag</code> directive allows you to choose
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener which of these -- if any -- should be used. The recognized keywords are:
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener </p>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>INode</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The file's i-node number will be included in the calculation</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>MTime</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The date and time the file was last modified will be included</dd>
003f0c9fda6664daf5092a0e42f65ede20098153slive <dt><strong>Size</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The number of bytes in the file will be included</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><strong>All</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All available fields will be used. This is equivalent to:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">FileETag INode MTime Size</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</dd>
003f0c9fda6664daf5092a0e42f65ede20098153slive <dt><strong>None</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>If a document is file-based, no <code>ETag</code> field will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive included in the response</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess keywords may be prefixed with either <code>+</code> or <code>-</code>,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess which allow changes to be made to the default setting inherited
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess from a broader scope. Any keyword appearing without such a prefix
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess immediately and completely cancels the inherited setting.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If a directory's configuration includes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subdirectory's includes <code>FileETag&nbsp;-INode</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the setting for that subdirectory (which will be inherited by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any sub-subdirectories that don't override it) will be equivalent to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="warning"><h3>Warning</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Do not change the default for directories or locations that have WebDAV
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled and use <code class="module"><a href="/mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>MTime&nbsp;Size</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd as a fixed format for <code>ETag</code> comparisons on conditional requests.
fb77c505254b6e9c925e23e734463e87574f8f40kess These conditional requests will break if the <code>ETag</code> format is
062fa302e571fe5fcb2af6470f173fe71d3d041bhumbedooh changed via <code class="directive">FileETag</code>.
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh </div>
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh <div class="note"><h3>Server Side Includes</h3>
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh An ETag is not generated for responses parsed by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>,
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh since the response entity can change without a change of the INode, MTime, or Size
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh of the static file with embedded SSI directives.
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh </div>
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh</div>
062fa302e571fe5fcb2af6470f173fe71d3d041bhumbedooh<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
030108b1816bcda3d925df65357feabdce83bc94slive<div class="directive-section"><h2><a name="Files" id="Files">&lt;Files&gt;</a> <a name="files" id="files">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedoohfilenames</td></tr>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</code></td></tr>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive">&lt;Files&gt;</code> directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess limits the scope of the enclosed directives by filename. It is comparable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives. It should be matched with a <code>&lt;/Files&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive. The directives given within this section will be applied to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any object with a basename (last component of filename) matching the
fb77c505254b6e9c925e23e734463e87574f8f40kess specified filename. <code class="directive">&lt;Files&gt;</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess sections are processed in the order they appear in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location">&lt;Location&gt;</a></code> sections. Note
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess that <code class="directive">&lt;Files&gt;</code> can be nested
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess inside <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections to restrict the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess portion of the filesystem they apply to.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>filename</var> argument should include a filename, or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a wild-card string, where <code>?</code> matches any single character,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code>*</code> matches any sequences of characters.
003f0c9fda6664daf5092a0e42f65ede20098153slive <a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can also be used, with the addition of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive #...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Files&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch">&lt;FilesMatch&gt;</a></code> is preferred,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor however.</p>
030108b1816bcda3d925df65357feabdce83bc94slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Note that unlike <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> and <code class="directive"><a href="#location">&lt;Location&gt;</a></code> sections, <code class="directive">&lt;Files&gt;</code> sections can be used inside
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh <code>.htaccess</code> files. This allows users to control access to
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh their own files, at a file-by-file level.</p>
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin and &lt;Files&gt; sections work</a> for an explanation of how these
4dc1bd46d9e8353c0d312f7bfd53080ad2b86ed2sf different sections are combined when a request is received</li>
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin</ul>
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin</div>
ae382386f18506586972cdd63c09bb27a1685062nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin<div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch">&lt;FilesMatch&gt;</a> <a name="filesmatch" id="filesmatch">Directive</a></h2>
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin<table class="directive">
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrinfilenames</td></tr>
ae382386f18506586972cdd63c09bb27a1685062nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</code></td></tr>
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
ae382386f18506586972cdd63c09bb27a1685062nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive">&lt;FilesMatch&gt;</code> directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess limits the scope of the enclosed directives by filename, just as the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive"><a href="#files">&lt;Files&gt;</a></code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive does. However, it accepts a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expression</a>. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding # ...
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding&lt;/FilesMatch&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and &lt;Files&gt; sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be served with the specified
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemedia type in the HTTP Content-Type header field</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved to the core in Apache httpd 2.0</td></tr>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd</table>
7654193c1faf603feec999850322ad79e6c551bcnd <p>When placed into an <code>.htaccess</code> file or a
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, or
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="directive"><a href="#location">&lt;Location&gt;</a></code> or
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="directive"><a href="#files">&lt;Files&gt;</a></code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic section, this directive forces all matching files to be served
2aa51ed61adb484602e94de3d2214ec267aecedbigalic with the content type identification given by
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <var>media-type</var>. For example, if you had a directory full of
2aa51ed61adb484602e94de3d2214ec267aecedbigalic GIF files, but did not want to label them all with <code>.gif</code>,
2aa51ed61adb484602e94de3d2214ec267aecedbigalic you might want to use:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <pre class="prettyprint lang-config">ForceType image/gif</pre>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
439acee10571861c670c438038a62f90a08bf137covener
439acee10571861c670c438038a62f90a08bf137covener <p>Note that this directive overrides other indirect media type
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor associations defined in mime.types or via the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code>.</p>
439acee10571861c670c438038a62f90a08bf137covener
439acee10571861c670c438038a62f90a08bf137covener <p>You can also override more general
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">ForceType</code> settings
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by using the value of <code>None</code>:</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <pre class="prettyprint lang-config">
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener# force all files to be image/gif:
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener&lt;Location /images&gt;
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener ForceType image/gif
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener&lt;/Location&gt;
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener# but normal mime-type associations here:
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh&lt;Location /images/mixed&gt;
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener ForceType None
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener&lt;/Location&gt;
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener </pre>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>This directive primarily overrides the content types generated for
df5042f69eea159c73cd7b16542d4ca7d879b0b5trawick static files served out of the filesystem. For resources other than
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener static files, where the generator of the response typically specifies
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener a Content-Type, this directive has no effect.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory to write gmon.out profiling data to. </td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When the server has been compiled with gprof profiling support,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive">GprofDir</code> causes <code>gmon.out</code> files to
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick be written to the specified directory when the process exits. If the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive argument ends with a percent symbol ('%'), subdirectories are created
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for each process id.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive currently only works with the <code class="module"><a href="/mod/prefork.html">prefork</a></code>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd MPM.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HostnameLookups Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables DNS lookups so that host names can be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
fb77c505254b6e9c925e23e734463e87574f8f40kess The value <code>Double</code> refers to doing double-reverse
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd DNS lookup. That is, after a reverse lookup is performed, a forward
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd lookup is then performed on that result. At least one of the IP
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd addresses in the forward lookup must match the original
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd address. (In "tcpwrappers" terminology this is called
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen <code>PARANOID</code>.)</p>
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen <p>Regardless of the setting, when <code class="module"><a href="/mod/mod_authz_host.html">mod_authz_host</a></code> is
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen used for controlling access by hostname, a double reverse lookup
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen will be performed. This is necessary for security. Note that the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive result of this double-reverse isn't generally available unless you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set <code>HostnameLookups Double</code>. For example, if only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>HostnameLookups On</code> and a request is made to an object
750d12c59545dbbac70390988de94f7e901b08f2niq that is protected by hostname restrictions, regardless of whether
750d12c59545dbbac70390988de94f7e901b08f2niq the double-reverse fails or not, CGIs will still be passed the
750d12c59545dbbac70390988de94f7e901b08f2niq single-reverse result in <code>REMOTE_HOST</code>.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>The default is <code>Off</code> in order to save the network
750d12c59545dbbac70390988de94f7e901b08f2niq traffic for those sites that don't truly need the reverse
750d12c59545dbbac70390988de94f7e901b08f2niq lookups done. It is also better for the end users because they
750d12c59545dbbac70390988de94f7e901b08f2niq don't have to suffer the extra latency that a lookup entails.
750d12c59545dbbac70390988de94f7e901b08f2niq Heavily loaded sites should leave this directive
750d12c59545dbbac70390988de94f7e901b08f2niq <code>Off</code>, since DNS lookups can take considerable
750d12c59545dbbac70390988de94f7e901b08f2niq amounts of time. The utility <code class="program"><a href="/programs/logresolve.html">logresolve</a></code>, compiled by
750d12c59545dbbac70390988de94f7e901b08f2niq default to the <code>bin</code> subdirectory of your installation
750d12c59545dbbac70390988de94f7e901b08f2niq directory, can be used to look up host names from logged IP addresses
750d12c59545dbbac70390988de94f7e901b08f2niq offline.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>Finally, if you have <a href="mod_authz_host.html#reqhost">hostname-based Require
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh directives</a>, a hostname lookup will be performed regardless of
750d12c59545dbbac70390988de94f7e901b08f2niq the setting of <code>HostnameLookups</code>.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf</div>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<div class="directive-section"><h2><a name="If" id="If">&lt;If&gt;</a> <a name="if" id="if">Directive</a></h2>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<table class="directive">
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalicsatisfied by a request at runtime</td></tr>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;If <var>expression</var>&gt; ... &lt;/If&gt;</code></td></tr>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</table>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The <code class="directive">&lt;If&gt;</code> directive
6b15044d54a096e6323ff1540f1a491e8de7622dsf evaluates an expression at runtime, and applies the enclosed
ae382386f18506586972cdd63c09bb27a1685062nd directives if and only if the expression evaluates to true.
5d3e6446caba86f432b74a4427da122c3222332bcovener For example:</p>
5d3e6446caba86f432b74a4427da122c3222332bcovener
750d12c59545dbbac70390988de94f7e901b08f2niq <pre class="prettyprint lang-config">&lt;If "-z req('Host')"&gt;</pre>
750d12c59545dbbac70390988de94f7e901b08f2niq
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalic
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalic <p>would match HTTP/1.0 requests without a <var>Host:</var> header.
6b15044d54a096e6323ff1540f1a491e8de7622dsf Expressions may contain various shell-like operators for string
6b15044d54a096e6323ff1540f1a491e8de7622dsf comparison (<code>=</code>, <code>!=</code>, <code>&lt;</code>, ...),
750d12c59545dbbac70390988de94f7e901b08f2niq integer comparison (<code>-eq</code>, <code>-ne</code>, ...),
750d12c59545dbbac70390988de94f7e901b08f2niq and others (<code>-n</code>, <code>-z</code>, <code>-f</code>, ...).
750d12c59545dbbac70390988de94f7e901b08f2niq It is also possible to use regular expressions, </p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <pre class="prettyprint lang-config">&lt;If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"&gt;</pre>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>shell-like pattern matches and many other operations. These operations
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can be done on request headers (<code>req</code>), environment variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (<code>env</code>), and a large number of other properties. The full
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation is available in <a href="/expr.html">Expressions in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache HTTP Server</a>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/expr.html">Expressions in Apache HTTP Server</a>,
003f0c9fda6664daf5092a0e42f65ede20098153slivefor a complete reference and more examples.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#else">&lt;Else&gt;</a></code></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Files&gt; sections work</a> for an explanation of how these
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different sections are combined when a request is received.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">&lt;If&gt;</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">&lt;ElseIf&gt;</code>, and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">&lt;Else&gt;</code> are applied last.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="IfDefine" id="IfDefine">&lt;IfDefine&gt;</a> <a name="ifdefine" id="ifdefine">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveif a test is true at startup</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfDefine&gt;</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code> section is used to mark directives that are conditional. The
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl directives within an <code class="directive">&lt;IfDefine&gt;</code>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl section are only processed if the <var>test</var> is true. If <var>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl test</var> is false, everything between the start and end markers is
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl ignored.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>test</var> in the <code class="directive">&lt;IfDefine&gt;</code> section directive can be one of two forms:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><var>parameter-name</var></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <li><code>!</code><var>parameter-name</var></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </ul>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>In the former case, the directives between the start and end
2aa51ed61adb484602e94de3d2214ec267aecedbigalic markers are only processed if the parameter named
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <var>parameter-name</var> is defined. The second format reverses
2aa51ed61adb484602e94de3d2214ec267aecedbigalic the test, and only processes the directives if
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <var>parameter-name</var> is <strong>not</strong> defined.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The <var>parameter-name</var> argument is a define as given on the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="program"><a href="/programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p><code class="directive">&lt;IfDefine&gt;</code> sections are
2aa51ed61adb484602e94de3d2214ec267aecedbigalic nest-able, which can be used to implement simple
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive multiple-parameter tests. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>httpd -DReverseProxy -DUseCache -DMemCache ...</code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;IfDefine ReverseProxy&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule proxy_module modules/mod_proxy.so
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki LoadModule proxy_http_module modules/mod_proxy_http.so
55d36f9b61520c2374ab463e77e8a62daa416398nd &lt;IfDefine UseCache&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess LoadModule cache_module modules/mod_cache.so
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;IfDefine MemCache&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule mem_cache_module modules/mod_mem_cache.so
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfDefine&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive &lt;IfDefine !MemCache&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule cache_disk_module modules/mod_cache_disk.so
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfDefine&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/IfDefine&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess&lt;/IfDefine&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess </pre>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="IfModule" id="IfModule">&lt;IfModule&gt;</a> <a name="ifmodule" id="ifmodule">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivepresence or absence of a specific module</td></tr>
55d36f9b61520c2374ab463e77e8a62daa416398nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfModule&gt;</code></td></tr>
55d36f9b61520c2374ab463e77e8a62daa416398nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
55d36f9b61520c2374ab463e77e8a62daa416398nd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Module identifiers are available in version 2.1 and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenlater.</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
55d36f9b61520c2374ab463e77e8a62daa416398nd section is used to mark directives that are conditional on the presence of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a specific module. The directives within an <code class="directive">&lt;IfModule&gt;</code> section are only processed if the <var>test</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is true. If <var>test</var> is false, everything between the start and
55d36f9b61520c2374ab463e77e8a62daa416398nd end markers is ignored.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd <p>The <var>test</var> in the <code class="directive">&lt;IfModule&gt;</code> section directive can be one of two forms:</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd <ul>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <li><var>module</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>!<var>module</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p>In the former case, the directives between the start and end
bea526116133aa3d7dabd1924bfc580b37fbf22aslive markers are only processed if the module named <var>module</var>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive is included in Apache httpd -- either compiled in or
fb77c505254b6e9c925e23e734463e87574f8f40kess dynamically loaded using <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
bea526116133aa3d7dabd1924bfc580b37fbf22aslive and only processes the directives if <var>module</var> is
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <strong>not</strong> included.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>module</var> argument can be either the module identifier or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the file name of the module, at the time it was compiled. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>rewrite_module</code> is the identifier and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mod_rewrite.c</code> is the file name. If a module consists of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive several source files, use the name of the file containing the string
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>STANDARD20_MODULE_STUFF</code>.</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
003f0c9fda6664daf5092a0e42f65ede20098153slive <p><code class="directive">&lt;IfModule&gt;</code> sections are
003f0c9fda6664daf5092a0e42f65ede20098153slive nest-able, which can be used to implement simple multiple-module
003f0c9fda6664daf5092a0e42f65ede20098153slive tests.</p>
158222078a98fb13cddf2793b42f7eb8eafe51aerjung
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <div class="note">This section should only be used if you need to have one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file that works whether or not a specific module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is available. In normal operation, directives need not be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive placed in <code class="directive">&lt;IfModule&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections.</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
5b258a8d58679c6587757189339bb3c2d0488f93poirier</div>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<table class="directive">
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
cf8a8738330694e60bad421fcc8361d80b0e9124minfrinthe server configuration files</td></tr>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<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>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Wildcard matching available in 2.0.41 and later, directory
69d4a64874fd7161f80bb0484341c60857b6fd6esfwildcard matching available in 2.3.6 and later</td></tr>
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf</table>
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf <p>This directive allows inclusion of other configuration files
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf from within the server configuration files.</p>
03aa31ad82759363ba1a55589e517b16308ef635minfrin
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess in the filename or directory parts of the path to include several files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive at once, in alphabetical order. In addition, if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">Include</code> points to a directory, rather than a file,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache httpd will read all files in that directory and any subdirectory.
2aa51ed61adb484602e94de3d2214ec267aecedbigalic However, including entire directories is not recommended, because it is
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh easy to accidentally leave temporary files in a directory that can cause
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <code class="program"><a href="/programs/httpd.html">httpd</a></code> to fail. Instead, we encourage you to use the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic wildcard syntax shown below, to include files that match a particular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd pattern, such as *.conf, for example.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>The <code class="directive"><a href="#include">Include</a></code> directive will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <strong>fail with an error</strong> if a wildcard expression does not
2aa51ed61adb484602e94de3d2214ec267aecedbigalic match any file. The <code class="directive"><a href="#includeoptional">IncludeOptional</a></code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic directive can be used if non-matching wildcards should be ignored.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The file path specified may be an absolute path, or may be relative
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>Examples:</p>
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <pre class="prettyprint lang-config">
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedoohInclude /usr/local/apache2/conf/ssl.conf
cf8a8738330694e60bad421fcc8361d80b0e9124minfrinInclude /usr/local/apache2/conf/vhosts/*.conf
69d4a64874fd7161f80bb0484341c60857b6fd6esf </pre>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
03aa31ad82759363ba1a55589e517b16308ef635minfrin
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
69d4a64874fd7161f80bb0484341c60857b6fd6esf <pre class="prettyprint lang-config">
03aa31ad82759363ba1a55589e517b16308ef635minfrinInclude conf/ssl.conf
69d4a64874fd7161f80bb0484341c60857b6fd6esfInclude conf/vhosts/*.conf
69d4a64874fd7161f80bb0484341c60857b6fd6esf </pre>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
03aa31ad82759363ba1a55589e517b16308ef635minfrin
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>Wildcards may be included in the directory or file portion of the
69d4a64874fd7161f80bb0484341c60857b6fd6esf path. This example will fail if there is no subdirectory in conf/vhosts
69d4a64874fd7161f80bb0484341c60857b6fd6esf that contains at least one *.conf file:</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <pre class="prettyprint lang-config">Include conf/vhosts/*/*.conf</pre>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>Alternatively, the following command will just be ignored in case of
69d4a64874fd7161f80bb0484341c60857b6fd6esf missing files or directories:</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <pre class="prettyprint lang-config">IncludeOptional conf/vhosts/*/*.conf</pre>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf<h3>See also</h3>
69d4a64874fd7161f80bb0484341c60857b6fd6esf<ul>
69d4a64874fd7161f80bb0484341c60857b6fd6esf<li><code class="directive"><a href="#includeoptional">IncludeOptional</a></code></li>
03aa31ad82759363ba1a55589e517b16308ef635minfrin<li><code class="program"><a href="/programs/apachectl.html">apachectl</a></code></li>
03aa31ad82759363ba1a55589e517b16308ef635minfrin</ul>
69d4a64874fd7161f80bb0484341c60857b6fd6esf</div>
03aa31ad82759363ba1a55589e517b16308ef635minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
03aa31ad82759363ba1a55589e517b16308ef635minfrin<div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">Directive</a></h2>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe server configuration files</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.3.6 and later</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive allows inclusion of other configuration files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from within the server configuration files. It works identically to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#include">Include</a></code> directive, with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive exception that if wildcards do not match any file or directory, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#includeoptional">IncludeOptional</a></code> directive will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive silently ignored instead of causing an error.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#include">Include</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="program"><a href="/programs/apachectl.html">apachectl</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables HTTP persistent connections</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAlive On</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
59368b594c9b09b59ae58c7de26d2d5ce1c99a29takashi</table>
be192cefa381d5bae6868034687471754cb43175sf <p>The Keep-Alive extension to HTTP/1.0 and the persistent
891df99fdfa41fc8a486568f4d31ddf4a571258adreid connection feature of HTTP/1.1 provide long-lived HTTP sessions
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which allow multiple requests to be sent over the same TCP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connection. In some cases this has been shown to result in an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive almost 50% speedup in latency times for HTML documents with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive many images. To enable Keep-Alive connections, set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>KeepAlive On</code>.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>For HTTP/1.0 clients, Keep-Alive connections will only be
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick used if they are specifically requested by a client. In
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick addition, a Keep-Alive connection with an HTTP/1.0 client can
9f38f3ec3e8087985d108a24ae796962fef83644takashi only be used when the length of the content is known in
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick advance. This implies that dynamic content such as CGI output,
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick SSI pages, and server-generated directory listings will
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick generally not use Keep-Alive connections to HTTP/1.0 clients.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor For HTTP/1.1 clients, persistent connections are the default
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen unless otherwise specified. If the client requests it, chunked
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick encoding will be used in order to send content of unknown
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick length over persistent connections.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
9f38f3ec3e8087985d108a24ae796962fef83644takashi <p>When a client uses a Keep-Alive connection it will be counted
9f38f3ec3e8087985d108a24ae796962fef83644takashi as a single "request" for the <code class="directive"><a href="/mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code> directive, regardless
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick of how many requests are sent using the connection.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<h3>See also</h3>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<ul>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick</ul>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick</div>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<table class="directive">
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for subsequent
98f5034c8cbf2ef025b317b3e01acae82e143b11trawickrequests on a persistent connection</td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Specifying a value in milliseconds is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveApache httpd 2.3.2 and later</td></tr>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The number of seconds Apache httpd will wait for a subsequent
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd request before closing the connection. By adding a postfix of ms the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive timeout can be also set in milliseconds. Once a request has been
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive received, the timeout value specified by the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may cause performance problems in heavily loaded servers. The
130d299c4b2b15be45532a176604c71fdc7bea5bnd higher the timeout, the more server processes will be kept
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive occupied waiting on connections with idle clients.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In a name-based virtual host context, the value of the first
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive defined virtual host best matching the local IP and port will be used.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="directive-section"><h2><a name="Limit" id="Limit">&lt;Limit&gt;</a> <a name="limit" id="limit">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP
2aa51ed61adb484602e94de3d2214ec267aecedbigalicmethods</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
2aa51ed61adb484602e94de3d2214ec267aecedbigalic &lt;/Limit&gt;</code></td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</table>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd <p>Access controls are normally effective for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <strong>all</strong> access methods, and this is the usual
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd desired behavior. <strong>In the general case, access control
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directives should not be placed within a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">&lt;Limit&gt;</code> section.</strong></p>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>The purpose of the <code class="directive">&lt;Limit&gt;</code>
750d12c59545dbbac70390988de94f7e901b08f2niq directive is to restrict the effect of the access controls to the
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive nominated HTTP methods. For all other methods, the access
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive restrictions that are enclosed in the <code class="directive">&lt;Limit&gt;</code> bracket <strong>will have no
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive effect</strong>. The following example applies the access control
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd only to the methods <code>POST</code>, <code>PUT</code>, and
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>DELETE</code>, leaving all other methods unprotected:</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <pre class="prettyprint lang-config">
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive&lt;Limit POST PUT DELETE&gt;
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd Require valid-user
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd&lt;/Limit&gt;
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </pre>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>The method names listed can be one or more of: <code>GET</code>,
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>CONNECT</code>, <code>OPTIONS</code>,
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd case-sensitive.</strong> If <code>GET</code> is used it will also
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd restrict <code>HEAD</code> requests. The <code>TRACE</code> method
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <div class="warning">A <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section should always be
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd used in preference to a <code class="directive">&lt;Limit&gt;</code>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd section when restricting access, since a <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section provides protection
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd against arbitrary methods.</div>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The <code class="directive">&lt;Limit&gt;</code> and
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic directives may be nested. In this case, each successive level of
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="directive">&lt;Limit&gt;</code> or <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> directives must
2aa51ed61adb484602e94de3d2214ec267aecedbigalic further restrict the set of methods to which access controls apply.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <div class="warning">When using
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="directive">&lt;Limit&gt;</code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">&lt;LimitExcept&gt;</code> directives with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code> directive,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive note that the first <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to succeed authorizes the request, regardless of the presence of other
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code> directives.</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For example, given the following configuration, all users will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd be authorized for <code>POST</code> requests, and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Require group editors</code> directive will be ignored
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd in all cases:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;LimitExcept GET&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require valid-user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/LimitExcept&gt;
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen&lt;Limit POST&gt;
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen Require group editors
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess&lt;/Limit&gt;
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept">&lt;LimitExcept&gt;</a> <a name="limitexcept" id="limitexcept">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<table class="directive">
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods
2aa51ed61adb484602e94de3d2214ec267aecedbigalicexcept the named ones</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
2aa51ed61adb484602e94de3d2214ec267aecedbigalic &lt;/LimitExcept&gt;</code></td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive">&lt;LimitExcept&gt;</code> and
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <code>&lt;/LimitExcept&gt;</code> are used to enclose
03e0a375c2435102fb2b51e34cccff52acbfddcdnd a group of access control directives which will then apply to any
03e0a375c2435102fb2b51e34cccff52acbfddcdnd HTTP access method <strong>not</strong> listed in the arguments;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd i.e., it is the opposite of a <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> section and can be used to control
03e0a375c2435102fb2b51e34cccff52acbfddcdnd both standard and nonstandard/unrecognized methods. See the
03e0a375c2435102fb2b51e34cccff52acbfddcdnd documentation for <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> for more details.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>For example:</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <pre class="prettyprint lang-config">
03e0a375c2435102fb2b51e34cccff52acbfddcdnd&lt;LimitExcept POST GET&gt;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd Require valid-user
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;/LimitExcept&gt;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </pre>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</div>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<table class="directive">
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine maximum number of internal redirects and nested
03e0a375c2435102fb2b51e34cccff52acbfddcdndsubrequests</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.0.47 and later</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</table>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>An internal redirect happens, for example, when using the <code class="directive"><a href="/mod/mod_actions.html#action">Action</a></code> directive, which internally
03e0a375c2435102fb2b51e34cccff52acbfddcdnd redirects the original request to a CGI script. A subrequest is Apache httpd's
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mechanism to find out what would happen for some URI if it were requested.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For example, <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive files listed in the <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive">LimitInternalRecursion</code> prevents the server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from crashing when entering an infinite loop of internal redirects or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subrequests. Such loops are usually caused by misconfigurations.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The directive stores two different limits, which are evaluated on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive per-request basis. The first <var>number</var> is the maximum number of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive internal redirects, that may follow each other. The second <var>number</var>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd determines, how deep subrequests may be nested. If you specify only one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>number</var>, it will be assigned to both limits.</p>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener <pre class="prettyprint lang-config">LimitInternalRecursion 5</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefrom the client</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 0</code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var> from 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (meaning unlimited) to 2147483647 (2GB) that are allowed in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request body. See the note below for the limited applicability
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen to proxy requests.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive">LimitRequestBody</code> directive allows
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the user to set a limit on the allowed size of an HTTP request
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen message body within the context in which the directive is given
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh (server, per-directory, per-file or per-location). If the client
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor request exceeds that limit, the server will return an error
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor response instead of servicing the request. The size of a normal
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener request message body will vary greatly depending on the nature of
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener the resource and the methods allowed on that resource. CGI scripts
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen typically use the message body for retrieving form information.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Implementations of the <code>PUT</code> method will require
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a value at least as large as any representation that the server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wishes to accept for that resource.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
e0ef044feba0082771091af42798cada5bb1f4fcrbowen <p>If, for example, you are permitting file upload to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive location, and wish to limit the size of the uploaded file to 100K,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might use the following directive:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">LimitRequestBody 102400</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><p>For a full description of how this directive is interpreted by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive proxy requests, see the <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> documentation.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of HTTP request header fields that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewill be accepted from the client</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFields 100</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>Number</var> is an integer from 0 (meaning unlimited) to
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen 32767. The default value is defined by the compile-time
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen distributed).</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <code class="directive">LimitRequestFields</code> directive allows
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener the server administrator to modify the limit on the number of
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor request header fields allowed in an HTTP request. A server needs
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener this value to be larger than the number of fields that a normal
f23a27021f46cd18a69e0715d7280a735582163bhumbedooh client request might include. The number of request header fields
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener used by a client rarely exceeds 20, but this may vary among
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener different client implementations, often depending upon the extent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to which a user has configured their browser to support detailed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content negotiation. Optional HTTP extensions are often expressed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using request header fields.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service attacks.
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen The value should be increased if normal clients see an error
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen response from the server that indicates too many fields were
e0ef044feba0082771091af42798cada5bb1f4fcrbowen sent in the request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
72580dbc2a55511f13f377063725b9f143b20826stoddard
72580dbc2a55511f13f377063725b9f143b20826stoddard <pre class="prettyprint lang-config">LimitRequestFields 50</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen <div class="warning"><h3>Warning</h3>
72580dbc2a55511f13f377063725b9f143b20826stoddard <p> When name-based virtual hosting is used, the value for this
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directive is taken from the default (first-listed) virtual host for the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor local IP and port combination</p>.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </div>
72580dbc2a55511f13f377063725b9f143b20826stoddard
56d7eed7205462540aec7202cd82d9f5516fc537kess
72580dbc2a55511f13f377063725b9f143b20826stoddard</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of the HTTP request header allowed from the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenclient</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
0d5d5dc11ad29fca835d0967d2fb98ad3977d511sf</table>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This directive specifies the number of <var>bytes</var>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener that will be allowed in an HTTP request header.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>The <code class="directive">LimitRequestFieldSize</code> directive
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener allows the server administrator to set the limit
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener on the allowed size of an HTTP request header field. A server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive needs this value to be large enough to hold any one header field
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from a normal client request. The size of a normal request header
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive field will vary greatly among different client implementations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive often depending upon the extent to which a user has configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive their browser to support detailed content negotiation. SPNEGO
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication headers can be up to 12392 bytes.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
e0ef044feba0082771091af42798cada5bb1f4fcrbowen useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
72580dbc2a55511f13f377063725b9f143b20826stoddard <pre class="prettyprint lang-config">LimitRequestFieldSize 4094</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen <div class="note">Under normal conditions, the value should not be changed from
72580dbc2a55511f13f377063725b9f143b20826stoddard the default. Also, you can't set this higher than 8190 without
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modifying the source code and rebuilding.</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="warning"><h3>Warning</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p> When name-based virtual hosting is used, the value for this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is taken from the default (first-listed) virtual host best
fb77c505254b6e9c925e23e734463e87574f8f40kess matching the current IP address and port combination.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<table class="directive">
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limit the size of the HTTP request line that will be accepted
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedoohfrom the client</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener</table>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>This directive sets the number of <var>bytes</var> that will be
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim allowed on the HTTP request-line.</p>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <p>The <code class="directive">LimitRequestLine</code> directive allows
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener the server administrator to set the limit on the allowed size
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of a client's HTTP request-line. Since the request-line consists of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive HTTP method, URI, and protocol version, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">LimitRequestLine</code> directive places a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restriction on the length of a request-URI allowed for a request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on the server. A server needs this value to be large enough to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive hold any of its resource names, including any information that
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess might be passed in the query part of a <code>GET</code> request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>This directive gives the server administrator greater
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele control over abnormal client request behavior, which may be
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">LimitRequestLine 4094</pre>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <div class="note">Under normal conditions, the value should not be changed from
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh the default. Also, you can't set this higher than 8190 without
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen modifying the source and rebuilding.</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="warning"><h3>Warning</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p> When name-based virtual hosting is used, the value for this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is taken from the default (first-listed) virtual host best
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive matching the current IP address and port combination.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of an XML-based request body</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Limit (in bytes) on maximum size of an XML-based request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive body. A value of <code>0</code> will disable any checking.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Example:</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <pre class="prettyprint lang-config">LimitXMLRequestBody 0</pre>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive</div>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d950cf9262224a223e2ff5c51393708071e14b94covener<div class="directive-section"><h2><a name="Location" id="Location">&lt;Location&gt;</a> <a name="location" id="location">Directive</a></h2>
d950cf9262224a223e2ff5c51393708071e14b94covener<table class="directive">
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching
d950cf9262224a223e2ff5c51393708071e14b94covenerURLs</td></tr>
d950cf9262224a223e2ff5c51393708071e14b94covener<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Location
d950cf9262224a223e2ff5c51393708071e14b94covener <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</code></td></tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
d950cf9262224a223e2ff5c51393708071e14b94covener<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
d950cf9262224a223e2ff5c51393708071e14b94covener<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor</table>
d950cf9262224a223e2ff5c51393708071e14b94covener <p>The <code class="directive">&lt;Location&gt;</code> directive
d950cf9262224a223e2ff5c51393708071e14b94covener limits the scope of the enclosed directives by URL. It is similar to the
d950cf9262224a223e2ff5c51393708071e14b94covener <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic directive, and starts a subsection which is terminated with a
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>&lt;/Location&gt;</code> directive. <code class="directive">&lt;Location&gt;</code> sections are processed in the
d950cf9262224a223e2ff5c51393708071e14b94covener order they appear in the configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.</p>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p><code class="directive">&lt;Location&gt;</code> sections operate
2aa51ed61adb484602e94de3d2214ec267aecedbigalic completely outside the filesystem. This has several consequences.
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh Most importantly, <code class="directive">&lt;Location&gt;</code>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh directives should not be used to control access to filesystem
2aa51ed61adb484602e94de3d2214ec267aecedbigalic locations. Since several different URLs may map to the same
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic filesystem location, such access controls may by circumvented.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
d950cf9262224a223e2ff5c51393708071e14b94covener <p>The enclosed directives will be applied to the request if the path component
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor of the URL meets <em>any</em> of the following criteria:
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic </p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <ul>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <li>The specified location matches exactly the path component of the URL.
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh </li>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <li>The specified location, which ends in a forward slash, is a prefix
2aa51ed61adb484602e94de3d2214ec267aecedbigalic of the path component of the URL (treated as a context root).
d950cf9262224a223e2ff5c51393708071e14b94covener </li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <li>The specified location, with the addition of a trailing slash, is a
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive prefix of the path component of the URL (also treated as a context root).
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </li>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </ul>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive In the example below, where no trailing slash is used, requests to
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive /private1, /private1/ and /private1/file.txt will have the enclosed
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive directives applied, but /private1other would not.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <pre class="prettyprint lang-config">
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive&lt;Location /private1&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...
dc223428958ad9ff05011545bcdda000887b93e5slive&lt;/Location&gt;
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj </pre>
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj
dc223428958ad9ff05011545bcdda000887b93e5slive <p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive In the example below, where a trailing slash is used, requests to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /private2/ and /private2/file.txt will have the enclosed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives applied, but /private2 and /private2other would not.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <pre class="prettyprint lang-config">
d8c44cd75cf575fe51319280c12445109e878523noodl&lt;Location /private2<em>/</em>&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...
030108b1816bcda3d925df65357feabdce83bc94slive&lt;/Location&gt;
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </pre>
37742b630743e470b94618ecb3560fbd82e50b59rbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <div class="note"><h3>When to use <code class="directive">&lt;Location&gt;</code></h3>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <p>Use <code class="directive">&lt;Location&gt;</code> to apply
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh directives to content that lives outside the filesystem. For
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;Location /&gt;</code>, which is an easy way to
fb77c505254b6e9c925e23e734463e87574f8f40kess apply a configuration to the entire server.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For all origin (non-proxy) requests, the URL to be matched is a
37742b630743e470b94618ecb3560fbd82e50b59rbowen URL-path of the form <code>/path/</code>. <em>No scheme, hostname,
37742b630743e470b94618ecb3560fbd82e50b59rbowen port, or query string may be included.</em> For proxy requests, the
37742b630743e470b94618ecb3560fbd82e50b59rbowen URL to be matched is of the form
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>scheme://servername/path</code>, and you must include the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive prefix.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any single character, and <code>*</code> matches any sequences of
e8811b6d38f756b325446ded5d96857d13856511takashi characters. Neither wildcard character matches a / in the URL-path.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic can also be used, with the addition of the <code>~</code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic character. For example:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <pre class="prettyprint lang-config">
2aa51ed61adb484602e94de3d2214ec267aecedbigalic&lt;Location ~ "/(extra|special)/data"&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd #...
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;/Location&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</pre>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
05201775eaa6b363b8a119c8aea5db246b967591yoshiki <p>would match URLs that contained the substring <code>/extra/data</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code> behaves
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd identical to the regex version of <code class="directive">&lt;Location&gt;</code>, and is preferred, for the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd simple reason that <code>~</code> is hard to distinguish from
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>-</code> in many fonts.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive">&lt;Location&gt;</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd functionality is especially useful when combined with the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><a href="#sethandler">SetHandler</a></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive. For example, to enable status requests, but allow them
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd only from browsers at <code>example.com</code>, you might use:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <pre class="prettyprint lang-config">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;Location /status&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd SetHandler server-status
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Require host example.com
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
37742b630743e470b94618ecb3560fbd82e50b59rbowen <div class="note"><h3>Note about / (slash)</h3>
37742b630743e470b94618ecb3560fbd82e50b59rbowen <p>The slash character has special meaning depending on where in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL it appears. People may be used to its behavior in the filesystem
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where multiple adjacent slashes are frequently collapsed to a single
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/foo</code>). In URL-space this is not necessarily true.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess The <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive and the regex version of <code class="directive">&lt;Location&gt;</code> require you to explicitly specify multiple
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slashes if that is your intention.</p>
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the request URL <code>/abc</code> but not the request URL <code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive //abc</code>. The (non-regex) <code class="directive">&lt;Location&gt;</code> directive behaves similarly when used for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive proxy requests. But when (non-regex) <code class="directive">&lt;Location&gt;</code> is used for non-proxy requests it will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive implicitly match multiple slashes with a single slash. For example,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess if you specify <code>&lt;Location /abc/def&gt;</code> and the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess request is to <code>/abc//def</code> then it will match.</p>
030108b1816bcda3d925df65357feabdce83bc94slive </div>
030108b1816bcda3d925df65357feabdce83bc94slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<ul>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh and &lt;Files&gt; sections work</a> for an explanation of how these
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh different sections are combined when a request is received.</li>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch">&lt;LocationMatch&gt;</a> <a name="locationmatch" id="locationmatch">Directive</a></h2>
4dc1bd46d9e8353c0d312f7bfd53080ad2b86ed2sf<table class="directive">
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrinmatching URLs</td></tr>
ae382386f18506586972cdd63c09bb27a1685062nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LocationMatch
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</code></td></tr>
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin</table>
eab364dc817e6d2f9179d0ecbd269d02df6f383cminfrin <p>The <code class="directive">&lt;LocationMatch&gt;</code> directive
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin limits the scope of the enclosed directives by URL, in an identical manner
4dee1345ce2dd104902dc895dc99b7b81ac3b43fminfrin to <code class="directive"><a href="#location">&lt;Location&gt;</a></code>. However,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it takes a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular expression</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as an argument instead of a simple string. For example:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <pre class="prettyprint lang-config">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess&lt;LocationMatch "/(extra|special)/data"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/LocationMatch&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>would match URLs that contained the substring <code>/extra/data</code>
7fbd7281d06cec1918aa370214df77c572f871a9sf or <code>/special/data</code>.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
7fbd7281d06cec1918aa370214df77c572f871a9sf<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and &lt;Files&gt; sections work</a> for an explanation of how these
7fbd7281d06cec1918aa370214df77c572f871a9sf different sections are combined when a request is received</li>
7fbd7281d06cec1918aa370214df77c572f871a9sf</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel [<var>module</var>:]<var>level</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive [<var>module</var>:<var>level</var>] ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</code></td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LogLevel warn</code></td></tr>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Per-module and per-directory configuration is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache HTTP Server 2.3.6 and later</td></tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive">LogLevel</code> adjusts the verbosity of the
530eba85dbd41b8a0fa5255d3648d1440199a661slive messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>level</var>s are available, in order of decreasing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive significance:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <table class="bordered">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Level</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Description</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Example</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>emerg</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Emergencies - system is unusable.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Child cannot open lock file. Exiting"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>alert</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Action must be taken immediately.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"getpwuid: couldn't determine user name from uid"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>crit</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Critical Conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"socket: Failed to get a socket, exiting child"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>error</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Error conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Premature end of script headers"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>warn</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Warning conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"child process 1234 did not exit, sending another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SIGHUP"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>notice</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Normal but significant condition.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"httpd: caught SIGBUS, attempting to dump core in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>info</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Informational.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"Server seems busy, (you may need to increase
7fbd7281d06cec1918aa370214df77c572f871a9sf StartServers, or Min/MaxSpareServers)..."</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>debug</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Debug-level messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"Opening config file ..."</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace1</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"proxy: FTP: control connection complete"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace2</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace3</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"openssl: Handshake: start"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace4</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace5</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"map lookup FAILED: map=rewritemap key=keyname"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace6</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"cache lookup FAILED, forcing new map lookup"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace7</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Trace messages, dumping large amounts of data</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>trace8</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Trace messages, dumping large amounts of data</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </table>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <p>When a particular level is specified, messages from all
8b052d682204371decc64f942aede5ef1da98955erikabele other levels of higher significance will be reported as well.
8b052d682204371decc64f942aede5ef1da98955erikabele <em>E.g.</em>, when <code>LogLevel info</code> is specified,
8b052d682204371decc64f942aede5ef1da98955erikabele then messages with log levels of <code>notice</code> and
8b052d682204371decc64f942aede5ef1da98955erikabele <code>warn</code> will also be posted.</p>
8b052d682204371decc64f942aede5ef1da98955erikabele
8b052d682204371decc64f942aede5ef1da98955erikabele <p>Using a level of at least <code>crit</code> is
8b052d682204371decc64f942aede5ef1da98955erikabele recommended.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>For example:</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <pre class="prettyprint lang-config">LogLevel notice</pre>
7fbd7281d06cec1918aa370214df77c572f871a9sf
fd410ae1fa431e734e6d0cd3c006002d4904466apoirier
7fbd7281d06cec1918aa370214df77c572f871a9sf <div class="note"><h3>Note</h3>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>When logging to a regular file messages of the level
7fbd7281d06cec1918aa370214df77c572f871a9sf <code>notice</code> cannot be suppressed and thus are always
2aa51ed61adb484602e94de3d2214ec267aecedbigalic logged. However, this doesn't apply when logging is done
2aa51ed61adb484602e94de3d2214ec267aecedbigalic using <code>syslog</code>.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </div>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Specifying a level without a module name will reset the level
7fbd7281d06cec1918aa370214df77c572f871a9sf for all modules to that level. Specifying a level with a module
7fbd7281d06cec1918aa370214df77c572f871a9sf name will set the level for that module only. It is possible to
7fbd7281d06cec1918aa370214df77c572f871a9sf use the module source file name, the module identifier, or the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic module identifier with the trailing <code>_module</code> omitted
2aa51ed61adb484602e94de3d2214ec267aecedbigalic as module specification. This means the following three specifications
2aa51ed61adb484602e94de3d2214ec267aecedbigalic are equivalent:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <pre class="prettyprint lang-config">
2aa51ed61adb484602e94de3d2214ec267aecedbigalicLogLevel info ssl:warn
7fbd7281d06cec1918aa370214df77c572f871a9sfLogLevel info mod_ssl.c:warn
7fbd7281d06cec1918aa370214df77c572f871a9sfLogLevel info ssl_module:warn
7fbd7281d06cec1918aa370214df77c572f871a9sf </pre>
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf <p>It is also possible to change the level per directory:</p>
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf <pre class="prettyprint lang-config">
7fbd7281d06cec1918aa370214df77c572f871a9sfLogLevel info
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/usr/local/apache/htdocs/app"&gt;
bd3f5647b96d378d9c75c954e3f13582af32c643sf LogLevel debug
bd3f5647b96d378d9c75c954e3f13582af32c643sf&lt;/Directory&gt;
bd3f5647b96d378d9c75c954e3f13582af32c643sf </pre>
ef33fd96380229019f53a9ed1f2bcfeb5f9e99c8rbowen
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf <div class="note">
bd3f5647b96d378d9c75c954e3f13582af32c643sf Per directory loglevel configuration only affects messages that are
bd3f5647b96d378d9c75c954e3f13582af32c643sf logged after the request has been parsed and that are associated with
bd3f5647b96d378d9c75c954e3f13582af32c643sf the request. Log messages which are associated with the connection or
bd3f5647b96d378d9c75c954e3f13582af32c643sf the server are not affected.
bd3f5647b96d378d9c75c954e3f13582af32c643sf </div>
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf</div>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<table class="directive">
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
bd3f5647b96d378d9c75c954e3f13582af32c643sfconnection</td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf</table>
bd3f5647b96d378d9c75c954e3f13582af32c643sf <p>The <code class="directive">MaxKeepAliveRequests</code> directive
bd3f5647b96d378d9c75c954e3f13582af32c643sf limits the number of requests allowed per connection when
bd3f5647b96d378d9c75c954e3f13582af32c643sf <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
bd3f5647b96d378d9c75c954e3f13582af32c643sf set to <code>0</code>, unlimited requests will be allowed. We
bd3f5647b96d378d9c75c954e3f13582af32c643sf recommend that this setting be kept to a high value for maximum
bd3f5647b96d378d9c75c954e3f13582af32c643sf server performance.</p>
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf <p>For example:</p>
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf <pre class="prettyprint lang-config">MaxKeepAliveRequests 500</pre>
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sf</div>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Directive</a></h2>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<table class="directive">
bd3f5647b96d378d9c75c954e3f13582af32c643sf<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
bd3f5647b96d378d9c75c954e3f13582af32c643sf resource </td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<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>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
bd3f5647b96d378d9c75c954e3f13582af32c643sf</table>
bd3f5647b96d378d9c75c954e3f13582af32c643sf <p>The <code class="directive">MaxRangeOverlaps</code> directive
bd3f5647b96d378d9c75c954e3f13582af32c643sf limits the number of overlapping HTTP ranges the server is willing to
bd3f5647b96d378d9c75c954e3f13582af32c643sf return to the client. If more overlapping ranges then permitted are requested,
bd3f5647b96d378d9c75c954e3f13582af32c643sf the complete resource is returned instead.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>default</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Limits the number of overlapping ranges to a compile-time default of 20.</dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>none</strong></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>No overlapping Range headers are allowed.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <dt><strong>unlimited</strong></dt>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <dd>The server does not limit the number of overlapping ranges it is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive willing to satisfy.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><var>number-of-ranges</var></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>A positive number representing the maximum number of overlapping ranges the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server is willing to satisfy.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<table class="directive">
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource </td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeReversals 20</code></td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener</table>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <p>The <code class="directive">MaxRangeReversals</code> directive
6beba165aeced2ca77a6f1593ee08c47a32099efcovener limits the number of HTTP Range reversals the server is willing to
6beba165aeced2ca77a6f1593ee08c47a32099efcovener return to the client. If more ranges reversals then permitted are requested,
6beba165aeced2ca77a6f1593ee08c47a32099efcovener the complete resource is returned instead.</p>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dl>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dt><strong>default</strong></dt>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dd>Limits the number of range reversals to a compile-time default of 20.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
58b9535e3bb43a83241a338b099671f8b69a4406igalic <dt><strong>none</strong></dt>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dd>No Range reversals headers are allowed.</dd>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><strong>unlimited</strong></dt>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <dd>The server does not limit the number of range reversals it is
7a975d0413ba303546b7619e4785cb641f7f09fdcovener willing to satisfy.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <dt><var>number-of-ranges</var></dt>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <dd>A positive number representing the maximum number of range reversals the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim server is willing to satisfy.</dd>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener </dl>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener
7a975d0413ba303546b7619e4785cb641f7f09fdcovener</div>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Directive</a></h2>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<table class="directive">
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of ranges allowed before returning the complete
7a975d0413ba303546b7619e4785cb641f7f09fdcovenerresource </td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<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>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRanges 200</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim</table>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>The <code class="directive">MaxRanges</code> directive
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim limits the number of HTTP ranges the server is willing to
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim return to the client. If more ranges then permitted are requested,
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim the complete resource is returned instead.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dl>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><strong>default</strong></dt>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dd>Limits the number of ranges to a compile-time default of 200.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><strong>none</strong></dt>
af74ace3ea142acfa02d445cf72efc629e080f66igalic <dd>Range headers are ignored.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><strong>unlimited</strong></dt>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dd>The server does not limit the number of ranges it is
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim willing to satisfy.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><var>number-of-ranges</var></dt>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dd>A positive number representing the maximum number of ranges the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim server is willing to satisfy.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </dl>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim</div>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Directive</a></h2>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<table class="directive">
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures mutex mechanism and lock file directory for all
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjimor specified mutexes</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</code></td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Mutex default</code></td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim</table>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>The <code class="directive">Mutex</code> directive sets the mechanism,
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim and optionally the lock file location, that httpd and modules use
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim to serialize access to resources. Specify <code>default</code> as
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim the first argument to change the settings for all mutexes; specify
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim a mutex name (see table below) as the first argument to override
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim defaults only for that mutex.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>The <code class="directive">Mutex</code> directive is typically used in
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim the following exceptional situations:</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <ul>
af74ace3ea142acfa02d445cf72efc629e080f66igalic <li>change the mutex mechanism when the default mechanism selected
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim by <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a> has a functional or performance
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim problem</li>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <li>change the directory used by file-based mutexes when the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim default directory does not support locking</li>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </ul>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <div class="note"><h3>Supported modules</h3>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>This directive only configures mutexes which have been registered
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim with the core server using the <code>ap_mutex_register()</code> API.
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim All modules bundled with httpd support the <code class="directive">Mutex</code>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim directive, but third-party modules may not. Consult the documentation
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim of the third-party module, which must indicate the mutex name(s) which
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim can be configured if this directive is supported.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </div>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>The following mutex <em>mechanisms</em> are available:</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <ul>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <li><code>default | yes</code>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>This selects the default locking implementation, as determined by
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a>. The default locking implementation can
a0fed3e26656887c8458aa1081d516d08ced3c84trawick be displayed by running <code class="program"><a href="/programs/httpd.html">httpd</a></code> with the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>-V</code> option.</p></li>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <li><code>none | no</code>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This effectively disables the mutex, and is only allowed for a
a0fed3e26656887c8458aa1081d516d08ced3c84trawick mutex if the module indicates that it is a valid choice. Consult the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen module documentation for more information.</p></li>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <li><code>posixsem</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This is a mutex variant based on a Posix semaphore.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <div class="warning"><h3>Warning</h3>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The semaphore ownership is not recovered if a thread in the process
a0fed3e26656887c8458aa1081d516d08ced3c84trawick holding the mutex segfaults, resulting in a hang of the web server.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </div>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </li>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <li><code>sysvsem</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <div class="warning"><h3>Warning</h3>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>It is possible to "leak" SysV semaphores if processes crash
a0fed3e26656887c8458aa1081d516d08ced3c84trawick before the semaphore is removed.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </div>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <div class="warning"><h3>Security</h3>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The semaphore API allows for a denial of service attack by any
a0fed3e26656887c8458aa1081d516d08ced3c84trawick CGIs running under the same uid as the webserver (<em>i.e.</em>,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick all CGIs, unless you use something like <code class="program"><a href="/programs/suexec.html">suexec</a></code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick or <code>cgiwrapper</code>).</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </div>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </li>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <li><code>sem</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This selects the "best" available semaphore implementation, choosing
a0fed3e26656887c8458aa1081d516d08ced3c84trawick between Posix and SystemV IPC semaphores, in that order.</p></li>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <li><code>pthread</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This is a mutex variant based on cross-process Posix thread
a0fed3e26656887c8458aa1081d516d08ced3c84trawick mutexes.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <div class="warning"><h3>Warning</h3>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>On most systems, if a child process terminates abnormally while
a0fed3e26656887c8458aa1081d516d08ced3c84trawick holding a mutex that uses this implementation, the server will deadlock
a0fed3e26656887c8458aa1081d516d08ced3c84trawick and stop responding to requests. When this occurs, the server will
a0fed3e26656887c8458aa1081d516d08ced3c84trawick require a manual restart to recover.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Solaris is a notable exception as it provides a mechanism which
a0fed3e26656887c8458aa1081d516d08ced3c84trawick usually allows the mutex to be recovered after a child process
a0fed3e26656887c8458aa1081d516d08ced3c84trawick terminates abnormally while holding a mutex.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>If your system implements the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick to use the <code>pthread</code> option safely.</p>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick </div>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick </li>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <li><code>fcntl:/path/to/mutex</code>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>This is a mutex variant where a physical (lock-)file and the
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <code>fcntl()</code> function are used as the mutex.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <div class="warning"><h3>Warning</h3>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>When multiple mutexes based on this mechanism are used within
a0fed3e26656887c8458aa1081d516d08ced3c84trawick multi-threaded, multi-process environments, deadlock errors (EDEADLK)
a0fed3e26656887c8458aa1081d516d08ced3c84trawick can be reported for valid mutex operations if <code>fcntl()</code>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor is not thread-aware, such as on Solaris.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </div>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </li>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <li><code>flock:/path/to/mutex</code>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick with the exception that the <code>flock()</code> function is used to
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick provide file locking.</p></li>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <li><code>file:/path/to/mutex</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This selects the "best" available file locking implementation,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick choosing between <code>fcntl</code> and <code>flock</code>, in that
a0fed3e26656887c8458aa1081d516d08ced3c84trawick order.</p></li>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </ul>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Most mechanisms are only available on selected platforms, where the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick underlying platform and <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a> support it. Mechanisms
a0fed3e26656887c8458aa1081d516d08ced3c84trawick which aren't available on all platforms are <em>posixsem</em>,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <em>flock</em>, and <em>file</em>.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the path, if provided, is a directory where the lock file will be created.
a0fed3e26656887c8458aa1081d516d08ced3c84trawick The default directory is httpd's run-time file directory relative to
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code class="directive"><a href="#serverroot">ServerRoot</a></code>. Always use a local disk
a0fed3e26656887c8458aa1081d516d08ced3c84trawick filesystem for <code>/path/to/mutex</code> and never a directory residing
a0fed3e26656887c8458aa1081d516d08ced3c84trawick on a NFS- or AFS-filesystem. The basename of the file will be the mutex
a0fed3e26656887c8458aa1081d516d08ced3c84trawick type, an optional instance string provided by the module, and unless the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>OmitPID</code> keyword is specified, the process id of the httpd
a0fed3e26656887c8458aa1081d516d08ced3c84trawick parent process will be appended to to make the file name unique, avoiding
a0fed3e26656887c8458aa1081d516d08ced3c84trawick conflicts when multiple httpd instances share a lock file directory. For
a0fed3e26656887c8458aa1081d516d08ced3c84trawick example, if the mutex name is <code>mpm-accept</code> and the lock file
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directory is <code>/var/httpd/locks</code>, the lock file name for the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick httpd instance with parent process id 12345 would be
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>/var/httpd/locks/mpm-accept.12345</code>.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <div class="warning"><h3>Security</h3>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>It is best to <em>avoid</em> putting mutex files in a world-writable
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directory such as <code>/var/tmp</code> because someone could create
a0fed3e26656887c8458aa1081d516d08ced3c84trawick a denial of service attack and prevent the server from starting by
a0fed3e26656887c8458aa1081d516d08ced3c84trawick creating a lockfile with the same name as the one the server will try
a0fed3e26656887c8458aa1081d516d08ced3c84trawick to create.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </div>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The following table documents the names of mutexes used by httpd
a0fed3e26656887c8458aa1081d516d08ced3c84trawick and bundled modules.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <table class="bordered"><tr class="header">
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <th>Mutex name</th>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <th>Module(s)</th>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <th>Protected resource</th>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code>mpm-accept</code></td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code class="module"><a href="/mod/prefork.html">prefork</a></code> and <code class="module"><a href="/mod/worker.html">worker</a></code> MPMs</td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td>incoming connections, to avoid the thundering herd problem;
a0fed3e26656887c8458aa1081d516d08ced3c84trawick for more information, refer to the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <a href="/misc/perf-tuning.html">performance tuning</a>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick documentation</td>
215694531f7d868b906df96e22a80e6a1d2326a6lgentis </tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<tr class="odd">
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code>authdigest-client</code></td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code class="module"><a href="/mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td>client list in shared memory</td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </tr>
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick<tr>
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick <td><code>authdigest-opaque</code></td>
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick <td><code class="module"><a href="/mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick <td>counter in shared memory</td>
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick </tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr class="odd">
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <td><code>ldap-cache</code></td>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <td><code class="module"><a href="/mod/mod_ldap.html">mod_ldap</a></code></td>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <td>LDAP result cache</td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code>rewrite-map</code></td>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <td><code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code></td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td>communication with external mapping programs, to avoid
a0fed3e26656887c8458aa1081d516d08ced3c84trawick intermixed I/O from multiple requests</td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr class="odd">
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code>ssl-cache</code></td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code></td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td>SSL session cache</td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code>ssl-stapling</code></td>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <td><code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code></td>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <td>OCSP stapling response cache</td>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </tr>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<tr class="odd">
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <td><code>watchdog-callback</code></td>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <td><code class="module"><a href="/mod/mod_watchdog.html">mod_watchdog</a></code></td>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <td>callback function of a particular client module</td>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </tr>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</table>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick parent process id from the lock file name.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>In the following example, the mutex mechanism for the MPM accept
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick mutex will be changed from the compiled-in default to <code>fcntl</code>,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick with the associated lock file created in directory
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick will be changed from the compiled-in default to <code>sysvsem</code>.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <pre class="prettyprint lang-config">
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickMutex sysvsem default
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickMutex fcntl:/var/httpd/locks mpm-accept
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </pre>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</div>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<table class="directive">
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>DEPRECATED: Designates an IP address for name-virtual
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickhosting</td></tr>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</table>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<p>Prior to 2.3.11, <code class="directive">NameVirtualHost</code> was required
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickto instruct the server that a particular IP address and port combination
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickwas usable as a name-based virtual host. In 2.3.11 and later,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickany time an IP address and port combination is used in multiple virtual
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickhosts, name-based virtual hosting is automatically enabled for that address.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<p>This directive currently has no effect.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<h3>See also</h3>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<ul>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<li><a href="/vhosts/">Virtual Hosts
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickdocumentation</a></li>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</ul>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</div>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<table class="directive">
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickdirectory</td></tr>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options FollowSymlinks</code></td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<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>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</table>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The <code class="directive">Options</code> directive controls which
2aa51ed61adb484602e94de3d2214ec267aecedbigalic server features are available in a particular directory.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p><var>option</var> can be set to <code>None</code>, in which
a0fed3e26656887c8458aa1081d516d08ced3c84trawick case none of the extra features are enabled, or one or more of
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the following:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
4f127f38c6400931b17c1ce235aa84a046ab7310jim <dt><code>All</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>All options except for <code>MultiViews</code>.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ExecCGI</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener Execution of CGI scripts using <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener is permitted.</dd>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener <dt><code>FollowSymLinks</code></dt>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener The server will follow symbolic links in this directory. This is
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive the default setting.
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive <div class="note">
05201775eaa6b363b8a119c8aea5db246b967591yoshiki <p>Even though the server follows the symlink it does <em>not</em>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen change the pathname used to match against <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>Note also, that this option <strong>gets ignored</strong> if set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Omitting this option should not be considered a security restriction,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since symlink testing is subject to race conditions that make it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive circumventable.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>Includes</code></dt>
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes provided by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive are permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic <dt><code>IncludesNOEXEC</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes are permitted, but the <code>#exec
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cmd</code> and <code>#exec cgi</code> are disabled. It is still
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd possible to <code>#include virtual</code> CGI scripts from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directories.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Indexes</code></dt>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic If a URL which maps to a directory is requested, and there
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is no <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess (<em>e.g.</em>, <code>index.html</code>) in that directory, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the directory.</dd>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <dt><code>MultiViews</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/content-negotiation.html">Content negotiated</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "MultiViews" are allowed using
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic <code class="module"><a href="/mod/mod_negotiation.html">mod_negotiation</a></code>.
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic <div class="note"><h3>Note</h3> <p>This option gets ignored if set
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd anywhere other than <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, as <code class="module"><a href="/mod/mod_negotiation.html">mod_negotiation</a></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd needs real resources to compare against and evaluate from.</p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener <dt><code>SymLinksIfOwnerMatch</code></dt>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener <dd>The server will only follow symbolic links for which the
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener target file or directory is owned by the same user id as the
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener link.
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener <div class="note"><h3>Note</h3> <p>This option gets ignored if
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive set inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code> section.</p>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <p>This option should not be considered a security restriction,
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive since symlink testing is subject to race conditions that make it
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd circumventable.</p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Normally, if multiple <code class="directive">Options</code> could
13e5182a0c199ecc7a73db97b6448a544e940868slive apply to a directory, then the most specific one is used and
13e5182a0c199ecc7a73db97b6448a544e940868slive others are ignored; the options are not merged. (See <a href="/sections.html#mergin">how sections are merged</a>.)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive However if <em>all</em> the options on the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive">Options</code> directive are preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>+</code> or <code>-</code> symbol, the options are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive merged. Any options preceded by a <code>+</code> are added to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive options currently in force, and any options preceded by a
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>-</code> are removed from the options currently in
13e5182a0c199ecc7a73db97b6448a544e940868slive force. </p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
b00583f8e126bbb00b06dcf06af06c9d07978701kess <div class="note"><h3>Note</h3>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> with those without is not valid syntax, and will be
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess rejected during server startup by the syntax check with an abort.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <pre class="prettyprint lang-config">
13e5182a0c199ecc7a73db97b6448a544e940868slive&lt;Directory "/web/docs"&gt;
13e5182a0c199ecc7a73db97b6448a544e940868slive Options Indexes FollowSymLinks
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/web/docs/spec"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
13e5182a0c199ecc7a73db97b6448a544e940868slive </pre>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <p>then only <code>Includes</code> will be set for the
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <code>/web/docs/spec</code> directory. However if the second
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <code class="directive">Options</code> directive uses the <code>+</code> and
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <code>-</code> symbols:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/web/docs"&gt;
13e5182a0c199ecc7a73db97b6448a544e940868slive Options Indexes FollowSymLinks
13e5182a0c199ecc7a73db97b6448a544e940868slive&lt;/Directory&gt;
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/web/docs/spec"&gt;
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener Options +Includes -Indexes
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener&lt;/Directory&gt;
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener </pre>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener <p>then the options <code>FollowSymLinks</code> and
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener <code>Includes</code> are set for the <code>/web/docs/spec</code>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive directory.</p>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener <div class="note"><h3>Note</h3>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener <p>Using <code>-IncludesNOEXEC</code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-Includes</code> disables server-side includes completely
13e5182a0c199ecc7a73db97b6448a544e940868slive regardless of the previous setting.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive </div>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>The default in the absence of any other settings is
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>FollowSymlinks</code>.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive</div>
13e5182a0c199ecc7a73db97b6448a544e940868slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
13e5182a0c199ecc7a73db97b6448a544e940868slive<div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">Directive</a></h2>
13e5182a0c199ecc7a73db97b6448a544e940868slive<table class="directive">
13e5182a0c199ecc7a73db97b6448a544e940868slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocol for a listening socket</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocol <var>protocol</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1.5 and later.
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalicOn Windows from Apache 2.3.3 and later.</td></tr>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen</table>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <p>This directive specifies the protocol used for a specific listening socket.
fb77c505254b6e9c925e23e734463e87574f8f40kess The protocol is used to determine which module should handle a request, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to apply protocol specific optimizations with the <code class="directive">AcceptFilter</code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic directive.</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <p>You only need to set the protocol if you are running on non-standard ports, otherwise <code>http</code> is assumed for port 80 and <code>https</code> for port 443.</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>For example, if you are running <code>https</code> on a non-standard port, specify the protocol explicitly:</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <pre class="prettyprint lang-config">Protocol https</pre>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can also specify the protocol using the <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<h3>See also</h3>
fb77c505254b6e9c925e23e734463e87574f8f40kess<ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</ul>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</div>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<table class="directive">
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched
2aa51ed61adb484602e94de3d2214ec267aecedbigalicby Apache httpd children</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</code></td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess</table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Takes 1 or 2 parameters. The first parameter sets the soft
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess resource limit for all processes and the second parameter sets
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the maximum resource limit. Either parameter can be a number,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess or <code>max</code> to indicate to the server that the limit should
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess be set to the maximum allowed by the operating system
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. Raising the maximum resource limit requires that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server is running as <code>root</code>, or in the initial startup
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache httpd children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache httpd children themselves. This
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen includes CGI scripts and SSI exec commands, but not any
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen processes forked off from the Apache httpd parent such as piped
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen logs.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>CPU resource limits are expressed in seconds per
158222078a98fb13cddf2793b42f7eb8eafe51aerjung process.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<h3>See also</h3>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<ul>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</ul>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</div>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<table class="directive">
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedoohby Apache httpd children</td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</code></td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</table>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit should
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen be set to the maximum allowed by the operating system
ef8e89e090461194ecadd31e8796a2c51e0531a2kess configuration. Raising the maximum resource limit requires that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server is running as <code>root</code>, or in the initial startup
530eba85dbd41b8a0fa5255d3648d1440199a661slive phase.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>This applies to processes forked off from Apache httpd children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache httpd children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache httpd parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Memory resource limits are expressed in bytes per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveprocesses launched by Apache httpd children</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Takes 1 or 2 parameters. The first parameter sets the soft
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen resource limit for all processes and the second parameter sets
ef8e89e090461194ecadd31e8796a2c51e0531a2kess the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive should be set to the maximum allowed by the operating system
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele configuration. Raising the maximum resource limit requires that
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele the server is running as <code>root</code>, or in the initial startup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache httpd children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache httpd children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd processes forked off from the Apache httpd parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>Process limits control the number of processes per user.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note</h3>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>If CGI processes are <strong>not</strong> running
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen under user ids other than the web server user id, this directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will limit the number of processes that the server itself can
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen create. Evidence of this situation will be indicated by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong><code>cannot fork</code></strong> messages in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>error_log</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directive</a></h2>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivescripts</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only;
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveoption <code>Registry-Strict</code> is available in Apache HTTP Server 2.0 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivelater</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache httpd finds the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess interpreter used to run CGI scripts. The default setting is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by the shebang line (first line, starting with <code>#!</code>) in the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen script. On Win32 systems this line usually looks like:</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-perl">#!C:/Perl/bin/perl.exe</pre>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-perl">#!perl</pre>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>Setting <code>ScriptInterpreterSource Registry</code> will
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess searched using the script file extension (e.g., <code>.pl</code>) as a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess search key. The command defined by the registry subkey
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>Shell\Open\Command</code> is used to open the script file. If the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive registry keys cannot be found, Apache httpd falls back to the behavior of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Script</code> option.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="warning"><h3>Security</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Be careful when using <code>ScriptInterpreterSource
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Registry</code> with <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache httpd will try to execute <strong>every</strong> file within this
fb77c505254b6e9c925e23e734463e87574f8f40kess directory. The <code>Registry</code> setting may cause undesired
003f0c9fda6664daf5092a0e42f65ede20098153slive program calls on files which are typically not executed. For
fb77c505254b6e9c925e23e734463e87574f8f40kess example, the default open command on <code>.htm</code> files on
fb77c505254b6e9c925e23e734463e87574f8f40kess most Windows systems will execute Microsoft Internet Explorer, so
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele any HTTP request for an <code>.htm</code> file existing within the
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele script directory would start the browser in the background on the
003f0c9fda6664daf5092a0e42f65ede20098153slive server. This is a good way to crash your system within a minute or
158222078a98fb13cddf2793b42f7eb8eafe51aerjung so.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
4cafc94e99922f00654e1779d30c2cccf5278c4fkess 2.0 does the same thing as <code>Registry</code> but uses only the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen subkey <code>Shell\ExecCGI\Command</code>. The
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <code>ExecCGI</code> key is not a common one. It must be
4cafc94e99922f00654e1779d30c2cccf5278c4fkess configured manually in the windows registry and hence prevents
4cafc94e99922f00654e1779d30c2cccf5278c4fkess accidental program calls on your system.</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</div>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">Directive</a></h2>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<table class="directive">
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine if mod_status displays the first 63 characters
fb77c505254b6e9c925e23e734463e87574f8f40kessof a request or the last 63, assuming the request itself is greater than
4cafc94e99922f00654e1779d30c2cccf5278c4fkess63 chars.</td></tr>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SeeRequestTail On|Off</code></td></tr>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SeeRequestTail Off</code></td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.2.7 and later.</td></tr>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</table>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki <p>mod_status with <code>ExtendedStatus On</code>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive displays the actual request being handled.
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive For historical purposes, only 63 characters of the request
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive are actually stored for display purposes. This directive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen controls whether the 1st 63 characters are stored (the previous
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive behavior and the default) or if the last 63 characters are. This
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive is only applicable, of course, if the length of the request is
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive 64 characters or greater.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>If Apache httpd is handling <code>GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</code> mod_status displays as follows:
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <table class="bordered">
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess <th>Off (default)</th>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <td>GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <th>On</th>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</td>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a8ee031b2224ce5473826c9d4f603681589245fawrowe</div>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<table class="directive">
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error
a8ee031b2224ce5473826c9d4f603681589245fawrowemessages sent to the client</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</table>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>The <code class="directive">ServerAdmin</code> sets the contact address
a8ee031b2224ce5473826c9d4f603681589245fawrowe that the server includes in any error messages it returns to the
a8ee031b2224ce5473826c9d4f603681589245fawrowe client. If the <code>httpd</code> doesn't recognize the supplied argument
a8ee031b2224ce5473826c9d4f603681589245fawrowe as an URL, it
a8ee031b2224ce5473826c9d4f603681589245fawrowe assumes, that it's an <var>email-address</var> and prepends it with
a8ee031b2224ce5473826c9d4f603681589245fawrowe <code>mailto:</code> in hyperlink targets. However, it's recommended to
a8ee031b2224ce5473826c9d4f603681589245fawrowe actually use an email address, since there are a lot of CGI scripts that
a8ee031b2224ce5473826c9d4f603681589245fawrowe make that assumption. If you want to use an URL, it should point to another
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen server under your control. Otherwise users may not be able to contact you in
a8ee031b2224ce5473826c9d4f603681589245fawrowe case of errors.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>It may be worth setting up a dedicated address for this, e.g.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <pre class="prettyprint lang-config">ServerAdmin www-admin@foo.example.com</pre>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>as users do not always mention that they are talking about the
a8ee031b2224ce5473826c9d4f603681589245fawrowe server!</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe</div>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directive</a></h2>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<table class="directive">
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests
a8ee031b2224ce5473826c9d4f603681589245fawroweto name-virtual hosts</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The <code class="directive">ServerAlias</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive alternate names for a host, for use with <a href="/vhosts/name-based.html">name-based virtual hosts</a>. The
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;VirtualHost *:80&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName server.example.com
2e5e2673cb64d3e4d445d911c6f61ac171020725nd ServerAlias server server2.example.com server2
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAlias *.example.com
733738e83a9b0113476e3f67992c2278d61ee4dakess UseCanonicalName Off
733738e83a9b0113476e3f67992c2278d61ee4dakess # ...
2e5e2673cb64d3e4d445d911c6f61ac171020725nd&lt;/VirtualHost&gt;
2e5e2673cb64d3e4d445d911c6f61ac171020725nd </pre>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd
2e5e2673cb64d3e4d445d911c6f61ac171020725nd
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <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
2e5e2673cb64d3e4d445d911c6f61ac171020725nd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (nor for ServerName vs. ServerAlias). </p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<h3>See also</h3>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hostname and port that the server uses to identify
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveitself</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ServerName</code> directive sets the
206b5dce9e48924aa9f12ce87f14856a4cd3fb68takashi request scheme, hostname and
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin port that the server uses to identify itself. This is used when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive creating redirection URLs.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Additionally, <code class="directive">ServerName</code> is used (possibly
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh in conjunction with <code class="directive">ServerAlias</code>) to uniquely
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh identify a virtual host, when using <a href="/vhosts/name-based.html">name-based virtual hosts</a>.</p>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh <p>For example, if the name of the
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh machine hosting the web server is <code>simple.example.com</code>,
2aa51ed61adb484602e94de3d2214ec267aecedbigalic but the machine also has the DNS alias <code>www.example.com</code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic and you wish the web server to be so identified, the following
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener directive should be used:</p>
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh <pre class="prettyprint lang-config">ServerName www.example.com</pre>
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener <p>The <code class="directive">ServerName</code> directive
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener may appear anywhere within the definition of a server. However,
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener each appearance overrides the previous appearance (within that
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener server).</p>
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener <p>If no <code class="directive">ServerName</code> is specified, then the
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener server attempts to deduce the hostname by performing a reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup on the IP address. If no port is specified in the
fff1d314f760fc17a49215e8818b3e57691efa43niq <code class="directive">ServerName</code>, then the server will use the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen port from the incoming request. For optimal reliability and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive predictability, you should specify an explicit hostname and port
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using the <code class="directive">ServerName</code> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you are using <a href="/vhosts/name-based.html">name-based virtual hosts</a>,
003f0c9fda6664daf5092a0e42f65ede20098153slive the <code class="directive">ServerName</code> inside a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#virtualhost">&lt;VirtualHost&gt;</a></code>
e08ad1a326852610a7930269638a43657fc50d06sctemme section specifies what hostname must appear in the request's
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Host:</code> header to match this virtual host.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Sometimes, the server runs behind a device that processes SSL,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive such as a reverse proxy, load balancer or SSL offload
e08ad1a326852610a7930269638a43657fc50d06sctemme appliance. When this is the case, specify the
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>https://</code> scheme and the port number to which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive clients connect in the <code class="directive">ServerName</code> directive
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen to make sure that the server generates the correct
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen self-referential URLs.
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen </p>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen <p>See the description of the
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen settings which determine whether self-referential URLs (e.g., by the
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> module) will refer to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified port, or to the port number given in the client's request.
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="warning">
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <p>Failure to set <code class="directive">ServerName</code> to a name that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive your server can resolve to an IP address will result in a startup
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier warning. <code>httpd</code> will then use whatever hostname it can
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier determine, using the system's <code>hostname</code> command. This
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier will almost never be the hostname you actually want.</p>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier <div class="example"><p><code>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
fb77c505254b6e9c925e23e734463e87574f8f40kess
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme<h3>See also</h3>
e08ad1a326852610a7930269638a43657fc50d06sctemme<ul>
e08ad1a326852610a7930269638a43657fc50d06sctemme<li><a href="/dns-caveats.html">Issues Regarding DNS and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache HTTP Server</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache HTTP Server virtual host
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
e08ad1a326852610a7930269638a43657fc50d06sctemme<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e08ad1a326852610a7930269638a43657fc50d06sctemme<div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directive</a></h2>
e08ad1a326852610a7930269638a43657fc50d06sctemme<table class="directive">
e08ad1a326852610a7930269638a43657fc50d06sctemme<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Legacy URL pathname for a name-based virtual host that
e08ad1a326852610a7930269638a43657fc50d06sctemmeis accessed by an incompatible browser</td></tr>
e08ad1a326852610a7930269638a43657fc50d06sctemme<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
e08ad1a326852610a7930269638a43657fc50d06sctemme<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e08ad1a326852610a7930269638a43657fc50d06sctemme<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>The <code class="directive">ServerPath</code> directive sets the legacy
29edaaeea24c41820e486944635348cd7fae1d11rbowen URL pathname for a host, for use with <a href="/vhosts/">name-based virtual hosts</a>.</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
e08ad1a326852610a7930269638a43657fc50d06sctemme</ul>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen</div>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directive</a></h2>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<table class="directive">
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server installation</td></tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ServerRoot</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory in which the server lives. Typically it will contain the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess subdirectories <code>conf/</code> and <code>logs/</code>. Relative
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen 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
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen relative to this directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">ServerRoot "/home/httpd"</pre>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default location of <code class="directive">ServerRoot</code> may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modified by using the <code>--prefix</code> argument to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/programs/configure.html"><code>configure</code></a>, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive most third-party distributions of the server have a different
fb77c505254b6e9c925e23e734463e87574f8f40kess default location from the one listed above.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/invoking.html">the <code>-d</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive option to <code>httpd</code></a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/misc/security_tips.html#serverroot">the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive security tips</a> for information on how to properly set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive permissions on the <code class="directive">ServerRoot</code></li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the footer on server-generated documents</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerSignature Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ServerSignature</code> directive allows the
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen configuration of a trailing footer line under server-generated
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen documents (error messages, <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> ftp directory
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor listings, <code class="module"><a href="/mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen would want to enable such a footer line is that in a chain of proxies,
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen the user often has no possibility to tell which of the chained servers
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh actually produced a returned error message.</p>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen
fe9f851e55506793276ffaac89106433572868a8rbowen <p>The <code>Off</code>
fe9f851e55506793276ffaac89106433572868a8rbowen setting, which is the default, suppresses the footer line (and is
fe9f851e55506793276ffaac89106433572868a8rbowen therefore compatible with the behavior of Apache-1.2 and
fe9f851e55506793276ffaac89106433572868a8rbowen below). The <code>On</code> setting simply adds a line with the
fe9f851e55506793276ffaac89106433572868a8rbowen server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
fe9f851e55506793276ffaac89106433572868a8rbowen and the <code>EMail</code> setting additionally creates a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>After version 2.0.44, the details of the server version number
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the <code>Server</code> HTTP response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheader</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess</table>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive controls whether <code>Server</code> response
fb77c505254b6e9c925e23e734463e87574f8f40kess header field which is sent back to clients includes a
fb77c505254b6e9c925e23e734463e87574f8f40kess description of the generic OS-type of the server as well as
ef8e89e090461194ecadd31e8796a2c51e0531a2kess information about compiled-in modules.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <dl>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dt><code>ServerTokens Prod[uctOnly]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</code></dd>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz <dt><code>ServerTokens Major</code></dt>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2</code></dd>
f35c904c3b359610a46e94fbb4ba8495b2338521slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Minor</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.4</code></dd>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <dt><code>ServerTokens Min[imal]</code></dt>
dc111bcea580da3da174c25be0fd7a8f22c86fe1jim
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.4.2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens OS</code></dt>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix)</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <p>This setting applies to the entire server, and cannot be
2eb5346b17b3b69767cfe87d0f632efd6d15500djim enabled or disabled on a virtualhost-by-virtualhost basis.</p>
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <p>After version 2.0.44, this directive also controls the
2eb5346b17b3b69767cfe87d0f632efd6d15500djim information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note">Setting <code class="directive">ServerTokens</code> to less than
530eba85dbd41b8a0fa5255d3648d1440199a661slive <code>minimal</code> is not recommended because it makes it more
530eba85dbd41b8a0fa5255d3648d1440199a661slive difficult to debug interoperational problems. Also note that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive disabling the Server: header does nothing at all to make your
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh server more secure; the idea of "security through obscurity"
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh is a myth and leads to a false sense of safety.</div>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<h3>See also</h3>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<ul>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh</ul>
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen</div>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
530eba85dbd41b8a0fa5255d3648d1440199a661slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be processed by a
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedoohhandler</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved into the core in Apache httpd 2.0</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When placed into an <code>.htaccess</code> file or a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz section, this directive forces all matching files to be parsed
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz through the <a href="/handler.html">handler</a> given by
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <var>handler-name</var>. For example, if you had a directory you
7b5535ed88e0f561b3bfb3330137bd804846afd4slive wanted to be parsed entirely as imagemap rule files, regardless
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor of extension, you might put the following into an
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <code>.htaccess</code> file in that directory:</p>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <pre class="prettyprint lang-config">SetHandler imap-file</pre>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim
a21fb2799923b1c25a351f09e690bd46806f2fa2jim
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <p>Another example: if you wanted to have the server display a
a21fb2799923b1c25a351f09e690bd46806f2fa2jim status report whenever a URL of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://servername/status</code> was called, you might put
f35c904c3b359610a46e94fbb4ba8495b2338521slive the following into <code>httpd.conf</code>:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Location "/status"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override an earlier defined <code class="directive">SetHandler</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive by using the value <code>None</code>.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Because <code class="directive">SetHandler</code> overrides default handlers,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive normal behavior such as handling of URLs ending in a slash (/) as
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directories or index files is suppressed.</p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directive</a></h2>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process client requests and POST
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveinput</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</table>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The <code class="directive">SetInputFilter</code> directive sets the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic filter or filters which will process client requests and POST
2aa51ed61adb484602e94de3d2214ec267aecedbigalic input when they are received by the server. This is in addition to
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd any filters defined elsewhere, including the
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen <code class="directive"><a href="/mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen directive.</p>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen <p>If more than one filter is specified, they must be separated
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen by semicolons in the order in which they should process the
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen content.</p>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen<h3>See also</h3>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen<ul>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<li><a href="/filter.html">Filters</a> documentation</li>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd</ul>
2025fe01de41805f6148851335693aa5ebe2faffnd</div>
91d09a9328c13761516ce2fedeeb23f525d4ec75nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
91d09a9328c13761516ce2fedeeb23f525d4ec75nd<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<table class="directive">
91d09a9328c13761516ce2fedeeb23f525d4ec75nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver</td></tr>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">SetOutputFilter</code> directive sets the filters
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which will process responses from the server before they are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent to the client. This is in addition to any filters defined
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd elsewhere, including the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>For example, the following configuration will process all files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the <code>/www/data/</code> directory for server-side
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/www/data/"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetOutputFilter INCLUDES
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If more than one filter is specified, they must be separated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by semicolons in the order in which they should process the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/filter.html">Filters</a> documentation</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivecertain events before failing a request</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 60</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">TimeOut</code> directive defines the length
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of time Apache httpd will wait for I/O in various circumstances:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ol>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>When reading data from the client, the length of time to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wait for a TCP packet to arrive if the read buffer is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive empty.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <li>When writing data to the client, the length of time to wait
2aa51ed61adb484602e94de3d2214ec267aecedbigalic for an acknowledgement of a packet if the send buffer is
2aa51ed61adb484602e94de3d2214ec267aecedbigalic full.</li>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <li>In <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, the length of time to wait for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive output from a CGI script.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>In <code class="module"><a href="/mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wait for output from a filtering process.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>In <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configured.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ol>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e9a0000eb55887c0278a9184d501812f5e056dbfjim<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
fa71303e53e7ef460728446b8290d05ed0895136trawick<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behavior on <code>TRACE</code> requests</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<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>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton</table>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <p>This directive overrides the behavior of <code>TRACE</code> for both
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the core server and <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>. The default
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <code>TraceEnable on</code> permits <code>TRACE</code> requests per
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton RFC 2616, which disallows any request body to accompany the request.
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <code>TraceEnable off</code> causes the core server and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
ba050a6f942b9fa0e81ed73437588005c569655ccovener allowed) error to the client.</p>
ba050a6f942b9fa0e81ed73437588005c569655ccovener
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <p>Finally, for testing and diagnostic purposes only, request
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton bodies may be allowed using the non-compliant <code>TraceEnable
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton extended</code> directive. The core (as an origin server) will
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton restrict the request body to 64k (plus 8k for chunk headers if
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <code>Transfer-Encoding: chunked</code> is used). The core will
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton reflect the full headers and all chunk headers with the response
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton body. As a proxy server, the request body is not restricted to 64k.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <div class="note"><h3>Note</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Despite claims to the contrary, <code>TRACE</code> is not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a security vulnerability and there is no viable reason for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it to be disabled. Doing so necessarily makes your server
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe non-compliant.</p>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe </div>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe</div>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2bb4320391b88748dc6e851deca941b058231664rbowen<div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Directive</a></h2>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<table class="directive">
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Undefine the existence of a variable</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd</table>
12099dff89f3135d53929f4f1bdb42c7d044d928nd <p>Undoes the effect of a <code class="directive"><a href="#define">Define</a></code> or
12099dff89f3135d53929f4f1bdb42c7d044d928nd of passing a <code>-D</code> argument to <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</p>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <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
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <code>-D</code> arguments in any startup scripts.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe</div>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directive</a></h2>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<table class="directive">
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
e616d209b505c9f381f09102f27c8002b26281cajimport</td></tr>
e616d209b505c9f381f09102f27c8002b26281cajim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
e616d209b505c9f381f09102f27c8002b26281cajim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName Off</code></td></tr>
e616d209b505c9f381f09102f27c8002b26281cajim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
e616d209b505c9f381f09102f27c8002b26281cajim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e616d209b505c9f381f09102f27c8002b26281cajim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
e616d209b505c9f381f09102f27c8002b26281cajim</table>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <p>In many situations Apache httpd must construct a <em>self-referential</em>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe URL -- that is, a URL that refers back to the same server. With
20b0f809c3823eda58808be053ffc305dfa9c785sf <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
20b0f809c3823eda58808be053ffc305dfa9c785sf specified in the <code class="directive"><a href="#servername">ServerName</a></code>
20b0f809c3823eda58808be053ffc305dfa9c785sf directive to construct the canonical name for the server. This name
20b0f809c3823eda58808be053ffc305dfa9c785sf is used in all self-referential URLs, and for the values of
20b0f809c3823eda58808be053ffc305dfa9c785sf <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
20b0f809c3823eda58808be053ffc305dfa9c785sf
20b0f809c3823eda58808be053ffc305dfa9c785sf <p>With <code>UseCanonicalName Off</code> Apache httpd will form
20b0f809c3823eda58808be053ffc305dfa9c785sf self-referential URLs using the hostname and port supplied by
20b0f809c3823eda58808be053ffc305dfa9c785sf the client if any are supplied (otherwise it will use the
20b0f809c3823eda58808be053ffc305dfa9c785sf canonical name, as defined above). These values are the same
20b0f809c3823eda58808be053ffc305dfa9c785sf that are used to implement <a href="/vhosts/name-based.html">name-based virtual hosts</a>,
20b0f809c3823eda58808be053ffc305dfa9c785sf and are available with the same clients. The CGI variables
20b0f809c3823eda58808be053ffc305dfa9c785sf <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
20b0f809c3823eda58808be053ffc305dfa9c785sf constructed from the client supplied values as well.</p>
20b0f809c3823eda58808be053ffc305dfa9c785sf
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <p>An example where this may be useful is on an intranet server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where you have users connecting to the machine using short
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names such as <code>www</code>. You'll notice that if the users
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type a shortname, and a URL which is a directory, such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://www/splat</code>, <em>without the trailing
fb77c505254b6e9c925e23e734463e87574f8f40kess slash</em> then Apache httpd will redirect them to
fb294b146e7ceb48e3983ee3684ba6c6506241c0jim <code>http://www.example.com/splat/</code>. If you have
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication enabled, this will cause the user to have to
003f0c9fda6664daf5092a0e42f65ede20098153slive authenticate twice (once for <code>www</code> and once again
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for <code>www.example.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FAQ on this subject for more information</a>). But if
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Apache httpd will redirect to <code>http://www/splat/</code>.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>There is a third option, <code>UseCanonicalName DNS</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd which is intended for use with mass IP-based virtual hosting to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd support ancient clients that do not provide a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>Host:</code> header. With this option Apache httpd does a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reverse DNS lookup on the server IP address that the client
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen connected to in order to work out self-referential URLs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="warning"><h3>Warning</h3>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess they may be broken by this option. The client is essentially free
1fd5131d5732e639b0b4225ca0afea717c41bc11trawick to give whatever value they want as a hostname. But if the CGI is
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess only using <code>SERVER_NAME</code> to construct self-referential URLs
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen then it should be just fine.</p>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#servername">ServerName</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</ul>
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen<div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2>
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick<table class="directive">
155947f9a687d661d5cf2019c05c041772b7b3d9humbedooh<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own port</td></tr>
155947f9a687d661d5cf2019c05c041772b7b3d9humbedooh<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In many situations Apache httpd must construct a <em>self-referential</em>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen URL -- that is, a URL that refers back to the same server. With
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalPhysicalPort On</code> Apache httpd will, when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constructing the canonical port for the server to honor
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess provide the actual physical port number being used by this request
130d299c4b2b15be45532a176604c71fdc7bea5bnd as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd Apache httpd will not ever use the actual physical port number, instead
130d299c4b2b15be45532a176604c71fdc7bea5bnd relying on all configured information to construct a valid port number.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note</h3>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The ordering of the lookup when the physical port is used is as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive follows:</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <dl>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <dt><code>UseCanonicalName On</code></dt>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <dd>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <ol>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Physical port</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Default port</li>
d56970df0a3d627ea0bc8867a9d336cfe67da7b2nd </ol>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim </dd>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <dt><code>UseCanonicalName Off | DNS</code></dt>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <dd>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <ol>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Parsed port from <code>Host:</code> header</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Physical port</li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Default port</li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </ol>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim </dd>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim </dl>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>With <code>UseCanonicalPhysicalPort Off</code>, the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen physical ports are removed from the ordering.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim </div>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<h3>See also</h3>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<ul>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<li><code class="directive"><a href="#servername">ServerName</a></code></li>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd</ul>
4e8794dab6bbd15eb0bb016c7a4efb8b0572d558nd</div>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost">&lt;VirtualHost&gt;</a> <a name="virtualhost" id="virtualhost">Directive</a></h2>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<table class="directive">
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific
9cfaf3cf0b6a838ae98bb174660c6220734855f0ndhostname or IP address</td></tr>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;VirtualHost
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim ...&gt; ... &lt;/VirtualHost&gt;</code></td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
4e8794dab6bbd15eb0bb016c7a4efb8b0572d558nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd</table>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd <p><code class="directive">&lt;VirtualHost&gt;</code> and
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd <code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directives that will apply only to a particular virtual host. Any
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim directive that is allowed in a virtual host context may be
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim used. When the server receives a request for a document on a
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim particular virtual host, it uses the configuration directives
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim enclosed in the <code class="directive">&lt;VirtualHost&gt;</code>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim section. <var>Addr</var> can be any of the following, optionally followed by
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim a colon and a port number (or *):</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The IP address of the virtual host;</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>A fully qualified domain name for the IP address of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive virtual host (not recommended);</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li>The character <code>*</code>, which acts as a wildcard and matches
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any IP address.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The string <code>_default_</code>, which is an alias for <code>*</code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <pre class="prettyprint lang-config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;VirtualHost 10.1.2.3:80&gt;
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive ServerAdmin webmaster@host.example.com
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive DocumentRoot /www/docs/host.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName host.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog logs/host.example.com-error_log
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive TransferLog logs/host.example.com-access_log
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener&lt;/VirtualHost&gt;
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener </pre>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>IPv6 addresses must be specified in square brackets because
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the optional port number could not be determined otherwise. An
01710fa5f312f3a9cd1969d1809cf6c19a7f3d31niq IPv6 example is shown below:</p>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <pre class="prettyprint lang-config">
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener&lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80&gt;
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim ServerAdmin webmaster@host.example.com
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener DocumentRoot /www/docs/host.example.com
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive ServerName host.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog logs/host.example.com-error_log
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess TransferLog logs/host.example.com-access_log
d46a7259cd9f7c8dec6d9c920b7e4af606443b77humbedooh&lt;/VirtualHost&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </pre>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Each Virtual Host must correspond to a different IP address,
2aa51ed61adb484602e94de3d2214ec267aecedbigalic different port number or a different host name for the server,
2aa51ed61adb484602e94de3d2214ec267aecedbigalic in the former case the server machine must be configured to
2aa51ed61adb484602e94de3d2214ec267aecedbigalic accept IP packets for multiple addresses. (If the machine does
2aa51ed61adb484602e94de3d2214ec267aecedbigalic not have multiple network interfaces, then this can be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accomplished with the <code>ifconfig alias</code> command -- if
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess your OS supports it).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="note"><h3>Note</h3>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The use of <code class="directive">&lt;VirtualHost&gt;</code> does
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <strong>not</strong> affect what addresses Apache httpd listens on. You
2aa51ed61adb484602e94de3d2214ec267aecedbigalic may need to ensure that Apache httpd is listening on the correct addresses
2aa51ed61adb484602e94de3d2214ec267aecedbigalic using <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code>.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </div>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
2aa51ed61adb484602e94de3d2214ec267aecedbigalic specified inside each <code class="directive">&lt;VirtualHost&gt;</code> block. If it is absent, the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
2aa51ed61adb484602e94de3d2214ec267aecedbigalic server configuration will be inherited.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a request is received, the server first maps it to the best matching
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">&lt;VirtualHost&gt;</code> based on the local
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive IP address and port combination only. Non-wildcards have a higher
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive precedence. If no match based on IP and port occurs at all, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "main" server configuration is used.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>If multiple virtual hosts contain the best matching IP address and port,
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive the server selects from these virtual hosts the best match based on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive requested hostname. If no matching name-based virtual host is found,
130d299c4b2b15be45532a176604c71fdc7bea5bnd then the first listed virtual host that matched the IP address will be
130d299c4b2b15be45532a176604c71fdc7bea5bnd used. As a consequence, the first listed virtual host for a given IP address
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen and port combination is default virtual host for that IP and port
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen combination.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="warning"><h3>Security</h3>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>See the <a href="/misc/security_tips.html">security tips</a>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive document for details on why your security could be compromised if the
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive directory where log files are stored is writable by anyone other
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive than the user that starts the server.</p>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive </div>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive<h3>See also</h3>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<ul>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<li><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<li><a href="/dns-caveats.html">Issues Regarding DNS and
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim Apache HTTP Server</a></li>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<li><a href="/bind.html">Setting
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim which addresses and ports Apache HTTP Server uses</a></li>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim and &lt;Files&gt; sections work</a> for an explanation of how these
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim different sections are combined when a request is received</li>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim</ul>
18ee8bb3db5cc3b04291f89301bd5d14dc271066lgentis</div>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim</div>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<div class="bottomlang">
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier<p><span>Available Languages: </span><a href="/de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
130d299c4b2b15be45532a176604c71fdc7bea5bnd<a href="/en/mod/core.html" title="English">&nbsp;en&nbsp;</a> |
130d299c4b2b15be45532a176604c71fdc7bea5bnd<a href="/es/mod/core.html" hreflang="es" rel="alternate" title="Espa�ol">&nbsp;es&nbsp;</a> |
130d299c4b2b15be45532a176604c71fdc7bea5bnd<a href="/fr/mod/core.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<a href="/ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<a href="/tr/mod/core.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</div><div id="footer">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<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><script type="text/javascript"><!--//--><![CDATA[//><!--
ef8e89e090461194ecadd31e8796a2c51e0531a2kessif (typeof(prettyPrint) !== undefined) {
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen prettyPrint();
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive}
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen//--><!]]></script>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</body></html>