core.html.en revision 5bb5fba250bf526bc51d13b25378d54acb93c1cb
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" />
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<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.3</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">
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<div id="page-content">
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<div id="preamble"><h1>Apache Core Features</h1>
7db9f691a00ead175b03335457ca296a33ddf31bnd<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> |
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<a href="/en/mod/core.html" title="English">&nbsp;en&nbsp;</a> |
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<a href="/ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveavailable</td></tr>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<ul id="toc">
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#addoutputfilterbytype">AddOutputFilterByType</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#define">Define</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#directory">&lt;Directory&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#fileetag">FileETag</a></li>
90efa9f1730742d874edb5a7803adce11c9f08eanoodl<li><img alt="" src="/images/down.gif" /> <a href="#files">&lt;Files&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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="#keepalive">KeepAlive</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limit">&lt;Limit&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitexcept">&lt;LimitExcept&gt;</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
3139522a1418fa699dfd78dcf8dde54253f2c55cnoirin<li><img alt="" src="/images/down.gif" /> <a href="#options">Options</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<li><img alt="" src="/images/down.gif" /> <a href="#servername">ServerName</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<li><img alt="" src="/images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#timeout">TimeOut</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<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">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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 2.1.5 and later</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables operating system specific optimizations for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive listening socket by the Protocol type. The basic premise is for the
fb77c505254b6e9c925e23e734463e87574f8f40kess kernel to not send a socket to the server process until either data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is received or an entire HTTP Request is buffered. Only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FreeBSD's Accept Filters</a> and Linux's more primitive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code> are currently supported.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The default values on FreeBSD are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter http httpready <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter https dataready
fb77c505254b6e9c925e23e734463e87574f8f40kess </code></p></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the kernel level. Once an entire request is received, the kernel then
fb77c505254b6e9c925e23e734463e87574f8f40kess sends it to the server. See the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <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
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default values on Linux are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter http data <br />
fb77c505254b6e9c925e23e734463e87574f8f40kess AcceptFilter https data
fb77c505254b6e9c925e23e734463e87574f8f40kess </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
fb77c505254b6e9c925e23e734463e87574f8f40kess requests. Any value besides <code>none</code> will enable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd see the Linux
130d299c4b2b15be45532a176604c71fdc7bea5bnd <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
130d299c4b2b15be45532a176604c71fdc7bea5bnd tcp(7)</a> man page.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Using <code>none</code> for an argument will disable any accept filters
130d299c4b2b15be45532a176604c71fdc7bea5bnd for that protocol. This is useful for protocols that require a server
ef8e89e090461194ecadd31e8796a2c51e0531a2kess send data first, such as <code>nntp</code>:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="example"><p><code>AcceptFilter nntp none</code></p></div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</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">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</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>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>Available in Apache 2.0.30 and later</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>This directive controls whether requests that contain trailing
003f0c9fda6664daf5092a0e42f65ede20098153slive pathname information that follows an actual filename (or
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess non-existent file in an existing directory) will be accepted or
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess rejected. The trailing pathname information can be made
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive available to scripts in the <code>PATH_INFO</code> environment
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd variable.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For example, assume the location <code>/test/</code> points to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory that contains only the single file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>here.html</code>. Then requests for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html/more</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/nothere.html/more</code> both collect
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/more</code> as <code>PATH_INFO</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The three possible arguments for the
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code class="directive">AcceptPathInfo</code> directive are:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dl>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dt><code>Off</code></dt><dd>A request will only be accepted if it
130d299c4b2b15be45532a176604c71fdc7bea5bnd maps to a literal path that exists. Therefore a request with
130d299c4b2b15be45532a176604c71fdc7bea5bnd trailing pathname information after the true filename such as
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/test/here.html/more</code> in the above example will return
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a 404 NOT FOUND error.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>On</code></dt><dd>A request will be accepted if a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive leading path component maps to a file that exists. The above
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen example <code>/test/here.html/more</code> will be accepted if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html</code> maps to a valid file.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Default</code></dt><dd>The treatment of requests with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
684f2a9a422185adda0692a1203c5ad6687fc5c5nd <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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>PATH_INFO</code> by default.</dd>
530eba85dbd41b8a0fa5255d3648d1440199a661slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The primary purpose of the <code>AcceptPathInfo</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is to allow you to override the handler's choice of
003f0c9fda6664daf5092a0e42f65ede20098153slive accepting or rejecting <code>PATH_INFO</code>. This override is required,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for example, when you use a <a href="/filter.html">filter</a>, such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <a href="mod_include.html">INCLUDES</a>, to generate content
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding based on <code>PATH_INFO</code>. The core handler would usually reject
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding the request, so you can use the following configuration to enable
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding such a script:</p>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd
a8ce9095d102e43fecb81093a132b90b9a227f78kess <div class="example"><p><code>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd &lt;Files "mypaths.shtml"&gt;<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <span class="indent">
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding Options +Includes<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding SetOutputFilter INCLUDES<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding AcceptPathInfo On<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding </span>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding &lt;/Files&gt;
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directive</a></h2>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<table class="directive">
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the distributed configuration file</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</table>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>While processing a request the server looks for
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding the first existing configuration file from this list of names in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive every directory of the path to the document, if distributed
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding configuration files are <a href="#allowoverride">enabled for that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory</a>. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
58699879a562774640b95e9eedfd891f336e38c2nd <div class="example"><p><code>
58699879a562774640b95e9eedfd891f336e38c2nd AccessFileName .acl
58699879a562774640b95e9eedfd891f336e38c2nd </code></p></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>before returning the document
58699879a562774640b95e9eedfd891f336e38c2nd <code>/usr/local/web/index.html</code>, the server will read
58699879a562774640b95e9eedfd891f336e38c2nd <code>/.acl</code>, <code>/usr/.acl</code>,
58699879a562774640b95e9eedfd891f336e38c2nd <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
58699879a562774640b95e9eedfd891f336e38c2nd for directives, unless they have been disabled with</p>
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive
58699879a562774640b95e9eedfd891f336e38c2nd <div class="example"><p><code>
58699879a562774640b95e9eedfd891f336e38c2nd &lt;Directory /&gt;<br />
58699879a562774640b95e9eedfd891f336e38c2nd <span class="indent">
58699879a562774640b95e9eedfd891f336e38c2nd AllowOverride None<br />
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive </span>
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive &lt;/Directory&gt;
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive </code></p></div>
58699879a562774640b95e9eedfd891f336e38c2nd
fb77c505254b6e9c925e23e734463e87574f8f40kess<h3>See also</h3>
fb77c505254b6e9c925e23e734463e87574f8f40kess<ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/configuring.html">Configuration Files</a></li>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
58699879a562774640b95e9eedfd891f336e38c2nd</ul>
58699879a562774640b95e9eedfd891f336e38c2nd</div>
58699879a562774640b95e9eedfd891f336e38c2nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
58699879a562774640b95e9eedfd891f336e38c2nd<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directive</a></h2>
58699879a562774640b95e9eedfd891f336e38c2nd<table class="directive">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default charset parameter to be added when a response
6b64034fa2a644ba291c484c0c01c7df5b8d982ckesscontent-type is <code>text/plain</code> or <code>text/html</code></td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd<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>
58699879a562774640b95e9eedfd891f336e38c2nd <p>This directive specifies a default value for the media type
58699879a562774640b95e9eedfd891f336e38c2nd charset parameter (the name of a character encoding) to be added
58699879a562774640b95e9eedfd891f336e38c2nd to a response if and only if the response's content-type is either
58699879a562774640b95e9eedfd891f336e38c2nd <code>text/plain</code> or <code>text/html</code>. This should override
58699879a562774640b95e9eedfd891f336e38c2nd any charset specified in the body of the response via a <code>META</code>
58699879a562774640b95e9eedfd891f336e38c2nd element, though the exact behavior is often dependent on the user's client
58699879a562774640b95e9eedfd891f336e38c2nd configuration. A setting of <code>AddDefaultCharset Off</code>
58699879a562774640b95e9eedfd891f336e38c2nd disables this functionality. <code>AddDefaultCharset On</code> enables
58699879a562774640b95e9eedfd891f336e38c2nd a default charset of <code>iso-8859-1</code>. Any other value is assumed
58699879a562774640b95e9eedfd891f336e38c2nd to be the <var>charset</var> to be used, which should be one of the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <a href="http://www.iana.org/assignments/character-sets">IANA registered
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd charset values</a> for use in MIME media types.
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick For example:</p>
c14037646789087319802aaada2e8534ccab0158slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <div class="example"><p><code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess AddDefaultCharset utf-8
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </code></p></div>
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <p><code class="directive">AddDefaultCharset</code> should only be used when all
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick of the text resources to which it applies are known to be in that
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd character encoding and it is too inconvenient to label their charset
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd individually. One such example is to add the charset parameter
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd to resources containing generated content, such as legacy CGI
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd scripts, that might be vulnerable to cross-site scripting attacks
58699879a562774640b95e9eedfd891f336e38c2nd due to user-provided data being included in the output. Note, however,
58699879a562774640b95e9eedfd891f336e38c2nd that a better solution is to just fix (or delete) those scripts, since
58699879a562774640b95e9eedfd891f336e38c2nd setting a default charset does not protect users that have enabled
58699879a562774640b95e9eedfd891f336e38c2nd the "auto-detect character encoding" feature on their browser.</p>
58699879a562774640b95e9eedfd891f336e38c2nd
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd<h3>See also</h3>
58699879a562774640b95e9eedfd891f336e38c2nd<ul>
58699879a562774640b95e9eedfd891f336e38c2nd<li><code class="directive"><a href="/mod/mod_mime.html#addcharset">AddCharset</a></code></li>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</ul>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</div>
9583adab6bc4b3758e41963c905d9dad9f067131nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<div class="directive-section"><h2><a name="AddOutputFilterByType" id="AddOutputFilterByType">AddOutputFilterByType</a> <a name="addoutputfilterbytype" id="addoutputfilterbytype">Directive</a></h2>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<table class="directive">
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>assigns an output filter to a particular MIME-type</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<var>MIME-type</var> [<var>MIME-type</var>] ...</code></td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</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<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.33 and later; deprecated in Apache 2.1 and later</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</table>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>This directive activates a particular output <a href="/filter.html">filter</a> for a request depending on the
77ead9e0262e4f08ec336d1a65b2edef7705c839nd response <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME-type</a>. Because of certain
77ead9e0262e4f08ec336d1a65b2edef7705c839nd problems discussed below, this directive is deprecated. The same
77ead9e0262e4f08ec336d1a65b2edef7705c839nd functionality is available using <code class="module"><a href="/mod/mod_filter.html">mod_filter</a></code>.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The following example uses the <code>DEFLATE</code> filter, which
77ead9e0262e4f08ec336d1a65b2edef7705c839nd is provided by <code class="module"><a href="/mod/mod_deflate.html">mod_deflate</a></code>. It will compress all
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick output (either static or dynamic) which is labeled as
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>text/html</code> or <code>text/plain</code> before it is sent
77ead9e0262e4f08ec336d1a65b2edef7705c839nd to the client.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <div class="example"><p><code>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd AddOutputFilterByType DEFLATE text/html text/plain
77ead9e0262e4f08ec336d1a65b2edef7705c839nd </code></p></div>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you want the content to be processed by more than one filter, their
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names have to be separated by semicolons. It's also possible to use one
003f0c9fda6664daf5092a0e42f65ede20098153slive <code class="directive">AddOutputFilterByType</code> directive for each of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess these filters.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The configuration below causes all script output labeled as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>text/html</code> to be processed at first by the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filter.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <div class="example"><p><code>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;Location /cgi-bin/&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <span class="indent">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </span>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen &lt;/Location&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess </code></p></div>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <div class="warning"><h3>Note</h3>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <p>Enabling filters with <code class="directive">AddOutputFilterByType</code>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd may fail partially or completely in some cases. For example, no
10673857794a4b3d9568ca2d983722a87ed352f1rbowen filters are applied if the <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME-type</a> could not be determined and falls
10673857794a4b3d9568ca2d983722a87ed352f1rbowen back to the <code class="directive"><a href="#defaulttype">DefaultType</a></code> setting,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive even if the <code class="directive"><a href="#defaulttype">DefaultType</a></code> is the
fb77c505254b6e9c925e23e734463e87574f8f40kess same.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>However, if you want to make sure, that the filters will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive applied, assign the content type to a resource explicitly, for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example with <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#forcetype">ForceType</a></code>. Setting the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content type within a (non-nph) CGI script is also safe.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="/mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/filter.html">filters</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<table class="directive">
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodlbe passed through</td></tr>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl<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<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.46 and later</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which contain encoded path separators (<code>%2F</code> for <code>/</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and additionally <code>%5C</code> for <code>\</code> on according systems)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to be used. Normally such URLs are refused with a 404 (Not found) error.</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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note</h3>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem according systems) will be left as such in the otherwise decoded URL
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem string.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem </div>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<h3>See also</h3>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<ul>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</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="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directive</a></h2>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<table class="directive">
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<code>.htaccess</code> files</td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem[<var>directive-type</var>] ...</code></td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverride All</code></td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>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>When the server finds an <code>.htaccess</code> file (as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it needs to know which directives declared in that file can override
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive earlier configuration directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Only available in &lt;Directory&gt; sections</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">AllowOverride</code> is valid only in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="#accessfilename">.htaccess</a> files are completely ignored.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive In this case, the server will not even attempt to read
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files in the filesystem.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When this directive is set to <code>All</code>, then any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files.</p>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <p>The <var>directive-type</var> can be one of the following
9ed9eaf871c58d281af02e76125ceadb5060afa5nd groupings of directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>AuthConfig</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna Allow use of the authorization directives (<code class="directive"><a href="/mod/mod_authn_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>,
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess <code class="directive"><a href="/mod/mod_authn_core.html#authname">AuthName</a></code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>FileInfo</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Allow use of the directives controlling document types (<code class="directive"><a href="#defaulttype">DefaultType</a></code>, <code class="directive"><a href="#errordocument">ErrorDocument</a></code>, <code class="directive"><a href="#forcetype">ForceType</a></code>, <code class="directive"><a href="/mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><a href="#sethandler">SetHandler</a></code>, <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>, <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <code class="module"><a href="/mod/mod_mime.html">mod_mime</a></code> Add* and Remove*
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd directives, <em>etc.</em>), 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>),
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <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
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>Indexes</dt>
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling directory indexing
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes (<code class="directive"><a href="/mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <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>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><a href="/mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <code class="directive"><a href="/mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#fancyindexing">FancyIndexing</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#readmename">ReadmeName</a></code>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <em>etc.</em>).</dd>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <dt>Limit</dt>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <dd>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes Allow use of the directives controlling host access (<code class="directive"><a href="/mod/mod_authz_host.html#allow">Allow</a></code>, <code class="directive"><a href="/mod/mod_authz_host.html#deny">Deny</a></code> and <code class="directive"><a href="/mod/mod_authz_host.html#order">Order</a></code>).</dd>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <dt>Options[=<var>Option</var>,...]</dt>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Allow use of the directives controlling specific directory
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess features (<code class="directive"><a href="#options">Options</a></code> and
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <code class="directive"><a href="/mod/mod_include.html#xbithack">XBitHack</a></code>).
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes An equal sign may be given followed by a comma (but no spaces)
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <div class="example"><p><code>
fb77c505254b6e9c925e23e734463e87574f8f40kess AllowOverride AuthConfig Indexes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the example above all directives that are neither in the group
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl<li><a href="/configuring.html">Configuration Files</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/howto/htaccess.html">.htaccess Files</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="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>NetWare only</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. For example, setting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>CGIMapExtension sys:\foo.nlm .foo</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause all CGI script files with a <code>.foo</code> extension to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be passed to the FOO interpreter.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess</div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheaders</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest 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>
e4881891552e185a7408318dfc7f62ebabe73cf6niq<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
76f2a3125fb6aca59d43b02220dabac91175a281slive<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 the generation of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Content-MD5</code> headers as defined in RFC1864
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive respectively RFC2616.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>MD5 is an algorithm for computing a "message digest"
c14037646789087319802aaada2e8534ccab0158slive (sometimes called "fingerprint") of arbitrary-length data, with
c14037646789087319802aaada2e8534ccab0158slive a high degree of confidence that any alterations in the data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be reflected in alterations in the message digest.</p>
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq <p>The <code>Content-MD5</code> header provides an end-to-end
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Note that this can cause performance problems on your server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since the message digest is computed on every request (the
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq values are not cached).</p>
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq <p><code>Content-MD5</code> is only sent for documents served
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq by the <code class="module"><a href="/mod/core.html">core</a></code>, and not by any module. For example,
e4881891552e185a7408318dfc7f62ebabe73cf6niq SSI documents, output from CGI scripts, and byte range responses
e4881891552e185a7408318dfc7f62ebabe73cf6niq do not have this header.</p>
e4881891552e185a7408318dfc7f62ebabe73cf6niq
e4881891552e185a7408318dfc7f62ebabe73cf6niq</div>
e4881891552e185a7408318dfc7f62ebabe73cf6niq<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>MIME content-type that will be sent if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver cannot determine a type in any other way</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>MIME-type|none</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType text/plain</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>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl</table>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>There will be times when the server is asked to provide a
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl document whose type cannot be determined by its <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME types</a> mappings.</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>The server SHOULD inform the client of the content-type of the
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl document. If the server is unable to determine this by normal
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl means, it will set it to the configured
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <code>DefaultType</code>. For example:</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <div class="example"><p><code>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl DefaultType image/gif
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl </code></p></div>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would be appropriate for a directory which contained many GIF
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive images with filenames missing the <code>.gif</code> extension.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In cases where it can neither be determined by the server nor
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the administrator (e.g. a proxy), it is preferable to omit the MIME
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type altogether rather than provide information that may be false.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This can be accomplished using</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DefaultType None
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>DefaultType None is only available in httpd-2.2.7 and later.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Note that unlike <code class="directive"><a href="#forcetype">ForceType</a></code>, this directive only
003f0c9fda6664daf5092a0e42f65ede20098153slive provides the default mime-type. All other mime-type definitions,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd including filename extensions, that might identify the media type
003f0c9fda6664daf5092a0e42f65ede20098153slive will override this default.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess</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="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2>
003f0c9fda6664daf5092a0e42f65ede20098153slive<table class="directive">
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define the existence of a variable</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>parameter-name</var></code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</table>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Equivalent to passing the <code>-D</code> argument to <a href="/programs/httpd.html">httpd</a>.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <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
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>-D</code> arguments in any startup scripts.</p>
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="Directory" id="Directory">&lt;Directory&gt;</a> <a name="directory" id="directory">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
fb77c505254b6e9c925e23e734463e87574f8f40kessnamed file-system directory and sub-directories</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Directory <var>directory-path</var>&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd... &lt;/Directory&gt;</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
030108b1816bcda3d925df65357feabdce83bc94slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
030108b1816bcda3d925df65357feabdce83bc94slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive">&lt;Directory&gt;</code> and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>&lt;/Directory&gt;</code> are used to enclose a group of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directives that will apply only to the named directory and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd sub-directories of that directory. Any directive that is allowed
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd in a directory context may be used. <var>Directory-path</var> is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd either the full path to a directory, or a wild-card string using
fb77c505254b6e9c925e23e734463e87574f8f40kess Unix shell-style matching. In a wild-card string, <code>?</code> matches
fb77c505254b6e9c925e23e734463e87574f8f40kess any single character, and <code>*</code> matches any sequences of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive characters. You may also use <code>[]</code> character ranges. None
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess of the wildcards match a `/' character, so <code>&lt;Directory
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess /*/public_html&gt;</code> will not match
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>/home/user/public_html</code>, but <code>&lt;Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /home/*/public_html&gt;</code> will match. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /usr/local/httpd/htdocs&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <span class="indent">
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options Indexes FollowSymLinks<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </span>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Directory&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </code></p></div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="note">
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Be careful with the <var>directory-path</var> arguments:
130d299c4b2b15be45532a176604c71fdc7bea5bnd They have to literally match the filesystem path which Apache uses
130d299c4b2b15be45532a176604c71fdc7bea5bnd to access the files. Directives applied to a particular
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>&lt;Directory&gt;</code> will not apply to files accessed from
130d299c4b2b15be45532a176604c71fdc7bea5bnd that same directory via a different path, such as via different symbolic
130d299c4b2b15be45532a176604c71fdc7bea5bnd links.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions</a> can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>would match directories in <code>/www/</code> that consisted of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive three numbers.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>If multiple (non-regular expression) <code class="directive">&lt;Directory&gt;</code> sections
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess 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,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <span class="indent">
130d299c4b2b15be45532a176604c71fdc7bea5bnd AllowOverride None<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </span>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Directory&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;Directory /home/&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <span class="indent">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd AllowOverride FileInfo<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </span>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;/Directory&gt;
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </code></p></div>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>for access to the document <code>/home/web/dir/doc.html</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the steps are:</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride None</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess (disabling <code>.htaccess</code> files).</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride FileInfo</code> (for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory <code>/home</code>).</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>Apply any <code>FileInfo</code> directives in
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/home/web/dir/.htaccess</code> in that order.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </ul>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Regular expressions are not considered until after all of the
130d299c4b2b15be45532a176604c71fdc7bea5bnd normal sections have been applied. Then all of the regular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd expressions are tested in the order they appeared in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file. For example, with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory ~ abc$&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ... directives here ...<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </span>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>the regular expression section won't be considered until after
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive all normal <code class="directive">&lt;Directory&gt;</code>s and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>.htaccess</code> files have been applied. Then the regular
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess expression will match on <code>/home/abc/public_html/abc</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the corresponding <code class="directive">&lt;Directory&gt;</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be applied.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Note that the default Apache access for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This means that Apache will serve any file mapped from an URL. It is
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess recommended that you change this with a block such
15ba1801088da1aad6d20609cf3f7b0b1eefce8aslive as</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="example"><p><code>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive &lt;Directory /&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from All<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </span>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>and then override this for directories you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>want</em> accessible. See the <a href="/misc/security_tips.html">Security Tips</a> page for more
030108b1816bcda3d925df65357feabdce83bc94slive details.</strong></p>
030108b1816bcda3d925df65357feabdce83bc94slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The directory sections occur in the <code>httpd.conf</code> file.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">&lt;Directory&gt;</code> directives
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/sections.html">How &lt;Directory&gt;,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive explanation of how these different sections are combined when a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request is received</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</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="DirectoryMatch" id="DirectoryMatch">&lt;DirectoryMatch&gt;</a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefile-system directories matching a regular expression and their
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesubdirectories</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;DirectoryMatch <var>regex</var>&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive... &lt;/DirectoryMatch&gt;</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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;DirectoryMatch&gt;</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of directives which will apply only to the named directory and
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd sub-directories of that directory, the same as <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>. However, it
fb77c505254b6e9c925e23e734463e87574f8f40kess takes as an argument a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular
fb77c505254b6e9c925e23e734463e87574f8f40kess expression</a>. For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match directories in <code>/www/</code> that consisted of three
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<ul>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<li><code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> for
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckessa description of how regular expressions are mixed in with normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<code class="directive">&lt;Directory&gt;</code>s</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Files&gt; sections work</a> for an explanation of how these different
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesections are combined when a request is received</li>
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen</ul>
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen</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="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<table class="directive">
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
003f0c9fda6664daf5092a0e42f65ede20098153slivefrom the web</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive</table>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>This directive sets the directory from which <code class="program"><a href="/programs/httpd.html">httpd</a></code>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp 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
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd path from the requested URL to the document root to make the
003f0c9fda6664daf5092a0e42f65ede20098153slive path to the document. Example:</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <div class="example"><p><code>
fb77c505254b6e9c925e23e734463e87574f8f40kess DocumentRoot /usr/web
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>then an access to
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <code>http://www.my.host.com/index.html</code> refers to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>The <code class="directive">DocumentRoot</code> should be specified without
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd a trailing slash.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<h3>See also</h3>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
af18698b10b429b270551ca3a5d51a75e1c9db22brianpLocations</a></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</ul>
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="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe</table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive controls whether the <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess memory-mapping if it needs to read the contents of a file during
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess delivery. By default, when the handling of a request requires
41ef8b3051855b802104193ee0a587515af60a37wrowe access to the data within a file -- for example, when delivering a
41ef8b3051855b802104193ee0a587515af60a37wrowe server-parsed file using <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> -- Apache
41ef8b3051855b802104193ee0a587515af60a37wrowe memory-maps the file if the OS supports it.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <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>
41ef8b3051855b802104193ee0a587515af60a37wrowe
fb77c505254b6e9c925e23e734463e87574f8f40kess <ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>On some multiprocessor systems, memory-mapping can reduce the
41ef8b3051855b802104193ee0a587515af60a37wrowe performance of the <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</li>
41ef8b3051855b802104193ee0a587515af60a37wrowe <li>With an NFS-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code>,
41ef8b3051855b802104193ee0a587515af60a37wrowe the <code class="program"><a href="/programs/httpd.html">httpd</a></code> may crash due to a segmentation fault if a file
41ef8b3051855b802104193ee0a587515af60a37wrowe is deleted or truncated while the <code class="program"><a href="/programs/httpd.html">httpd</a></code> has it
9fb925624300c864fe3969a264e52aa83f3c2dd0slive memory-mapped.</li>
41ef8b3051855b802104193ee0a587515af60a37wrowe </ul>
41ef8b3051855b802104193ee0a587515af60a37wrowe
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p>For server configurations that are vulnerable to these problems,
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd you should disable memory-mapping of delivered files by specifying:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <div class="example"><p><code>
41ef8b3051855b802104193ee0a587515af60a37wrowe EnableMMAP Off
41ef8b3051855b802104193ee0a587515af60a37wrowe </code></p></div>
41ef8b3051855b802104193ee0a587515af60a37wrowe
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>For NFS mounted files, this feature may be disabled explicitly for
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the offending files by specifying:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
41ef8b3051855b802104193ee0a587515af60a37wrowe <div class="example"><p><code>
41ef8b3051855b802104193ee0a587515af60a37wrowe &lt;Directory "/path-to-nfs-files"&gt;
41ef8b3051855b802104193ee0a587515af60a37wrowe <span class="indent">
41ef8b3051855b802104193ee0a587515af60a37wrowe EnableMMAP Off
41ef8b3051855b802104193ee0a587515af60a37wrowe </span>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive &lt;/Directory&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </code></p></div>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley</div>
9d00e5d0f270651f1f1cc1abea03bf53e5656fcecolm<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9d00e5d0f270651f1f1cc1abea03bf53e5656fcecolm<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<table class="directive">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile 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>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.44 and later</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe</table>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive controls whether <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use the
41ef8b3051855b802104193ee0a587515af60a37wrowe sendfile support from the kernel to transmit file contents to the client.
41ef8b3051855b802104193ee0a587515af60a37wrowe By default, when the handling of a request requires no access
fb77c505254b6e9c925e23e734463e87574f8f40kess to the data within a file -- for example, when delivering a
9fb925624300c864fe3969a264e52aa83f3c2dd0slive static file -- Apache uses sendfile to deliver the file contents
41ef8b3051855b802104193ee0a587515af60a37wrowe without ever reading the file if the OS supports it.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This sendfile mechanism avoids separate read and send operations,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and buffer allocations. But on some platforms or within some
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess filesystems, it is better to disable this feature to avoid
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess operational problems:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <ul>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <li>Some platforms may have broken sendfile support that the build
af18698b10b429b270551ca3a5d51a75e1c9db22brianp system did not detect, especially if the binaries were built on
af18698b10b429b270551ca3a5d51a75e1c9db22brianp another box and moved to such a machine with broken sendfile
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux the use of sendfile triggers TCP-checksum
003f0c9fda6664daf5092a0e42f65ede20098153slive offloading bugs on certain networking cards when using IPv6.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux on Itanium, sendfile may be unable to handle files
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd over 2GB in size.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS or SMB),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the kernel may be unable to serve the network file through
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own cache.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you should disable this feature by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For NFS or SMB mounted files, this feature may be disabled explicitly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the offending files by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Directory "/path-to-nfs-files"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </span>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
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>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</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#Override">Override:</a></th><td>FileInfo</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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Quoting syntax for text messages is different in Apache
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd2.0</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</table>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In the event of a problem or error, Apache can be configured
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to do one of four things,</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ol>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>output a simple hardcoded error message</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>output a customized message</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>redirect to a local <var>URL-path</var> to handle the
f7fe99050600166042c04b8e595fb75499eed7f0geoff problem/error</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>redirect to an external <var>URL</var> to handle the
f7fe99050600166042c04b8e595fb75499eed7f0geoff problem/error</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff </ol>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <p>The first option is the default, while options 2-4 are
f7fe99050600166042c04b8e595fb75499eed7f0geoff configured using the <code class="directive">ErrorDocument</code>
f7fe99050600166042c04b8e595fb75499eed7f0geoff directive, which is followed by the HTTP response code and a URL
f7fe99050600166042c04b8e595fb75499eed7f0geoff or a message. Apache will sometimes offer additional information
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regarding the problem/error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <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 <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 401 /subscription_info.html<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 403 "Sorry can't allow you access today"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Additionally, the special value <code>default</code> can be used
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to specify Apache's simple hardcoded message. While not required
fb77c505254b6e9c925e23e734463e87574f8f40kess under normal circumstances, <code>default</code> will restore
fb77c505254b6e9c925e23e734463e87574f8f40kess Apache's simple hardcoded message for configurations that would
fb77c505254b6e9c925e23e734463e87574f8f40kess otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive <div class="example"><p><code>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick &lt;Directory /web/docs&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <span class="indent">
fb77c505254b6e9c925e23e734463e87574f8f40kess ErrorDocument 404 default<br />
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive </span>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive &lt;/Directory&gt;
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive </code></p></div>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <p>Note that when you specify an <code class="directive">ErrorDocument</code>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive that points to a remote URL (ie. anything with a method such as
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <code>http</code> in front of it), Apache will send a redirect to the
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive client to tell it where to find the document, even if the
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive document ends up being on the same server. This has several
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive implications, the most important being that the client will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive the original error status code, but instead will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive a redirect status code. This in turn can confuse web
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive robots and other clients which try to determine if a URL is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive valid using the status code. In addition, if you use a remote
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL in an <code>ErrorDocument 401</code>, the client will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive know to prompt the user for a password since it will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive the 401 status code. Therefore, <strong>if you use an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>ErrorDocument 401</code> directive then it must refer to a local
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</strong></p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Microsoft Internet Explorer (MSIE) will by default ignore
3209c0009829fcf63b6213fb9c43d534f7906006slive server-generated error messages when they are "too small" and substitute
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own "friendly" error messages. The size threshold varies depending on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the type of error, but in general, if you make your error document
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive greater than 512 bytes, then MSIE will show the server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive error rather than masking it. More information is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess <p>Although most error messages can be overriden, there are certain
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess circumstances where the internal messages are used regardless of the
fb109b84906e3ee61680aa289953c2f9e859354erbowen setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. In
fb109b84906e3ee61680aa289953c2f9e859354erbowen particular, if a malformed request is detected, normal request processing
fb109b84906e3ee61680aa289953c2f9e859354erbowen will be immediately halted and the internal error message returned.
fb109b84906e3ee61680aa289953c2f9e859354erbowen This is necessary to guard against security problems caused by
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess bad requests.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Prior to version 2.0, messages were indicated by prefixing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive them with a single unmatched double quote character.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb109b84906e3ee61680aa289953c2f9e859354erbowen<h3>See also</h3>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<ul>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<li><a href="/custom-error.html">documentation of
fb109b84906e3ee61680aa289953c2f9e859354erbowen customizable responses</a></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="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<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>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ErrorLog</code> directive sets the name of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the file to which the server will log any errors it encounters. If
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick the <var>file-path</var> is not absolute then it is assumed to be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <div class="example"><h3>Example</h3><p><code>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes ErrorLog /var/log/httpd/error_log
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes </code></p></div>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <p>If the <var>file-path</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive begins with a pipe (|) then it is assumed to be a command to spawn
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to handle the error log.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><h3>Example</h3><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog "|/usr/local/bin/httpd_errors"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Using <code>syslog</code> instead of a filename enables logging
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive via syslogd(8) if the system supports it. The default is to use
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd syslog facility <code>local7</code>, but you can override this by
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele using the <code>syslog:<var>facility</var></code> syntax where
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>facility</var> can be one of the names usually documented in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive syslog(1).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><h3>Example</h3><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog syslog:user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>SECURITY: See the <a href="/misc/security_tips.html#serverroot">security tips</a>
fb77c505254b6e9c925e23e734463e87574f8f40kess document for details on why your security could be compromised
fb77c505254b6e9c925e23e734463e87574f8f40kess if the directory where log files are stored is writable by
fb77c505254b6e9c925e23e734463e87574f8f40kess anyone other than the user that starts the server.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <div class="warning"><h3>Note</h3>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When entering a file path on non-Unix platforms, care should be taken
fb77c505254b6e9c925e23e734463e87574f8f40kess to make sure that only forward slashed are used even though the platform
fb77c505254b6e9c925e23e734463e87574f8f40kess may allow the use of back slashes. In general it is a good idea to always
fb77c505254b6e9c925e23e734463e87574f8f40kess use forward slashes throughout the configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
530eba85dbd41b8a0fa5255d3648d1440199a661slive<h3>See also</h3>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<li><a href="/logs.html">Apache Log Files</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<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
530eba85dbd41b8a0fa5255d3648d1440199a661sliveHTTP response header</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag INode 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</table>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd The <code class="directive">FileETag</code> directive configures the file
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd attributes that are used to create the <code>ETag</code> (entity
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd tag) response header field when the document is based on a file.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (The <code>ETag</code> value is used in cache management to save
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd network bandwidth.) In Apache 1.3.22 and earlier, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>ETag</code> value was <em>always</em> formed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from the file's inode, size, and last-modified time (mtime). The
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">FileETag</code> directive allows you to choose
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem which of these -- if any -- should be used. The recognized keywords are:
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem </p>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <dl>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <dt><strong>INode</strong></dt>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <dd>The file's i-node number will be included in the calculation</dd>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <dt><strong>MTime</strong></dt>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <dd>The date and time the file was last modified will be included</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>Size</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The number of bytes in the file will be included</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>All</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All available fields will be used. This is equivalent to:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd>
003f0c9fda6664daf5092a0e42f65ede20098153slive <dt><strong>None</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>If a document is file-based, no <code>ETag</code> field will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd included in the response</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
003f0c9fda6664daf5092a0e42f65ede20098153slive keywords may be prefixed with either <code>+</code> or <code>-</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which allow changes to be made to the default setting inherited
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from a broader scope. Any keyword appearing without such a prefix
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive immediately and completely cancels the inherited setting.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>If a directory's configuration includes
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess subdirectory's includes <code>FileETag&nbsp;-INode</code>,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the setting for that subdirectory (which will be inherited by
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess 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>INode&nbsp;MTime&nbsp;Size</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a fixed format for <code>ETag</code> comparisons on conditional requests.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive These conditional requests will break if the <code>ETag</code> format is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive changed via <code class="directive">FileETag</code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="directive-section"><h2><a name="Files" id="Files">&lt;Files&gt;</a> <a name="files" id="files">Directive</a></h2>
030108b1816bcda3d925df65357feabdce83bc94slive<table class="directive">
030108b1816bcda3d925df65357feabdce83bc94slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched
030108b1816bcda3d925df65357feabdce83bc94slivefilenames</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive">&lt;Files&gt;</code> directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess limits the scope of the enclosed directives by filename. It is comparable
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified filename. <code class="directive">&lt;Files&gt;</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess sections are processed in the order they appear in the
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
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.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
003f0c9fda6664daf5092a0e42f65ede20098153slive can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>~</code> character. For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch">&lt;FilesMatch&gt;</a></code> is preferred,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive however.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <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
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>.htaccess</code> files. This allows users to control access to
030108b1816bcda3d925df65357feabdce83bc94slive their own files, at a file-by-file level.</p>
030108b1816bcda3d925df65357feabdce83bc94slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<h3>See also</h3>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</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="FilesMatch" id="FilesMatch">&lt;FilesMatch&gt;</a> <a name="filesmatch" id="filesmatch">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefilenames</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
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>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">&lt;FilesMatch&gt;</code> directive
003f0c9fda6664daf5092a0e42f65ede20098153slive limits the scope of the enclosed directives by filename, just as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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 <div class="example"><p><code>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
fb77c505254b6e9c925e23e734463e87574f8f40kess<h3>See also</h3>
fb77c505254b6e9c925e23e734463e87574f8f40kess<ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and &lt;Files&gt; sections work</a> for an explanation of how these
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different sections are combined when a request is received</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</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="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be served with the specified
7654193c1faf603feec999850322ad79e6c551bcndMIME content-type</td></tr>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>MIME-type</var>|None</code></td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<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>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved to the core in Apache 2.0</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd</table>
7654193c1faf603feec999850322ad79e6c551bcnd <p>When placed into an <code>.htaccess</code> file or a
7654193c1faf603feec999850322ad79e6c551bcnd <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, or
7654193c1faf603feec999850322ad79e6c551bcnd <code class="directive"><a href="#location">&lt;Location&gt;</a></code> or
7654193c1faf603feec999850322ad79e6c551bcnd <code class="directive"><a href="#files">&lt;Files&gt;</a></code>
7654193c1faf603feec999850322ad79e6c551bcnd section, this directive forces all matching files to be served
7654193c1faf603feec999850322ad79e6c551bcnd with the content type identification given by
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <var>MIME-type</var>. For example, if you had a directory full of
7654193c1faf603feec999850322ad79e6c551bcnd GIF files, but did not want to label them all with <code>.gif</code>,
7654193c1faf603feec999850322ad79e6c551bcnd you might want to use:</p>
7654193c1faf603feec999850322ad79e6c551bcnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType image/gif
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that unlike <code class="directive"><a href="#defaulttype">DefaultType</a></code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive this directive overrides all mime-type associations, including
fb77c505254b6e9c925e23e734463e87574f8f40kess filename extensions, that might identify the media type.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override any <code class="directive">ForceType</code> setting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by using the value of <code>None</code>:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # force all files to be image/gif:<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /images&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <span class="indent">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ForceType image/gif<br />
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick </span>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # but normal mime-type associations here:<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /images/mixed&gt;<br />
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </span>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess </code></p></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess
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="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
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>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd</table>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p>This directive enables DNS lookups so that host names can be
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd The value <code>Double</code> refers to doing double-reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DNS lookup. That is, after a reverse lookup is performed, a forward
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup is then performed on that result. At least one of the IP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addresses in the forward lookup must match the original
750d12c59545dbbac70390988de94f7e901b08f2niq address. (In "tcpwrappers" terminology this is called
750d12c59545dbbac70390988de94f7e901b08f2niq <code>PARANOID</code>.)</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>Regardless of the setting, when <code class="module"><a href="/mod/mod_authz_host.html">mod_authz_host</a></code> is
750d12c59545dbbac70390988de94f7e901b08f2niq used for controlling access by hostname, a double reverse lookup
750d12c59545dbbac70390988de94f7e901b08f2niq will be performed. This is necessary for security. Note that the
750d12c59545dbbac70390988de94f7e901b08f2niq result of this double-reverse isn't generally available unless you
750d12c59545dbbac70390988de94f7e901b08f2niq set <code>HostnameLookups Double</code>. For example, if only
750d12c59545dbbac70390988de94f7e901b08f2niq <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</div>
750d12c59545dbbac70390988de94f7e901b08f2niq<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
750d12c59545dbbac70390988de94f7e901b08f2niq<div class="directive-section"><h2><a name="If" id="If">&lt;If&gt;</a> <a name="if" id="if">Directive</a></h2>
750d12c59545dbbac70390988de94f7e901b08f2niq<table class="directive">
750d12c59545dbbac70390988de94f7e901b08f2niq<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is
750d12c59545dbbac70390988de94f7e901b08f2niqsatisfied by a request at runtime</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">&lt;If&gt;</code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive evaluates an expression at runtime, and applies the enclosed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives if and only if the expression evaluates to true.
003f0c9fda6664daf5092a0e42f65ede20098153slive For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;If "$req{Host} = ''"&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">&lt;If&gt;</code> has the same precedence
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and usage as <code class="directive">&lt;Files&gt;</code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</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="IfDefine" id="IfDefine">&lt;IfDefine&gt;</a> <a name="ifdefine" id="ifdefine">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndif a test is true at startup</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &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>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code> section is used to mark directives that are conditional. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives within an <code class="directive">&lt;IfDefine&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section are only processed if the <var>test</var> is true. If <var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive test</var> is false, everything between the start and end markers is
130d299c4b2b15be45532a176604c71fdc7bea5bnd ignored.</p>
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The <var>test</var> in the <code class="directive">&lt;IfDefine&gt;</code> section directive can be one of two forms:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <ul>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li><var>parameter-name</var></li>
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi <li><code>!</code><var>parameter-name</var></li>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi </ul>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <p>In the former case, the directives between the start and end
955d7fc3e7adb6463b7243e15c04e858718e799etakashi markers are only processed if the parameter named
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <var>parameter-name</var> is defined. The second format reverses
955d7fc3e7adb6463b7243e15c04e858718e799etakashi the test, and only processes the directives if
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <var>parameter-name</var> is <strong>not</strong> defined.</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <p>The <var>parameter-name</var> argument is a define as given on the
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <code class="program"><a href="/programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <p><code class="directive">&lt;IfDefine&gt;</code> sections are
955d7fc3e7adb6463b7243e15c04e858718e799etakashi nest-able, which can be used to implement simple
955d7fc3e7adb6463b7243e15c04e858718e799etakashi multiple-parameter tests. Example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd httpd -DReverseProxy ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # httpd.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;IfDefine ReverseProxy&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule rewrite_module modules/mod_rewrite.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule proxy_module modules/libproxy.so<br />
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki </span>
55d36f9b61520c2374ab463e77e8a62daa416398nd &lt;/IfDefine&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="directive-section"><h2><a name="IfModule" id="IfModule">&lt;IfModule&gt;</a> <a name="ifmodule" id="ifmodule">Directive</a></h2>
55d36f9b61520c2374ab463e77e8a62daa416398nd<table class="directive">
55d36f9b61520c2374ab463e77e8a62daa416398nd<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/IfModule&gt;</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
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<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Module identifiers are available in version 2.1 and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndlater.</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</table>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section is used to mark directives that are conditional on the presence of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a specific module. The directives within an <code class="directive">&lt;IfModule&gt;</code> section are only processed if the <var>test</var>
55d36f9b61520c2374ab463e77e8a62daa416398nd is true. If <var>test</var> is false, everything between the start and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive end markers is ignored.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>test</var> in the <code class="directive">&lt;IfModule&gt;</code> section directive can be one of two forms:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
55d36f9b61520c2374ab463e77e8a62daa416398nd <li><var>module</var></li>
55d36f9b61520c2374ab463e77e8a62daa416398nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>!<var>module</var></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ul>
55d36f9b61520c2374ab463e77e8a62daa416398nd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In the former case, the directives between the start and end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive markers are only processed if the module named <var>module</var>
55d36f9b61520c2374ab463e77e8a62daa416398nd is included in Apache -- either compiled in or
55d36f9b61520c2374ab463e77e8a62daa416398nd dynamically loaded using <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
55d36f9b61520c2374ab463e77e8a62daa416398nd and only processes the directives if <var>module</var> is
55d36f9b61520c2374ab463e77e8a62daa416398nd <strong>not</strong> included.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <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
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <code>STANDARD20_MODULE_STUFF</code>.</p>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p><code class="directive">&lt;IfModule&gt;</code> sections are
fb77c505254b6e9c925e23e734463e87574f8f40kess nest-able, which can be used to implement simple multiple-module
bea526116133aa3d7dabd1924bfc580b37fbf22aslive tests.</p>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2>
003f0c9fda6664daf5092a0e42f65ede20098153slive<table class="directive">
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
7b5535ed88e0f561b3bfb3330137bd804846afd4slivethe server configuration files</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Wildcard matching available in 2.0.41 and later</td></tr>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</table>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive allows inclusion of other configuration files
7b5535ed88e0f561b3bfb3330137bd804846afd4slive from within the server configuration files.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used to
7b5535ed88e0f561b3bfb3330137bd804846afd4slive include several files at once, in alphabetical order. In
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd addition, if <code class="directive">Include</code> points to a directory,
7b5535ed88e0f561b3bfb3330137bd804846afd4slive rather than a file, Apache will read all files in that directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and any subdirectory. But including entire directories is not
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess recommended, because it is easy to accidentally leave temporary
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess files in a directory that can cause <code class="program"><a href="/programs/httpd.html">httpd</a></code> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive fail.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The file path specified may be an absolute path, or may be relative
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>Examples:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="example"><p><code>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive Include /usr/local/apache2/conf/ssl.conf<br />
7b5535ed88e0f561b3bfb3330137bd804846afd4slive Include /usr/local/apache2/conf/vhosts/*.conf
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Include conf/ssl.conf<br />
7b5535ed88e0f561b3bfb3330137bd804846afd4slive Include conf/vhosts/*.conf
7b5535ed88e0f561b3bfb3330137bd804846afd4slive </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Running <code>apachectl configtest</code> will give you a list
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of the files that are being processed during the configuration
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd check:</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <div class="example"><p><code>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive root@host# apachectl configtest<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Processing config file: /usr/local/apache2/conf/ssl.conf<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Processing config file: /usr/local/apache2/conf/vhosts/vhost1.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Processing config file: /usr/local/apache2/conf/vhosts/vhost2.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Syntax OK
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="program"><a href="/programs/apachectl.html">apachectl</a></code></li>
003f0c9fda6664daf5092a0e42f65ede20098153slive</ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<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>
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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The Keep-Alive extension to HTTP/1.0 and the persistent
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For HTTP/1.0 clients, Keep-Alive connections will only be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used if they are specifically requested by a client. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addition, a Keep-Alive connection with an HTTP/1.0 client can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only be used when the length of the content is known in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive advance. This implies that dynamic content such as CGI output,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SSI pages, and server-generated directory listings will
891df99fdfa41fc8a486568f4d31ddf4a571258adreid generally not use Keep-Alive connections to HTTP/1.0 clients.
891df99fdfa41fc8a486568f4d31ddf4a571258adreid For HTTP/1.1 clients, persistent connections are the default
891df99fdfa41fc8a486568f4d31ddf4a571258adreid unless otherwise specified. If the client requests it, chunked
891df99fdfa41fc8a486568f4d31ddf4a571258adreid encoding will be used in order to send content of unknown
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive length over persistent connections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a client uses a Keep-Alive connection it will be counted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a single "request" for the MaxRequestsPerChild directive, regardless
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<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>seconds</var></code></td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick</table>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>The number of seconds Apache will wait for a subsequent
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick request before closing the connection. Once a request has been
c6f90ef0e93c077924fd0c3c0200dba0cb1777c6takashi received, the timeout value specified by the
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi may cause performance problems in heavily loaded servers. The
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick higher the timeout, the more server processes will be kept
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick occupied waiting on connections with idle clients.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive<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">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemethods</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Limit&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>
003f0c9fda6664daf5092a0e42f65ede20098153slive<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>Access controls are normally effective for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>all</strong> access methods, and this is the usual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive desired behavior. <strong>In the general case, access control
130d299c4b2b15be45532a176604c71fdc7bea5bnd directives should not be placed within a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">&lt;Limit&gt;</code> section.</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The purpose of the <code class="directive">&lt;Limit&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is to restrict the effect of the access controls to the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess nominated HTTP methods. For all other methods, the access
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess restrictions that are enclosed in the <code class="directive">&lt;Limit&gt;</code> bracket <strong>will have no
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess effect</strong>. The following example applies the access control
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess only to the methods <code>POST</code>, <code>PUT</code>, and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>DELETE</code>, leaving all other methods unprotected:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="example"><p><code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;Limit POST PUT DELETE&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <span class="indent">
130d299c4b2b15be45532a176604c71fdc7bea5bnd Require valid-user<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </span>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Limit&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The method names listed can be one or more of: <code>GET</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
6c5c651b0b97607b8c8b4965c1385c67699f217fnd <code>CONNECT</code>, <code>OPTIONS</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd case-sensitive.</strong> If <code>GET</code> is used it will also
6c5c651b0b97607b8c8b4965c1385c67699f217fnd restrict <code>HEAD</code> requests. The <code>TRACE</code> method
750d12c59545dbbac70390988de94f7e901b08f2niq cannot be limited (see <code class="directive"><a href="#traceenable">&lt;TraceEnable&gt;</a></code>).</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <div class="warning">A <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section should always be
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive used in preference to a <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> section when restricting access,
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive since a <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section provides protection
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive against arbitrary methods.</div>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive</div>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept">&lt;LimitExcept&gt;</a> <a name="limitexcept" id="limitexcept">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveexcept the named ones</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/LimitExcept&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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/LimitExcept&gt;</code> are used to enclose
003f0c9fda6664daf5092a0e42f65ede20098153slive a group of access control directives which will then apply to any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive HTTP access method <strong>not</strong> listed in the arguments;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive both standard and nonstandard/unrecognized methods. See the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen documentation for <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> for more details.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For example:</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;LimitExcept POST GET&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require valid-user<br />
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </span>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen &lt;/LimitExcept&gt;
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </code></p></div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd</div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2>
7ef9b6763ad87846cf83c3f71467f43e349d080aerikabele<table class="directive">
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine maximum number of internal redirects and nested
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowensubrequests</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 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's
03e0a375c2435102fb2b51e34cccff52acbfddcdnd mechanism to find out what would happen for some URI if it were requested.
03e0a375c2435102fb2b51e34cccff52acbfddcdnd For example, <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
a51fafd9c1463954daf49f94e76d078c1eb5c9bdnd files listed in the <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd directive.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p><code class="directive">LimitInternalRecursion</code> prevents the server
03e0a375c2435102fb2b51e34cccff52acbfddcdnd from crashing when entering an infinite loop of internal redirects or
03e0a375c2435102fb2b51e34cccff52acbfddcdnd subrequests. Such loops are usually caused by misconfigurations.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>The directive stores two different limits, which are evaluated on
03e0a375c2435102fb2b51e34cccff52acbfddcdnd per-request basis. The first <var>number</var> is the maximum number of
03e0a375c2435102fb2b51e34cccff52acbfddcdnd internal redirects, that may follow each other. The second <var>number</var>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd determines, how deep subrequests may be nested. If you specify only one
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <var>number</var>, it will be assigned to both limits.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <div class="example"><h3>Example</h3><p><code>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd LimitInternalRecursion 5
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </code></p></div>
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="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<table class="directive">
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent
03e0a375c2435102fb2b51e34cccff52acbfddcdndfrom the client</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 0</code></td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<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>This directive specifies the number of <var>bytes</var> from 0
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (meaning unlimited) to 2147483647 (2GB) that are allowed in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request body.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">LimitRequestBody</code> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user to set a limit on the allowed size of an HTTP request
003f0c9fda6664daf5092a0e42f65ede20098153slive message body within the context in which the directive is given
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (server, per-directory, per-file or per-location). If the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request exceeds that limit, the server will return an error
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd response instead of servicing the request. The size of a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request message body will vary greatly depending on the nature of
89ea3e2b9591820407538ac250ec49a0f4f056d2nd the resource and the methods allowed on that resource. CGI scripts
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive attacks.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>If, for example, you are permitting file upload to a particular
fb77c505254b6e9c925e23e734463e87574f8f40kess location, and wish to limit the size of the uploaded file to 100K,
fb77c505254b6e9c925e23e734463e87574f8f40kess you might use the following directive:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestBody 102400
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<table class="directive">
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of HTTP request header fields that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndwill be accepted from the client</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<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</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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 32767. The default value is defined by the compile-time
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd distributed).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">LimitRequestFields</code> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server administrator to modify the limit on the number of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request header fields allowed in an HTTP request. A server needs
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd this value to be larger than the number of fields that a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client request might include. The number of request header fields
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used by a client rarely exceeds 20, but this may vary among
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The value should be increased if normal clients see an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response from the server that indicates too many fields were
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent in the request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestFields 50
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</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="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFieldSize 8190</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</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that will be allowed in an HTTP request header.</p>
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen <p>The <code class="directive">LimitRequestFieldSize</code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to reduce or increase the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
72580dbc2a55511f13f377063725b9f143b20826stoddard from a normal client request. The size of a normal request header
72580dbc2a55511f13f377063725b9f143b20826stoddard field will vary greatly among different client implementations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive often depending upon the extent to which a user has configured
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess their browser to support detailed content negotiation. SPNEGO
72580dbc2a55511f13f377063725b9f143b20826stoddard authentication headers can be up to 12392 bytes.</p>
72580dbc2a55511f13f377063725b9f143b20826stoddard
72580dbc2a55511f13f377063725b9f143b20826stoddard <p>This directive gives the server administrator greater
72580dbc2a55511f13f377063725b9f143b20826stoddard control over abnormal client request behavior, which may be
72580dbc2a55511f13f377063725b9f143b20826stoddard useful for avoiding some forms of denial-of-service attacks.</p>
72580dbc2a55511f13f377063725b9f143b20826stoddard
56d7eed7205462540aec7202cd82d9f5516fc537kess <p>For example:</p>
72580dbc2a55511f13f377063725b9f143b20826stoddard
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestFieldSize 4094
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <div class="note">Under normal conditions, the value should not be changed from
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the default.</div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</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
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenfrom the client</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestLine 8190</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</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive sets the number of <var>bytes</var> that will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd allowed on the HTTP request-line.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">LimitRequestLine</code> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server administrator to reduce or increase the limit on the allowed size
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of a client's HTTP request-line. Since the request-line consists of the
72580dbc2a55511f13f377063725b9f143b20826stoddard HTTP method, URI, and protocol version, the
72580dbc2a55511f13f377063725b9f143b20826stoddard <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
72580dbc2a55511f13f377063725b9f143b20826stoddard hold any of its resource names, including any information that
72580dbc2a55511f13f377063725b9f143b20826stoddard might be passed in the query part of a <code>GET</code> request.</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.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestLine 4094
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </code></p></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <div class="note">Under normal conditions, the value should not be changed from
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the default.</div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</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="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<table class="directive">
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Limit (in bytes) on maximum size of an XML-based request
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele body. A value of <code>0</code> will disable any checking.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitXMLRequestBody 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="Location" id="Location">&lt;Location&gt;</a> <a name="location" id="location">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<table class="directive">
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveURLs</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Location
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&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>The <code class="directive">&lt;Location&gt;</code> directive
fb77c505254b6e9c925e23e734463e87574f8f40kess limits the scope of the enclosed directives by URL. It is similar to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive, and starts a subsection which is terminated with a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/Location&gt;</code> directive. <code class="directive">&lt;Location&gt;</code> sections are processed in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive order they appear in the configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive">&lt;Location&gt;</code> sections operate
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive completely outside the filesystem. This has several consequences.
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd Most importantly, <code class="directive">&lt;Location&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives should not be used to control access to filesystem
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive locations. Since several different URLs may map to the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystem location, such access controls may by circumvented.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>When to use <code class="directive">&lt;Location&gt;</code></h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>Use <code class="directive">&lt;Location&gt;</code> to apply
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive directives to content that lives outside the filesystem. For
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive 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
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <code>&lt;Location /&gt;</code>, which is an easy way to
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive apply a configuration to the entire server.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </div>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>For all origin (non-proxy) requests, the URL to be matched is a
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive URL-path of the form <code>/path/</code>. No scheme, hostname,
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive port, or query string may be included. For proxy requests, the
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive URL to be matched is of the form
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <code>scheme://servername/path</code>, and you must include the
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive prefix.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive any single character, and <code>*</code> matches any sequences of
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive characters. Neither wildcard character matches a / in the URL-path.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
dc223428958ad9ff05011545bcdda000887b93e5slive can also be used, with the addition of the
dc223428958ad9ff05011545bcdda000887b93e5slive <code>~</code> character. For example:</p>
dc223428958ad9ff05011545bcdda000887b93e5slive
dc223428958ad9ff05011545bcdda000887b93e5slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location ~ "/(extra|special)/data"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>would match URLs that contained the substring <code>/extra/data</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code> behaves
d8c44cd75cf575fe51319280c12445109e878523noodl identical to the regex version of <code class="directive">&lt;Location&gt;</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
030108b1816bcda3d925df65357feabdce83bc94slive <p>The <code class="directive">&lt;Location&gt;</code>
030108b1816bcda3d925df65357feabdce83bc94slive functionality is especially useful when combined with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>foo.com</code>, you might use:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /status&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <span class="indent">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess SetHandler server-status<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Order Deny,Allow<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Deny from all<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Allow from .foo.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </span>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note about / (slash)</h3>
e8811b6d38f756b325446ded5d96857d13856511takashi <p>The slash character has special meaning depending on where in a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL it appears. People may be used to its behavior in the filesystem
130d299c4b2b15be45532a176604c71fdc7bea5bnd where multiple adjacent slashes are frequently collapsed to a single
130d299c4b2b15be45532a176604c71fdc7bea5bnd slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/home/foo</code>). In URL-space this is not necessarily true.
130d299c4b2b15be45532a176604c71fdc7bea5bnd The <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd directive and the regex version of <code class="directive">&lt;Location&gt;</code> require you to explicitly specify multiple
130d299c4b2b15be45532a176604c71fdc7bea5bnd slashes if that is your intention.</p>
e8811b6d38f756b325446ded5d96857d13856511takashi
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
130d299c4b2b15be45532a176604c71fdc7bea5bnd the request URL <code>/abc</code> but not the request URL <code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd //abc</code>. The (non-regex) <code class="directive">&lt;Location&gt;</code> directive behaves similarly when used for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd proxy requests. But when (non-regex) <code class="directive">&lt;Location&gt;</code> is used for non-proxy requests it will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd implicitly match multiple slashes with a single slash. For example,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd if you specify <code>&lt;Location /abc/def&gt;</code> and the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd request is to <code>/abc//def</code> then it will match.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </div>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<h3>See also</h3>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and &lt;Files&gt; sections work</a> for an explanation of how these
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different sections are combined when a request is received</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</ul>
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="LocationMatch" id="LocationMatch">&lt;LocationMatch&gt;</a> <a name="locationmatch" id="locationmatch">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndmatching URLs</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LocationMatch
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive">&lt;LocationMatch&gt;</code> directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess limits the scope of the enclosed directives by URL, in an identical manner
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;LocationMatch "/(extra|special)/data"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>/special/data</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess and &lt;Files&gt; sections work</a> for an explanation of how these
030108b1816bcda3d925df65357feabdce83bc94slive different sections are combined when a request is received</li>
030108b1816bcda3d925df65357feabdce83bc94slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</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="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>level</var></code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LogLevel warn</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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p><code class="directive">LogLevel</code> adjusts the verbosity of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>emerg</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>Emergencies - system is unusable.</td>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive
1597043cec6ad37fa4154bf09b0fccdabed1a239slive <td>"Child cannot open lock file. Exiting"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <td><code>alert</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Server seems busy, (you may need to increase
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive StartServers, or Min/MaxSpareServers)..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>debug</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Debug-level messages</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Opening config file ..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a particular level is specified, messages from all
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive other levels of higher significance will be reported as well.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>E.g.</em>, when <code>LogLevel info</code> is specified,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then messages with log levels of <code>notice</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>warn</code> will also be posted.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Using a level of at least <code>crit</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LogLevel notice
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When logging to a regular file messages of the level
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>notice</code> cannot be suppressed and thus are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logged. However, this doesn't apply when logging is done
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using <code>syslog</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</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="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndconnection</td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele</table>
8b052d682204371decc64f942aede5ef1da98955erikabele <p>The <code class="directive">MaxKeepAliveRequests</code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the number of requests allowed per connection when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set to <code>0</code>, unlimited requests will be allowed. We
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommend that this setting be kept to a high value for maximum
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server performance.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele MaxKeepAliveRequests 500
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele </code></p></div>
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="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Designates an IP address for name-virtual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehosting</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</table>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code class="directive">NameVirtualHost</code> directive is a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd required directive if you want to configure <a href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Although <var>addr</var> can be hostname it is recommended
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that you always use an IP address, e.g.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
003f0c9fda6664daf5092a0e42f65ede20098153slive NameVirtualHost 111.22.33.44
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>With the <code class="directive">NameVirtualHost</code> directive you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specify the IP address on which the server will receive requests
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the name-based virtual hosts. This will usually be the address
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to which your name-based virtual host names resolve. In cases
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where a firewall or other proxy receives the requests and forwards
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive them on a different IP address to the server, you must specify the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive IP address of the physical interface on the machine which will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd servicing the requests. If you have multiple name-based hosts on
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd multiple addresses, repeat the directive for each address.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="note"><h3>Note</h3>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Note, that the "main server" and any <code>_default_</code> servers
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd will <strong>never</strong> be served for a request to a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">NameVirtualHost</code> IP address (unless for some
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reason you specify <code class="directive">NameVirtualHost</code> but then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive don't define any <code class="directive">VirtualHost</code>s for that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive address).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Optionally you can specify a port number on which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive name-based virtual hosts should be used, e.g.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost 111.22.33.44:8080
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </code></p></div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>IPv6 addresses must be enclosed in square brackets, as shown
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick in the following example:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <div class="example"><p><code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>To receive requests on all interfaces, you can use an argument of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>*</code></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd NameVirtualHost *
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="note"><h3>Argument to <code class="directive">&lt;VirtualHost&gt;</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive</h3>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Note that the argument to the <code class="directive">&lt;VirtualHost&gt;</code> directive must
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
cf02129aebf73dd0bdf369b172eb481ff76ac5f6colm
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost 1.2.3.4<br />
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen &lt;VirtualHost 1.2.3.4&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess # ...<br />
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen &lt;/VirtualHost&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen<h3>See also</h3>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/vhosts/">Virtual Hosts
fb77c505254b6e9c925e23e734463e87574f8f40kessdocumentation</a></li>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki</ul>
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="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnddirectory</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options All</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</table>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <code class="directive">Options</code> directive controls which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server features are available in a particular directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>option</var> can be set to <code>None</code>, in which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case none of the extra features are enabled, or one or more of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>All</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All options except for <code>MultiViews</code>. This is the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ExecCGI</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Execution of CGI scripts using <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>FollowSymLinks</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The server will follow symbolic links in this directory.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <div class="note">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Even though the server follows the symlink it does <em>not</em>
fb77c505254b6e9c925e23e734463e87574f8f40kess change the pathname used to match against <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
13e5182a0c199ecc7a73db97b6448a544e940868slive circumventable.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive </div></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt><code>Includes</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes provided by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd are permitted.</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>IncludesNOEXEC</code></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Server-side includes are permitted, but the <code>#exec
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd cmd</code> and <code>#exec cgi</code> are disabled. It is still
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive possible to <code>#include virtual</code> CGI scripts from
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive directories.</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Indexes</code></dt>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive If a URL which maps to a directory is requested, and there
13e5182a0c199ecc7a73db97b6448a544e940868slive is no <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
13e5182a0c199ecc7a73db97b6448a544e940868slive (<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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess of the directory.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>MultiViews</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <dd>
13e5182a0c199ecc7a73db97b6448a544e940868slive <a href="/content-negotiation.html">Content negotiated</a>
13e5182a0c199ecc7a73db97b6448a544e940868slive "MultiViews" are allowed using
b00583f8e126bbb00b06dcf06af06c9d07978701kess <code class="module"><a href="/mod/mod_negotiation.html">mod_negotiation</a></code>.</dd>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>SymLinksIfOwnerMatch</code></dt>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The server will only follow symbolic links for which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive target file or directory is owned by the same user id as the
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess link.
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <div class="note"><h3>Note</h3> <p>This option gets ignored if
13e5182a0c199ecc7a73db97b6448a544e940868slive set inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code> section.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>This option should not be considered a security restriction,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since symlink testing is subject to race conditions that make it
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess circumventable.</p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Normally, if multiple <code class="directive">Options</code> could
13e5182a0c199ecc7a73db97b6448a544e940868slive apply to a directory, then the most specific one is used and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive others are ignored; the options are not merged. (See <a href="/sections.html#mergin">how sections are merged</a>.)
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess However if <em>all</em> the options on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">Options</code> directive are preceded by a
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>+</code> or <code>-</code> symbol, the options are
13e5182a0c199ecc7a73db97b6448a544e940868slive merged. Any options preceded by a <code>+</code> are added to the
13e5182a0c199ecc7a73db97b6448a544e940868slive options currently in force, and any options preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> are removed from the options currently in
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive force. </p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <div class="warning"><h3>Warning</h3>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <code>-</code> with those without is not valid syntax, and is likely
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive to cause unexpected results.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <div class="example"><p><code>
13e5182a0c199ecc7a73db97b6448a544e940868slive &lt;Directory /web/docs&gt;<br />
13e5182a0c199ecc7a73db97b6448a544e940868slive <span class="indent">
13e5182a0c199ecc7a73db97b6448a544e940868slive Options Indexes FollowSymLinks<br />
13e5182a0c199ecc7a73db97b6448a544e940868slive </span>
13e5182a0c199ecc7a73db97b6448a544e940868slive &lt;/Directory&gt;<br />
13e5182a0c199ecc7a73db97b6448a544e940868slive <br />
13e5182a0c199ecc7a73db97b6448a544e940868slive &lt;Directory /web/docs/spec&gt;<br />
13e5182a0c199ecc7a73db97b6448a544e940868slive <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </span>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen &lt;/Directory&gt;
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen </code></p></div>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <p>then only <code>Includes</code> will be set for the
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <code>/web/docs/spec</code> directory. However if the second
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <code class="directive">Options</code> directive uses the <code>+</code> and
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>-</code> symbols:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="example"><p><code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;Directory /web/docs&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <span class="indent">
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options Indexes FollowSymLinks<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </span>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Directory&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;Directory /web/docs/spec&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <span class="indent">
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options +Includes -Indexes<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </span>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Directory&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>then the options <code>FollowSymLinks</code> and
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>Includes</code> are set for the <code>/web/docs/spec</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess directory.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note</h3>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Using <code>-IncludesNOEXEC</code> or
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>-Includes</code> disables server-side includes completely
130d299c4b2b15be45532a176604c71fdc7bea5bnd regardless of the previous setting.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The default in the absence of any other settings is
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>All</code>.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd</div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndby Apache children</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</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
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
ef8e89e090461194ecadd31e8796a2c51e0531a2kess processes forked off from the Apache parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logs.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>CPU resource limits are expressed in seconds per
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele process.</p>
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="#rlimitnproc">RLimitNPROC</a></code></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveby Apache children</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
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
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele processes forked off from the Apache parent such as piped
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Memory resource limits are expressed in bytes per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</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="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 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
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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess should be set to the maximum allowed by the operating system
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. Raising the maximum resource limit requires that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the server is running as <code>root</code>, or in the initial startup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>This applies to processes forked off from Apache children
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Process limits control the number of processes per user.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Note</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If CGI processes are <strong>not</strong> running
ef8e89e090461194ecadd31e8796a2c51e0531a2kess under user ids other than the web server user id, this directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will limit the number of processes that the server itself can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</ul>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</div>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<table class="directive">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessscripts</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</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>Win32 only;
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveoption <code>Registry-Strict</code> is available in Apache 2.0 and
fb77c505254b6e9c925e23e734463e87574f8f40kesslater</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive</table>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive is used to control how Apache finds the
fb77c505254b6e9c925e23e734463e87574f8f40kess interpreter used to run CGI scripts. The default setting is
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <code>Script</code>. This causes Apache to use the interpreter pointed to
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele by the shebang line (first line, starting with <code>#!</code>) in the
003f0c9fda6664daf5092a0e42f65ede20098153slive script. On Win32 systems this line usually looks like:</p>
18831446030f4eda7e0563c92a896ccfdb6eb1d7slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <div class="example"><p><code>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess #!C:/Perl/bin/perl.exe
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <div class="example"><p><code>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess #!perl
4cafc94e99922f00654e1779d30c2cccf5278c4fkess </code></p></div>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>Setting <code>ScriptInterpreterSource Registry</code> will
4cafc94e99922f00654e1779d30c2cccf5278c4fkess cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
4cafc94e99922f00654e1779d30c2cccf5278c4fkess searched using the script file extension (e.g., <code>.pl</code>) as a
4cafc94e99922f00654e1779d30c2cccf5278c4fkess search key. The command defined by the registry subkey
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <code>Shell\Open\Command</code> is used to open the script file. If the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess registry keys cannot be found, Apache falls back to the behavior of the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <code>Script</code> option.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
fb77c505254b6e9c925e23e734463e87574f8f40kess <div class="warning"><h3>Security</h3>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Be careful when using <code>ScriptInterpreterSource
4cafc94e99922f00654e1779d30c2cccf5278c4fkess Registry</code> with <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
4cafc94e99922f00654e1779d30c2cccf5278c4fkess Apache will try to execute <strong>every</strong> file within this
4cafc94e99922f00654e1779d30c2cccf5278c4fkess directory. The <code>Registry</code> setting may cause undesired
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive program calls on files which are typically not executed. For
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive example, the default open command on <code>.htm</code> files on
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive most Windows systems will execute Microsoft Internet Explorer, so
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess any HTTP request for an <code>.htm</code> file existing within the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess script directory would start the browser in the background on the
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki server. This is a good way to crash your system within a minute or
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive so.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </div>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>The option <code>Registry-Strict</code> which is new in Apache
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive 2.0 does the same thing as <code>Registry</code> but uses only the
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive subkey <code>Shell\ExecCGI\Command</code>. The
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <code>ExecCGI</code> key is not a common one. It must be
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive configured manually in the windows registry and hence prevents
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive accidental program calls on your system.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive</div>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<table class="directive">
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slivemessages sent to the client</td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ServerAdmin</code> sets the contact address
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that the server includes in any error messages it returns to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client. If the <code>httpd</code> doesn't recognize the supplied argument
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as an URL, it
003f0c9fda6664daf5092a0e42f65ede20098153slive assumes, that it's an <var>email-address</var> and prepends it with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mailto:</code> in hyperlink targets. However, it's recommended to
2e5e2673cb64d3e4d445d911c6f61ac171020725nd actually use an email address, since there are a lot of CGI scripts that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive make that assumption. If you want to use an URL, it should point to another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server under your control. Otherwise users may not be able to contact you in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case of errors.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <p>It may be worth setting up a dedicated address for this, e.g.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
733738e83a9b0113476e3f67992c2278d61ee4dakess <div class="example"><p><code>
733738e83a9b0113476e3f67992c2278d61ee4dakess ServerAdmin www-admin@foo.example.com
2e5e2673cb64d3e4d445d911c6f61ac171020725nd </code></p></div>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <p>as users do not always mention that they are talking about the
2e5e2673cb64d3e4d445d911c6f61ac171020725nd server!</p>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd
2e5e2673cb64d3e4d445d911c6f61ac171020725nd</div>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndto name-virtual hosts</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>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">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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost *&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ServerName server.domain.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAlias server server2.domain.com server2<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
206b5dce9e48924aa9f12ce87f14856a4cd3fb68takashi<h3>See also</h3>
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache Virtual Host documentation</a></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</ul>
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="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hostname and port that the server uses to identify
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnditself</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>In version 2.0, this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive supersedes the functionality of the <code class="directive">Port</code>
003f0c9fda6664daf5092a0e42f65ede20098153slive directive from version 1.3.</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>The <code class="directive">ServerName</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request scheme, hostname and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive port that the server uses to identify itself. This is used when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive creating redirection URLs. For example, if the name of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive machine hosting the web server is <code>simple.example.com</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive but the machine also has the DNS alias <code>www.example.com</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and you wish the web server to be so identified, the following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive should be used:</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName www.example.com:80
fb77c505254b6e9c925e23e734463e87574f8f40kess </code></p></div>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If no <code class="directive">ServerName</code> is specified, then the
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick server attempts to deduce the hostname by performing a reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup on the IP address. If no port is specified in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">ServerName</code>, then the server will use the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd port from the incoming request. For optimal reliability and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd predictability, you should specify an explicit hostname and port
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <code class="directive">ServerName</code> inside a
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><a href="#virtualhost">&lt;VirtualHost&gt;</a></code>
e08ad1a326852610a7930269638a43657fc50d06sctemme section specifies what hostname must appear in the request's
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>Host:</code> header to match this virtual host.</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Sometimes, the server runs behind a device that processes SSL,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive such as a reverse proxy, load balancer or SSL offload
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive appliance. When this is the case, specify the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>https://</code> scheme and the port number to which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive clients connect in the <code class="directive">ServerName</code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to make sure that the server generates the correct
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive self-referential URLs.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>See the description of the
e08ad1a326852610a7930269638a43657fc50d06sctemme <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
e08ad1a326852610a7930269638a43657fc50d06sctemme <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code>directives for
e08ad1a326852610a7930269638a43657fc50d06sctemme settings which determine whether self-referential URLs (e.g., by the
e08ad1a326852610a7930269638a43657fc50d06sctemme <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> module) will refer to the
e08ad1a326852610a7930269638a43657fc50d06sctemme specified port, or to the port number given in the client's request.
e08ad1a326852610a7930269638a43657fc50d06sctemme </p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<ul>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><a href="/dns-caveats.html">Issues Regarding DNS and
e08ad1a326852610a7930269638a43657fc50d06sctemme Apache</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache virtual host
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
e08ad1a326852610a7930269638a43657fc50d06sctemme<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</ul>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</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="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Legacy URL pathname for a name-based virtual host that
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveis accessed by an incompatible browser</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>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>The <code class="directive">ServerPath</code> directive sets the legacy
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL pathname for a host, for use with <a href="/vhosts/">name-based virtual hosts</a>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache 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="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">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 installation</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ServerRoot</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory in which the server lives. Typically it will contain the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subdirectories <code>conf/</code> and <code>logs/</code>. Relative
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relative to this directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen <div class="example"><h3>Example</h3><p><code>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen ServerRoot /home/httpd
fcc04773f0f2cc73650485facef9cd77f2d5bd65nd </code></p></div>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen<h3>See also</h3>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<ul>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen<li><a href="/invoking.html">the <code>-d</code>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<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">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the footer on server-generated documents</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The <code class="directive">ServerSignature</code> directive allows the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration of a trailing footer line under server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documents (error messages, <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> ftp directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive listings, <code class="module"><a href="/mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive would want to enable such a footer line is that in a chain of proxies,
fb77c505254b6e9c925e23e734463e87574f8f40kess the user often has no possibility to tell which of the chained servers
fb77c505254b6e9c925e23e734463e87574f8f40kess actually produced a returned error message.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <code>Off</code>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess setting, which is the default, suppresses the footer line (and is
ef8e89e090461194ecadd31e8796a2c51e0531a2kess therefore compatible with the behavior of Apache-1.2 and
ef8e89e090461194ecadd31e8796a2c51e0531a2kess below). The <code>On</code> setting simply adds a line with the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and the <code>EMail</code> setting additionally creates a
530eba85dbd41b8a0fa5255d3648d1440199a661slive "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz<ul>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</ul>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
f35c904c3b359610a46e94fbb4ba8495b2338521slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</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 controls whether <code>Server</code> response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header field which is sent back to clients includes a
530eba85dbd41b8a0fa5255d3648d1440199a661slive description of the generic OS-type of the server as well as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information about compiled-in modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Prod[uctOnly]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</code></dd>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dt><code>ServerTokens Major</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <dd>Server sends (<em>e.g.</em>): <code>Server:
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh Apache/2</code></dd>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <dt><code>ServerTokens Minor</code></dt>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <dd>Server sends (<em>e.g.</em>): <code>Server:
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh Apache/2.0</code></dd>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh <dt><code>ServerTokens Min[imal]</code></dt>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.0.41</code></dd>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh <dt><code>ServerTokens OS</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix)</code></dd>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh </dl>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This setting applies to the entire server, and cannot be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled or disabled on a virtualhost-by-virtualhost basis.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>After version 2.0.44, this directive also controls the
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<h3>See also</h3>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
f35c904c3b359610a46e94fbb4ba8495b2338521slive</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="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be processed by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehandler</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<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 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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, this directive forces all matching files to be parsed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive through the <a href="/handler.html">handler</a> given by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>handler-name</var>. For example, if you had a directory you
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd wanted to be parsed entirely as imagemap rule files, regardless
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of extension, you might put the following into an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> file in that directory:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd SetHandler imap-file
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Another example: if you wanted to have the server display a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive status report whenever a URL of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://servername/status</code> was called, you might put
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following into <code>httpd.conf</code>:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen <div class="example"><p><code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Location /status&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <span class="indent">
130d299c4b2b15be45532a176604c71fdc7bea5bnd SetHandler server-status<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </span>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Location&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code></p></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <p>You can override an earlier defined <code class="directive">SetHandler</code>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd directive by using the value <code>None</code>.</p>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <p><strong>Note:</strong> because SetHandler overrides default handlers,
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq normal behaviour such as handling of URLs ending in a slash (/) as
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq directories or index files is suppressed.</p>
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<ul>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<li><code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code></li>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen</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="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
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>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">SetInputFilter</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filter or filters which will process client requests and POST
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive input when they are received by the server. This is in addition to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any filters defined elsewhere, including the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <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>
003f0c9fda6664daf5092a0e42f65ede20098153slive<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive elsewhere, including the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, the following configuration will process all files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the <code>/www/data/</code> directory for server-side
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd includes.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="example"><p><code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;Directory /www/data/&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <span class="indent">
130d299c4b2b15be45532a176604c71fdc7bea5bnd SetOutputFilter INCLUDES<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </span>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
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>
003f0c9fda6664daf5092a0e42f65ede20098153slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
fa71303e53e7ef460728446b8290d05ed0895136trawick<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 300</code></td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<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</table>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <p>The <code class="directive">TimeOut</code> directive defines the length
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton of time Apache will wait for I/O in various circumstances:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <ol>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>When reading data from the client, the length of time to
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton wait for a TCP packet to arrive if the read buffer is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive empty.</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>When writing data to the client, the length of time to wait
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton for an acknowledgement of a packet if the send buffer is
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton full.</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>In <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, the length of time to wait for
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton output from a CGI script.</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
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>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe </ol>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe
12099dff89f3135d53929f4f1bdb42c7d044d928nd
12099dff89f3135d53929f4f1bdb42c7d044d928nd</div>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<table class="directive">
cb646158ff2c192d4325a10a280e5006d191db8awrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behaviour on <code>TRACE</code>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowerequests</td></tr>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</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<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 1.3.34, 2.0.55 and later</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd</table>
12099dff89f3135d53929f4f1bdb42c7d044d928nd <p>This directive overrides the behavior of <code>TRACE</code> for both
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe the core server and <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>. The default
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <code>TraceEnable on</code> permits <code>TRACE</code> requests per
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe RFC 2616, which disallows any request body to accompany the request.
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <code>TraceEnable off</code> causes the core server and
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
12099dff89f3135d53929f4f1bdb42c7d044d928nd allowed) error to the client.</p>
12099dff89f3135d53929f4f1bdb42c7d044d928nd
12099dff89f3135d53929f4f1bdb42c7d044d928nd <p>Finally, for testing and diagnostic purposes only, request
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe bodies may be allowed using the non-compliant <code>TraceEnable
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe extended</code> directive. The core (as an origin server) will
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe restrict the request body to 64k (plus 8k for chunk headers if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Transfer-Encoding: chunked</code> is used). The core will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reflect the full headers and all chunk headers with the response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive body. As a proxy server, the request body is not restricted to 64k.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess</div>
fb294b146e7ceb48e3983ee3684ba6c6506241c0jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directive</a></h2>
003f0c9fda6664daf5092a0e42f65ede20098153slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveport</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName Off</code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</table>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In many situations Apache must construct a <em>self-referential</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL -- that is, a URL that refers back to the same server. With
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>UseCanonicalName On</code> Apache will use the hostname and port
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified in the <code class="directive"><a href="#servername">ServerName</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive to construct the canonical name for the server. This name
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen is used in all self-referential URLs, and for the values of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>With <code>UseCanonicalName Off</code> Apache will form
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen self-referential URLs using the hostname and port supplied by
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen the client if any are supplied (otherwise it will use the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive canonical name, as defined above). These values are the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that are used to implement <a href="/vhosts/name-based.html">name based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and are available with the same clients. The CGI variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constructed from the client supplied values as well.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen type a shortname, and a URL which is a directory, such as
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <code>http://www/splat</code>, <em>without the trailing
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen slash</em> then Apache will redirect them to
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <code>http://www.domain.com/splat/</code>. If you have
fb77c505254b6e9c925e23e734463e87574f8f40kess authentication enabled, this will cause the user to have to
fb77c505254b6e9c925e23e734463e87574f8f40kess authenticate twice (once for <code>www</code> and once again
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for <code>www.domain.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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache will redirect to <code>http://www/splat/</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>There is a third option, <code>UseCanonicalName DNS</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which is intended for use with mass IP-based virtual hosting to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support ancient clients that do not provide a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>Host:</code> header. With this option Apache does a
130d299c4b2b15be45532a176604c71fdc7bea5bnd reverse DNS lookup on the server IP address that the client
130d299c4b2b15be45532a176604c71fdc7bea5bnd connected to in order to work out self-referential URLs.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="warning"><h3>Warning</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd they may be broken by this option. The client is essentially free
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to give whatever value they want as a hostname. But if the CGI is
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim only using <code>SERVER_NAME</code> to construct self-referential URLs
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim then it should be just fine.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim </div>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<h3>See also</h3>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<ul>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="#servername">ServerName</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim</ul>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim</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="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<table class="directive">
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jimport</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<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>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim</table>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>In many situations Apache must construct a <em>self-referential</em>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim URL -- that is, a URL that refers back to the same server. With
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code>UseCanonicalPhysicalPort On</code> Apache will, when
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim constructing the canonical port for the server to honor
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
b3ec2c7988894fc3722521c0a61fcb2ddab31c33colm provide the actual physical port number being used by this request
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim Apache will not ever use the actual physical port number, instead
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim relying on all configured information to construct a valid port number.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <div class="note"><h3>Note</h3>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>The ordering of when the physical port is used is as follows:<br /><br />
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code>UseCanonicalName On</code></p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <ul>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Port provided in <code>Servername</code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Physical port</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Default port</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim </ul>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code>UseCanonicalName Off | DNS</code>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <ul>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Parsed port from <code>Host:</code> header</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Physical port</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Port provided in <code>Servername</code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>Default port</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>With <code>UseCanonicalPhysicalPort Off</code>, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive physical ports are removed from the ordering.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
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="VirtualHost" id="VirtualHost">&lt;VirtualHost&gt;</a> <a name="virtualhost" id="virtualhost">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslivehostname or IP address</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;VirtualHost
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ...&gt; ... &lt;/VirtualHost&gt;</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive">&lt;VirtualHost&gt;</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
01710fa5f312f3a9cd1969d1809cf6c19a7f3d31niq directives that will apply only to a particular virtual host. Any
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive directive that is allowed in a virtual host context may be
fb77c505254b6e9c925e23e734463e87574f8f40kess used. When the server receives a request for a document on a
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive particular virtual host, it uses the configuration directives
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive enclosed in the <code class="directive">&lt;VirtualHost&gt;</code>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive section. <var>Addr</var> can be:</p>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li>The IP address of the virtual host;</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li>A fully qualified domain name for the IP address of the
130d299c4b2b15be45532a176604c71fdc7bea5bnd virtual host (not recommended);</li>
e8811b6d38f756b325446ded5d96857d13856511takashi
e8811b6d38f756b325446ded5d96857d13856511takashi <li>The character <code>*</code>, which is used only in combination with
e8811b6d38f756b325446ded5d96857d13856511takashi <code>NameVirtualHost *</code> to match all IP addresses; or</li>
e8811b6d38f756b325446ded5d96857d13856511takashi
e8811b6d38f756b325446ded5d96857d13856511takashi <li>The string <code>_default_</code>, which is used only
130d299c4b2b15be45532a176604c71fdc7bea5bnd with IP virtual hosting to catch unmatched IP addresses.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><h3>Example</h3><p><code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;VirtualHost 10.1.2.3&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <span class="indent">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ServerAdmin webmaster@host.foo.com<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd DocumentRoot /www/docs/host.foo.com<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ServerName host.foo.com<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ErrorLog logs/host.foo.com-error_log<br />
cf02129aebf73dd0bdf369b172eb481ff76ac5f6colm TransferLog logs/host.foo.com-access_log<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </span>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/VirtualHost&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </code></p></div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>IPv6 addresses must be specified in square brackets because
130d299c4b2b15be45532a176604c71fdc7bea5bnd the optional port number could not be determined otherwise. An
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd IPv6 example is shown below:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin webmaster@host.example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DocumentRoot /www/docs/host.example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName host.example.com<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorLog logs/host.example.com-error_log<br />
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive TransferLog logs/host.example.com-access_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </span>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/VirtualHost&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </code></p></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Each Virtual Host must correspond to a different IP address,
130d299c4b2b15be45532a176604c71fdc7bea5bnd different port number or a different host name for the server,
130d299c4b2b15be45532a176604c71fdc7bea5bnd in the former case the server machine must be configured to
130d299c4b2b15be45532a176604c71fdc7bea5bnd accept IP packets for multiple addresses. (If the machine does
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive not have multiple network interfaces, then this can be
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive accomplished with the <code>ifconfig alias</code> command -- if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive your OS supports it).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <div class="note"><h3>Note</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The use of <code class="directive">&lt;VirtualHost&gt;</code> does
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <strong>not</strong> affect what addresses Apache listens on. You
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive may need to ensure that Apache is listening on the correct addresses
506ccad87840d0f348a9b9560b711f0a8398ce6aslive using <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code>.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess </div>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <p>When using IP-based virtual hosting, the special name
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>_default_</code> can be specified in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which case this virtual host will match any IP address that is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive not explicitly listed in another virtual host. In the absence
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of any <code>_default_</code> virtual host the "main" server config,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive consisting of all those definitions outside any VirtualHost
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, is used when no IP-match occurs. (But note that any IP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive address that matches a <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> directive will use neither
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the "main" server config nor the <code>_default_</code> virtual host.
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive See the <a href="/vhosts/name-based.html">name-based virtual hosting</a>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive documentation for further details.)</p>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <p>You can specify a <code>:port</code> to change the port that is
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive matched. If unspecified then it defaults to the same port as the
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive most recent <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd statement of the main server. You may also specify <code>:*</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd to match all ports on that address. (This is recommended when used
130d299c4b2b15be45532a176604c71fdc7bea5bnd with <code>_default_</code>.)</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
130d299c4b2b15be45532a176604c71fdc7bea5bnd specified inside each <code class="directive">&lt;VirtualHost&gt;</code> block. If it is absent, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server configuration will be inherited.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki <div class="warning"><h3>Security</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>See the <a href="/misc/security_tips.html">security tips</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document for details on why your security could be compromised if the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directory where log files are stored is writable by anyone other
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess than the user that starts the server.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
7db9f691a00ead175b03335457ca296a33ddf31bnd<ul>
<li><a href="/vhosts/">Apache Virtual Host documentation</a></li>
<li><a href="/dns-caveats.html">Issues Regarding DNS and
Apache</a></li>
<li><a href="/bind.html">Setting
which addresses and ports Apache uses</a></li>
<li><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
and &lt;Files&gt; sections work</a> for an explanation of how these
different sections are combined when a request is received</li>
</ul>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="/de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
<a href="/en/mod/core.html" title="English">&nbsp;en&nbsp;</a> |
<a href="/ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a></p>
</div><div id="footer">
<p class="apache">Copyright 2008 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>
</body></html>