diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 06:33:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 06:33:50 +0000 |
commit | fe39ffb8b90ae4e002ed73fe98617cd590abb467 (patch) | |
tree | b80e5956907d8aeaaffe4e4f0c068c0e6157ce8b /docs/manual/mod/core.html | |
parent | Initial commit. (diff) | |
download | apache2-fe39ffb8b90ae4e002ed73fe98617cd590abb467.tar.xz apache2-fe39ffb8b90ae4e002ed73fe98617cd590abb467.zip |
Adding upstream version 2.4.56.upstream/2.4.56upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | docs/manual/mod/core.html | 25 | ||||
-rw-r--r-- | docs/manual/mod/core.html.de | 3911 | ||||
-rw-r--r-- | docs/manual/mod/core.html.en | 5288 | ||||
-rw-r--r-- | docs/manual/mod/core.html.es | 4602 | ||||
-rw-r--r-- | docs/manual/mod/core.html.fr.utf8 | 5669 | ||||
-rw-r--r-- | docs/manual/mod/core.html.ja.utf8 | 3825 | ||||
-rw-r--r-- | docs/manual/mod/core.html.tr.utf8 | 5245 |
7 files changed, 28565 insertions, 0 deletions
diff --git a/docs/manual/mod/core.html b/docs/manual/mod/core.html new file mode 100644 index 0000000..b5101aa --- /dev/null +++ b/docs/manual/mod/core.html @@ -0,0 +1,25 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: core.html.de +Content-Language: de +Content-type: text/html; charset=ISO-8859-1 + +URI: core.html.en +Content-Language: en +Content-type: text/html; charset=UTF-8 + +URI: core.html.es +Content-Language: es +Content-type: text/html; charset=ISO-8859-1 + +URI: core.html.fr.utf8 +Content-Language: fr +Content-type: text/html; charset=UTF-8 + +URI: core.html.ja.utf8 +Content-Language: ja +Content-type: text/html; charset=UTF-8 + +URI: core.html.tr.utf8 +Content-Language: tr +Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/core.html.de b/docs/manual/mod/core.html.de new file mode 100644 index 0000000..13b54da --- /dev/null +++ b/docs/manual/mod/core.html.de @@ -0,0 +1,3911 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head> +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>core - Apache HTTP Server Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP-Server</a> > <a href="http://httpd.apache.org/docs/">Dokumentation</a> > <a href="../">Version 2.4</a> > <a href="./">Module</a></div> +<div id="page-content"> +<div id="preamble"><h1>Apache-Kernfunktionen</h1> +<div class="toplang"> +<p><span>Verfügbare Sprachen: </span><a href="../de/mod/core.html" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate">Diese Übersetzung ist möglicherweise + nicht mehr aktuell. Bitte prüfen Sie die englische Version auf + die neuesten Änderungen.</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Beschreibung:</a></th><td>Ständig verfügbare Kernfunktionen des Apache HTTP +Servers</td></tr> +<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">Direktiven</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgivar">CGIVar</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxpipelined">FlushMaxPipelined</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxthreshold">FlushMaxThreshold</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#httpprotocoloptions">HttpProtocolOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#if"><If></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdirective"><IfDirective></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#iffile"><IfFile></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifsection"><IfSection></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergeslashes">MergeSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocols">Protocols</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocolshonororder">ProtocolsHonorOrder</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#qualifyredirecturl">QualifyRedirectURL</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#readbuffersize">ReadBufferSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#regexdefaultoptions">RegexDefaultOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#stricthostcheck">StrictHostCheck</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li> +</ul> +<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=core">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=core">Report a bug</a></li></ul><h3>Siehe auch</h3> +<ul class="seealso"> +<li><a href="#comments_section">Kommentare</a></li></ul></div> + +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a>-<a name="acceptfilter" id="acceptfilter">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Konfiguriert Optimierungen für lauschende Sockets bestimmter +Protokolle</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptFilter <var>Protokoll</var> <var>Filter</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Verfügbar ab Apache 2.1.5</td></tr> +</table> + <p>Diese Direktive aktiviert betriebssystemspezifische Optimierungen + für lauschende Sockets anhand des Protokolltyps. Der grundlegende + Ansatz ist, dass der Kernel das Socket nicht an den Serverprozess + übergibt, bis entweder Daten verfügbar sind oder eine komplette + HTTP-Anfrage zwischengespeichert wurde. Derzeit werden + ausschließlich die <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9">Accept-Filter von FreeBSD</a> und das primitivere + <code>TCP_DEFER_ACCEPT</code> von Linux unterstützt.</p> + + <p>Die Standardeinstellungen für FreeBSD sind:</p> + <div class="example"><p><code> + AcceptFilter http httpready<br /> + AcceptFilter https dataready + </code></p></div> + + <p>Der <code>httpready</code>-Accept-Filter puffert komplette + HTTP-Anfragen auf Kernelebene. Sobald eine Anfrage vollständig + vorliegt, schickt der Kernel sie an den Server weiter. Bitte schlagen Sie + in der <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9">accf_http(9)</a>-Manpage für weitere Details nach. HTTPS-Anfragen + sind verschlüsselt. Daher wird dafür nur der <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">accf_data(9)</a>-Filter verwendet.</p> + + <p>Die Standardeinstellungen für Linux sind:</p> + <div class="example"><p><code> + AcceptFilter http data<br /> + AcceptFilter https data + </code></p></div> + + <p><code>TCP_DEFER_ACCEPT</code> unter Linux unterstützt keine + Zwischenspeicherung von HTTP-Anfragen. Jeder andere Wert als + <code>none</code> aktiviert <code>TCP_DEFER_ACCEPT</code> auf dem + Lauschsocket. Mehr Details finden Sie in der <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">tcp(7)</a>-Manpage von Linux.</p> + + <p>Wenn Sie <code>none</code> als Argument verwenden, werden alle + Accept-Filter für das Protokoll abgeschaltet. Das ist sinnvoll + für Protokolle, bei denen der Server zuerst Daten senden muss, + wie zum Beispiel <code>nntp</code>:</p> + <div class="example"><p><code>AcceptFilter nttp none</code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a>-<a name="acceptpathinfo" id="acceptpathinfo">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Ressourcen lassen angehängte Pfadangaben zu</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>AcceptPathInfo Default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Verfügbar ab Apache 2.0.30</td></tr> +</table> + <p>Die Direktive steuert, ob Anfragen akzeptiert oder + abgewiesen werden, bei denen nach der tatsächlichen + Datei (oder einer nicht existierenden Datei in einem existierenden + Verzeichnis) zusätzliche Pfadangaben folgen. Die angehängte + Pfadangabe kann Skripten in der Umgebungsvariable <code>PATH_INFO</code> + verfügbar gemacht werden.</p> + + <p>Nehmen wir beispielsweise an, dass <code>/test/</code> auf ein + Verzeichnis zeigt, welches lediglich eine Datei <code>here.html</code> + enthält. Dann wird bei Anfragen nach + <code>/test/here.html/more</code> und + <code>/test/nothere.html/more</code> beides Mal <code>/more</code> + als <code>PATH_INFO</code> ermittelt.</p> + + <p>Die drei möglichen Argumente für die Direktive + <code class="directive">AcceptPathInfo</code> sind:</p> + + <dl> + <dt><code>Off</code></dt><dd>Eine Anfrage wird nur dann akzeptiert, + wenn sie exakt auf ein existierendes Verzeichnis (oder eine Datei) + abgebildet werden kann. Daher würde eine Anfrage mit einer nach dem + tatsächlichen Dateinamen angehängten Pfadangabe, wie + <code>/test/here.html/more</code> im obigen Beispiel, den Fehler + 404 NOT FOUND <span class="transnote">(<em>Anm.d.Ü.:</em> nicht gefunden)</span> + zurückgeben.</dd> + + <dt><code>On</code></dt> + <dd>Eine Anfrage wird akzeptiert, wenn eine vorangestellte Pfadangabe + auf ein existierendes Verzeichnis abgebildet werden kann. Das + obige Beispiel <code>/test/here.html/more</code> wird akzeptiert, + wenn <code>/test/here.html</code> auf eine gültige Datei + zeigt.</dd> + + <dt><code>Default</code></dt> + <dd>Die Behandlung von Anfragen mit angehängten Pfadangaben + wird von dem für die Anfrage verantwortlichen <a href="../handler.html">Handler</a> bestimmt. Der Core-Handler + für gewöhnliche Dateien weist <code>PATH_INFO</code>-Zugriffe + standardmäßig zurück. Handler, die Skripte bedienen, + wie z.B. <a href="mod_cgi.html">cgi-script</a> und + <a href="mod_isapi.html">isapi-handler</a>, sind im Allgemeinen darauf + voreingestellt, <code>PATH_INFO</code> zu akzeptieren.</dd> + </dl> + + <p>Das eigentliche Ziel von <code>AcceptPathInfo</code> ist es, Ihnen + das Überschreiben der Voreinstellung der Handler bezüglich + der Akzeptanz oder Ablehnung von <code>PATH_INFO</code> zu erlauben. + Eine solche Änderung ist zum Beispiel notwendig, wenn Sie einen + <a href="../filter.html">Filter</a> wie <a href="mod_include.html">INCLUDES</a> verwenden, um Inhalte + abhängig von <code>PATH_INFO</code> zu generieren. Der + Core-Handler würde die Anfrage normalerweise abweisen. Verwenden + Sie die folgende Konfiguration, um dennoch solch ein Skript zu + ermöglichen.</p> + + <div class="example"><p><code> + <Files "mypaths.shtml"><br /> + <span class="indent"> + Options +Includes<br /> + SetOutputFilter INCLUDES<br /> + AcceptPathInfo On<br /> + </span> + </Files> + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a>-<a name="accessfilename" id="accessfilename">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Name der dezentralen Konfigurationsdateien</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>Dateiname</var> [<var>Dateiname</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>AccessFileName .htaccess</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Aus dieser Namensliste sucht der Server während der + Bearbeitung einer Anfrage in jedem Verzeichnis nach der ersten + existierenden Datei, sofern im betreffenden Verzeichnis dezentrale + Konfigurationsdateien <a href="#allowoverride">erlaubt sind</a>. + Beispiel:</p> + + <div class="example"><p><code> + AccessFileName .acl + </code></p></div> + + <p>Vor der Rücksendung des Dokuments + <code>/usr/local/web/index.html</code> wird der Server + <code>/.acl</code>, <code>/usr/.acl</code>, + <code>/usr/local/.acl</code> und <code>/usr/local/web/.acl</code> + einlesen, solange diese nicht mit</p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + AllowOverride None<br /> + </span> + </Directory> + </code></p></div> + + <p>deaktiviert wurden.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Konfigurationsdateien</a></li> +<li><a href="../howto/htaccess.html">.htaccess-Dateien</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a>-<a name="adddefaultcharset" id="adddefaultcharset">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Standard-Charset-Parameter, der bei Antworten vom Content-Type + <code>text/plain</code> oder <code>text/html</code> hinzugefügt wird +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>Zeichenkodierung</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>AddDefaultCharset Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive gibt einen Standardwert für den Charset-Paramter des + Medientyps (den Namen einer Zeichencodierung) an, der einer Antwort + genau dann hinzugefügt wird, wenn der Content-Type der Antwort entweder + <code>text/plain</code> oder <code>text/html</code> ist. Dies sollte jedes + mittels <code>META</code>-Element im Datenteil der Antwort angegebene + Charset überschreiben. Das genaue Verhalten hängt jedoch oft von + der Client-Konfiguration des Benutzers ab. Die Einstellung + <code>AddDefaultCharset Off</code> deaktiviert diese Funktionalität. + <code>AddDefaultCharset On</code> aktiviert die Standard-Zeichenkodierung + <code>iso-8859-1</code>. Jeder andere Wert wird als die zu verwendende + <var>Zeichenkodierung</var> aufgefaßt, die eines der bei <a href="http://www.iana.org/assignments/character-sets">IANA registrierten + Charset-Werte</a> zur Verwendung in MIME-Medientypen sein sollte. Zum + Beispiel:</p> + + <div class="example"><p><code> + AddDefaultCharset utf-8 + </code></p></div> + + <p><code class="directive">AddDefaultCharset</code> sollte nur verwendet werden, + wenn von allen Textressourcen, für die es gilt, bekannt ist, dass sie + in dieser Zeichkodierung vorliegen, oder wenn es zu unbequem ist, ihre + Zeichenkodierung indivuell zu benennen. Ein solches Beispiel ist das + Hinzufügen des Charset-Parameters zu Ressourcen, die generierte + Inhalte enthalten. Ein Beispiel sind CGI-Skript-Altlasten, die aufgrund von + in die Ausgabe integrierten Daten, die durch den Benutzer übermittelt + wurden, gegen Cross-Site-Scripting-Angriffe verwundbar sind. Eine bessere + Lösung wäre jedoch, diese Skripte zu korrigieren (oder zu + löschen), da die Angabe einer Standard-Zeichencodierung keine + Anwender schützt, die in ihrem Browser die Funktion zur + automatischen Erkennung der Zeichenkodierung aktiviert haben.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a>-<a name="allowencodedslashes" id="allowencodedslashes">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Legt fest, ob kodierte Pfadtrennzeichen in URLs durchgereicht +werden dürfen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Verfügbar ab Apache 2.0.46</td></tr> +</table> + <p>Die <code class="directive">AllowEncodedSlashes</code>-Direktive erlaubt die + Verwendung von URLs, welche kodierte Pfadtrennzeichen (<code>%2F</code> + für <code>/</code> und auf entsprechenden Systemen zusätzlich + <code>%5C</code> für <code>\</code>) enthalten. Normalerweise werden + derartige URLs mit einem 404-Fehler (Nicht gefunden) abgewiesen.</p> + + <p><code class="directive">AllowEncodedSlashes</code> <code>On</code> ist + vor allem in Verbindung mit <code>PATH_INFO</code> hilfreich.</p> + + <div class="note"><h3>Anmerkung</h3> + <p>Das Erlauben von Schrägstrichen impliziert <em>nicht</em> deren + <em>Dekodierung</em>. Vorkommen von <code>%2F</code> oder <code>%5C</code> + (<em>nur</em> auf entsprechenden Systemen) werden unverändert in der + ansonsten dekodierten URL belassen.</p> + </div> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a>-<a name="allowoverride" id="allowoverride">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Direktiven-Typen, die in <code>.htaccess</code>-Dateien +erlaubt sind.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>Direktiven-Typ</var> +[<var>Direktiven-Typ</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>AllowOverride None (2.3.9 und später), AllowOverride All (2.3.8 und früher)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Wenn der Server eine <code>.htaccess</code>-Datei (wie durch + <code class="directive"><a href="#accessfilename">AccessFileName</a></code> definiert) + findet, muss er wissen, welche in der Datei angegebenen Direktiven + frühere Konfigurationsanweisungen überschreiben + dürfen.</p> + + <div class="note"><h3>Nur in <Directory>-Abschnitten verfügbar</h3> + <code class="directive">AllowOverride</code> ist nur in <code class="directive"><a href="#directory"><Directory></a></code>-Abschnitten + gültig, die ohne reguläre Ausdrücke definiert wurden, nicht + in <code class="directive"><a href="#location"><Location></a></code>-, + <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code>- oder + <code class="directive"><a href="#files"><Files></a></code>-Abschnitten. + </div> + + <p>Wenn diese Anweisung auf <code>None</code> gesetzt wird, dann + werden <a href="#accessfilename">.htaccess</a>-Dateien komplett + ignoriert. In diesem Fall wird der Server nicht einmal versuchen, + die <code>.htaccess</code>-Dateien im Dateisystem zu lesen.</p> + + <p>Wenn diese Anweisung auf <code>All</code> gesetzt wird, dann + ist jede Direktive in den <code>.htaccess</code>-Dateien erlaubt, + die den <a href="directive-dict.html#Context">Kontext</a> + .htaccess besitzt.</p> + + <p>Der <var>Direktiven-Typ</var> kann eine der folgenden + Anweisungsgruppen sein.</p> + + <dl> + <dt>AuthConfig</dt> + + <dd> + Erlaubt die Verwendung von Autorisierungs-Anweisungen (<code class="directive"><a href="../mod/mod_authz_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>, + <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>, + <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>usw.</em>).</dd> + + <dt>FileInfo</dt> + + <dd> + Erlaubt die Verwendung von Direktiven zur Steuerung der + Dokumenttypen (<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>, + <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>, und + <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code>-Direktiven Add* und Remove* + <em>usw.</em>), Metadaten (<code class="directive"><a href="../mod/mod_headers.html#header">Header</a></code>, <code class="directive"><a href="../mod/mod_headers.html#requestheader">RequestHeader</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvif">SetEnvIf</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookieexpires">CookieExpires</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiedomain">CookieDomain</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiestyle">CookieStyle</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookietracking">CookieTracking</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiename">CookieName</a></code>), + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>-Direktiven <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>) und + <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> aus + <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>. + </dd> + + <dt>Indexes</dt> + + <dd> + Erlaubt die Verwendung von Direktiven zur Steuerung von + Verzeichnisindizes (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <a href="mod_autoindex.html#indexoptions.fancyindexing"> + <code>FancyIndexing</code></a>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code> + <em>usw.</em>).</dd> + + <dt>Limit</dt> + + <dd> + Erlaubt die Verwendung von Direktiven zur Steuerung des + Zugriffs von Hosts (<code class="directive"><a href="../mod/mod_access_compat.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_access_compat.html#deny">Deny</a></code> und <code class="directive"><a href="../mod/mod_access_compat.html#order">Order</a></code>).</dd> + + <dt>Options[=<var>Option</var>,...]</dt> + + <dd> + Erlaubt die Verwendung von Direktiven zur Steuerung spezieller + Verzeichniseigenschaften (<code class="directive"><a href="#options">Options</a></code> + und <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>). Sie + können mit einem Gleichheitszeichen gefolgt von einer + kommaseparierten Liste (ohne Leerzeichen) angeben, welche Optionen mit + der <code class="directive"><a href="#options">Options</a></code>-Direktive gesetzt + werden dürfen.</dd> + </dl> + + <p>Beispiel:</p> + + <div class="example"><p><code> + AllowOverride AuthConfig Indexes + </code></p></div> + + <p>Im obigen Beispiel erzeugen alle Direktiven einen internal server + error <span class="transnote">(<em>Anm.d.Ü.:</em> Server-interner Fehler)</span>, die weder der + Gruppe <code>AuthConfig</code> noch der Gruppe <code>Indexes</code> + angehören.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><a href="../configuring.html">Konfigurationsdateien</a></li> +<li><a href="../howto/htaccess.html">.htaccess-Dateien</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a>-<a name="allowoverridelist" id="allowoverridelist">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Individual directives that are allowed in +<code>.htaccess</code> files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverrideList None|<var>directive</var> +[<var>directive-type</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>AllowOverrideList None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Configuration Files</a></li> +<li><a href="../howto/htaccess.html">.htaccess Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a>-<a name="cgimapextension" id="cgimapextension">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Technik zur Bestimmung des Interpreters für +CGI-Skripte</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>CGI-Pfad</var> <var>.Endung</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>ausschließlich NetWare</td></tr> +</table> + <p>Die Direktive wird zur Steuerung verwendet, wie Apache + den Interpreter ermittelt, der zur Ausführung von + CGI-Skripten verwendet wird. Beispielsweise bestimmt die Angabe + von <code>CGIMapExtension sys:\foo.nlm .foo</code>, dass + alle CGI-Scripte mit der Endung <code>.foo</code> an den + FOO-Interpreter übergeben werden.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a>-<a name="cgipassauth" id="cgipassauth">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Enables passing HTTP authorization headers to scripts as CGI +variables</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIPassAuth On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>CGIPassAuth Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>AuthConfig</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache HTTP Server 2.4.13 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIVar" id="CGIVar">CGIVar</a>-<a name="cgivar" id="cgivar">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Controls how some CGI variables are set</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIVar <var>variable</var> <var>rule</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache HTTP Server 2.4.21 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a>-<a name="contentdigest" id="contentdigest">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Aktiviert die Generierung von <code>Content-MD5</code> +HTTP-Response-Headern</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ContentDigest Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive aktiviert die Generierung von + <code>Content-MD5</code>-Headern, wie sie in RFC1864 bzw. RFC2616 + definiert sind.</p> + + <p>MD5 ist ein Algorithmus zur Berechnung eines "Datenextrakts" + (zuweilen "Fingerabdruck" genannt) <span class="transnote">(<em>Anm.d.Ü.:</em> Der "Datenextrakt" wird im + Englischen als "message digest" oder "fingerprint" bezeichnet.)</span> + aus beliebig langen Daten. Es gilt als zuverlässig, dass + Veränderungen an den Daten sich in Veränderungen des + Extrakts wiederspiegeln.</p> + + <p>Der <code>Content-MD5</code>-Header bietet eine + End-to-End-Integritätsprüfung (MIC) <span class="transnote">(<em>Anm.d.Ü.:</em> MIC steht für + "message integrity check".)</span> des Daten-Inhalts. Ein Proxy oder + Client kann diesen Header prüfen, um zufällige Veränderungen + des Entity-Inhalts bei der Übertragung festzustellen. + Beispielheader:</p> + + <div class="example"><p><code> + Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== + </code></p></div> + + <p>Beachten Sie bitte, dass dies Performanceprobleme auf Ihrem + System verursachen kann, da der Extrakt bei jeder Anfrage + berechnet wird (der Wert wird nicht zwischengespeichert).</p> + + <p><code>Content-MD5</code> wird nur für Dokumente gesendet, + die von <code class="module"><a href="../mod/core.html">core</a></code> bedient werden, nicht jedoch bei + Modulen. SSI-Dokumente, CGI-Skript-Ausgaben und Byte-Range-Antworten + besitzen diesen Header beispielsweise nicht.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a>-<a name="defaultruntimedir" id="defaultruntimedir">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Base directory for the server run-time files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache 2.4.2 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><a href="../misc/security_tips.html#serverroot">the + security tips</a> for information on how to properly set + permissions on the <code class="directive">ServerRoot</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a>-<a name="defaulttype" id="defaulttype">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>MIME-Content-Type, der gesendet wird, wenn der Server den Typ +nicht auf andere Weise ermitteln kann.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>MIME-Type</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>DefaultType text/plain</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Es kann vorkommen, dass der Server ein Dokument ausliefern muss, + dessen Typ er nicht mit Hilfe seiner <a class="glossarylink" href="../glossary.html#mime-type" title="siehe Glossar">MIME-Type</a>-Zuordnungen bestimmen kann.</p> + + <p>Der Server muss den Client über den Content-Type des + Dokumentes informieren. Daher verwendet er im Falle eines + unbekannten Typs die <code>DefaultType</code>-Einstellung. + Zum Beispiel:</p> + + <div class="example"><p><code> + DefaultType image/gif + </code></p></div> + + <p>wäre angemessen für ein Verzeichnis, das viele GIF-Bilder + enthält, deren Dateinamen nicht Endung <code>.gif</code> + besitzen.</p> + + <p>Beachten Sie bitte, dass die Direktive anders als <code class="directive"><a href="#forcetype">ForceType</a></code> lediglich den Standard-MIME-Type + bestimmt. Alle anderen MIME-Type-Definitionen, einschließlich + Dateierweiterungen, die den Medien-Typ anzeigen können, + überschreiben diese Voreinstellung.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Define" id="Define">Define</a>-<a name="define" id="define">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Define the existence of a variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>Parametername</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Equivalent zum übergeben von <var>Parametername</var> mittels des + <code>-D</code> Arguments an <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p> + <p>Diese Directive kann verwendet werden, um die Nutzung von <code class="directive"><a href="#ifdefine"><IfDefine></a></code> Sectionen umzuschalten, ohne die + <code>-D</code> Argumentente in etwaigen Start-Skripten ändern + zu müssen.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a>-<a name="directory" id="directory">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Umschließt eine Gruppe von Direktiven, die nur auf +das genannte Verzeichnis des Dateisystems und Unterverzeichnisse angewendet +werden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Directory <var>Verzeichnispfad</var>> +... </Directory></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><Directory></code> und + <code></Directory></code> werden dazu verwendet, eine Gruppe + von Direktiven zusammenzufassen, die nur für das genannte + Verzeichnis und dessen Unterverzeichnisse gelten. Jede Direktive, + die im Verzeichnis-Kontext erlaubt ist, kann verwendet werden. + <var>Verzeichnispfad</var> ist entweder der vollständige Pfad zu + einem Verzeichnis oder eine Zeichenkette mit Platzhaltern wie sie von der + Unix-Shell zum Abgleich verwendet werden. In einer Zeichenkette + mit Platzhaltern <span class="transnote">(<em>Anm.d.Ü.:</em> sogenannte wild-cards)</span> entspricht + <code>?</code> einem einzelnen Zeichen und <code>*</code> einer + Zeichenkette beliebiger Länge. Sie können auch auch + <code>[]</code>-Zeichenbereiche verwenden. Keiner der Platzhalter + entspricht dem Zeichen "/". Daher passt <code><Directory + /*/public_html></code> nicht auf <code>/home/user/public_html</code>, + <code><Directory /home/*/public_html></code> jedoch tut es. + Beispiel:</p> + + <div class="example"><p><code> + <Directory /usr/local/httpd/htdocs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory> + </code></p></div> + + <div class="note"> + <p>Seien Sie vorsichtig mit den <var>Verzeichnispfad</var>-Argumenten. + Sie müssen buchstäblich mit dem Dateisystempfad + übereinstimmen, den der Apache für den Zugriff auf die + Dateien verwendet. Direktiven, die für ein bestimmtes + Verzeichnis gelten, gelten nicht für Dateien in dem Verzeichnis, + auf die über einen anderen Pfad zugegriffen wird, wie z.B. + über verschiedene symbolische Links.</p> + </div> + + <p>Erweiterte <a class="glossarylink" href="../glossary.html#regex" title="siehe Glossar">reguläre Ausdrücke</a> können ebenfalls + verwendet werden, indem das Zeichen <code>~</code> hinzugefügt + wird. Beispielsweise würde</p> + + <div class="example"><p><code> + <Directory ~ "^/www/.*/[0-9]{3}"> + </code></p></div> + + <p>auf Verzeichnisse in <code>/www/</code> passen, die aus drei + Zahlen bestehen.</p> + + <p>Wenn mehrere <code class="directive"><Directory></code>-Abschnitte + (ohne reguläre Ausdrücke) auf ein Verzeichnis (oder + ein ihm übergeordnetes Verzeichnis) passen, welches ein Dokument + enthält, dann werden die Direktiven der Reihe nach, angefangen + beim kürzesten passenden Muster, vermischt mit den Direktiven + aus den <a href="#accessfilename">.htaccess</a>-Dateien, angewendet. + Beispiel:</p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + AllowOverride None<br /> + </span> + </Directory><br /> + <br /> + <Directory /home/><br /> + <span class="indent"> + AllowOverride FileInfo<br /> + </span> + </Directory> + </code></p></div> + + <p>Beim Zugriff auf das Dokument <code>/home/web/dir/doc.html</code> + sind die einzelnen Schritte:</p> + + <ul> + <li>Wende die Direktive <code>AllowOverride None</code> an + (deaktiviere <code>.htaccess</code>-Dateien).</li> + + <li>Wende die Direktive <code>AllowOverride FileInfo</code> + (auf das Verzeichnis <code>/home</code>) an.</li> + + <li>Wende jede <code>FileInfo</code>-Direktive aus + <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> und + <code>/home/web/dir/.htaccess</code> der Reihe nach an.</li> + </ul> + + <p>Reguläre Ausdrücke werden solange nicht berücksichtigt, + bis alle normalen Abschnitte angewendet wurden. Anschließend + werden alle regulären Ausdrücke in der Reihenfolge + geprüft, in der sie in der Konfigurationsdatei auftauchen. + Beispielsweise wird bei</p> + + <div class="example"><p><code> + <Directory ~ abc$><br /> + <span class="indent"> + # ... hier die Direktiven ...<br /> + </span> + </Directory> + </code></p></div> + + <p>der Abschnitt mit dem regulären Ausdruck nicht + berücksichtigt, bis alle normalen + <code class="directive"><Directory></code>-Abschnitte und + <code>.htaccess</code>-Dateien angewendet wurden. Dann erst wird + der reguläre Ausdruck mit <code>/home/abc/public_html/abc</code> + abgeglichen und der entsprechende <code class="directive"><Directory></code>-Abschnitt angewendet.</p> + + <p><strong>Beachten Sie bitte, dass der vom Apache voreingestellte + Zugriff für <code><Directory /></code> + <code>Allow from All</code> ist. Das bedeutet, dass der Apache + jede Datei ausliefert, die durch eine URL abgebildet wird. Es wird + empfohlen, dass Sie dies durch einen Block wie</strong></p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + Order Deny,Allow<br /> + Deny from All<br /> + </span> + </Directory> + </code></p></div> + + <p><strong>ändern und anschließend für + Verzeichnisse überschreiben, die Sie verfügbar machen + <em>wollen</em>. Für weitere Einzelheiten lesen Sie bitte + die Seite zu den <a href="../misc/security_tips.html">Sicherheitshinweisen</a>.</strong></p> + + <p>Die Verzeichnisabschnitte erscheinen in der Datei + <code>httpd.conf</code>. <code class="directive"><Directory></code>-Direktiven dürfen nicht + ineinander verschachtelt werden oder innerhalb von <code class="directive"><a href="#limit"><Limit></a></code>- oder <code class="directive"><a href="#limitexcept"><LimitExcept></a></code>-Abschnitten auftauchen.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../sections.html">Wie die Abschnitte <Directory>, + <Location> und <Files> arbeiten</a> für eine + Erläuterung, wie diese verschiedenen Abschnitte miteinander + kombiniert werden, wenn eine Anfrage empfangen wird</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a>-<a name="directorymatch" id="directorymatch">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Umschließt eine Gruppe von Direktiven, die auf + Verzeichnisse des Dateisystems und ihre Unterverzeichnisse abgebildet + werden, welche auf einen regulären Ausdruck passen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><DirectoryMatch <var>regex</var>> +... </DirectoryMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><DirectoryMatch></code> und + <code></DirectoryMatch></code> werden dazu verwendet, eine + Gruppe von Direktiven zusammenzufassen, die nur für das + genannte Verzeichnis und dessen Unterverzeichnisse gelten, genauso + wie bei <code class="directive"><a href="#directory"><Directory></a></code>. + Als Argument dient jedoch ein <a class="glossarylink" href="../glossary.html#regex" title="siehe Glossar">regulärer + Ausdruck</a>. Beispielsweise würde</p> + + <div class="example"><p><code> + <DirectoryMatch "^/www/.*/[0-9]{3}"> + </code></p></div> + + <p>auf Verzeichnisse in <code>/www/</code> passen, die aus drei + Zeichen bestehen.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#directory"><Directory></a></code> + für eine Beschreibung, wie reguläre Ausdrücke mit + normalen <code class="directive"><Directory></code>-Anweisungen + vermischt werden.</li> +<li><a href="../sections.html">Wie die Abschnitte <Directory>, + <Location> und <Files> arbeiten</a> für eine + Erläuterung, wie diese verschiedenen Abschnitte miteinander + kombiniert werden, wenn eine Anfrage empfangen wird</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a>-<a name="documentroot" id="documentroot">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Verzeichnis, welches den Haupt-Dokumentenbaum bildet, der im +Web sichtbar ist.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>Verzeichnis</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive setzt das Verzeichnis, von dem aus + <code class="program"><a href="../programs/httpd.html">httpd</a></code> Dateien ausliefert. Sofern nicht eine Direktive + wie <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code> greift, hängt + der Server Pfade aus der angeforderten URL an das Wurzelverzeichnis + an, um den Pfad zum Dokument zu bilden. Beispiel:</p> + + <div class="example"><p><code> + DocumentRoot /usr/web + </code></p></div> + + <p>Damit bezieht sich ein Zugriff auf + <code>http://www.my.host.com/index.html</code> auf + <code>/usr/web/index.html</code>. Wenn das <var>Verzeichnis</var> nicht + absolut angegeben ist, wird es relativ zu <code class="directive"><a href="#serverroot">ServerRoot</a></code> betrachtet.</p> + + <p><code class="directive">DocumentRoot</code> sollte ohne einen + Schrägstrich am Ende angegeben werden.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../urlmapping.html">URLs auf das Dateisystem +abbilden</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Else" id="Else"><Else></a>-<a name="else" id="else">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Contains directives that apply only if the condition of a +previous <code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><a href="#elseif"><ElseIf></a></code> section is not +satisfied by a request at runtime</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Else> ... </Else></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ElseIf" id="ElseIf"><ElseIf></a>-<a name="elseif" id="elseif">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Contains directives that apply only if a condition is satisfied +by a request at runtime while the condition of a previous +<code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><ElseIf></code> section is not +satisfied</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><a href="../expr.html">Expressions in Apache HTTP Server</a>, +for a complete reference and more examples.</li> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a>-<a name="enablemmap" id="enablemmap">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Verwende Memory-Mapping, um Dateien während der +Auslieferung zu lesen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>EnableMMAP On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive steuert, ob <code class="program"><a href="../programs/httpd.html">httpd</a></code> Memory-Mapping + verwenden darf, wenn er während der Auslieferung den Inhalt einer + Datei lesen muss. Wenn die Bearbeitung einer Anfrage es erfordert, + auf die Daten in einer Datei zuzugreifen -- zum Beispiel bei der + Auslieferung einer mittels <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> serverseitig + analysierten Datei --, dann verwendet der Apache standardmäßig + Memory-Mapping für diese Datei, sofern das Betriebssystem es + unterstützt.</p> + + <p>Memory-Mapping bedeutet zuweilen eine Performanceverbesserung. + In einigen Umgebungen ist es jedoch besser, Memory-Mapping zu + deaktivieren, um Problemen während des Betriebs vorzubeugen:</p> + + <ul> + <li>Bei einigen Multiprozessorsystemen kann Memory-Mapping die + Performance von <code class="program"><a href="../programs/httpd.html">httpd</a></code> reduzieren.</li> + <li>Bei einem per NFS eingebundenen <code class="directive"><a href="#documentroot">DocumentRoot</a></code> kann <code class="program"><a href="../programs/httpd.html">httpd</a></code> mit + einem Speicherzugriffsfehler <span class="transnote">(<em>Anm.d.Ü.:</em> ein so genannter "segmentation + fault")</span> abstürzen, wenn eine Datei gelöscht oder + gekürzt wird, während <code class="program"><a href="../programs/httpd.html">httpd</a></code> sie im Speicher + abbildet.</li> + </ul> + + <p>Bei Serverkonfigurationen, die für dieses Problem + anfällig sind, sollten Sie das Memory-Mapping für + auszuliefernde Dateien deaktivieren, indem Sie schreiben:</p> + + <div class="example"><p><code> + EnableMMAP Off + </code></p></div> + + <p>Bei per NFS eingebundenen Dateien kann diese Funktion + explizit für die störenden Dateien deaktiviert werden, + indem Sie angeben:</p> + + <div class="example"><p><code> + <Directory "/pfad-zu-den-nfs-dateien"> + <span class="indent"> + EnableMMAP Off + </span> + </Directory> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a>-<a name="enablesendfile" id="enablesendfile">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Verwende die sendfile-Unterstützung des Kernels, um +Dateien an den Client auszuliefern</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>EnableSendfile On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Verfügbar ab Apache Version 2.0.44</td></tr> +</table> + <p>Die Direktive steuert, ob <code class="program"><a href="../programs/httpd.html">httpd</a></code> die + sendfile-Unterstützung des Kernels verwenden kann, um + Dateiinhalte an den Client zu übermitteln. Wenn die Bearbeitung + einer Anfrage keinen Zugriff auf die Daten in der Datei erfordert -- + zum Beispiel bei der Auslieferung einer statischen Datei -- und das + Betriebssystem es unterstützt, verwendet der Apache + standardmäßig sendfile, um den Dateiinhalt zu + übertragen, ohne die Datei jemals zu lesen.</p> + + <p>Der sendfile-Mechanismus vermeidet getrennte Lese- und + Sendeoperationen sowie Puffer-Zuweisungen. Bei einigen Plattformen bzw. + Dateisystemen deaktivieren Sie diese Funktion jedoch besser, um Probleme + während des Betriebs zu vermeiden:</p> + + <ul> + <li>Einige Plattformen besitzen u.U. eine fehlerhafte + sendfile-Unterstützung, die das Erstellungssystem nicht erkennt, + insbesondere wenn die Binärdateien auf einem anderen Rechner erstellt + und auf eine solche Maschine mit fehlerhafter sendfile-Unterstützung + übertragen wurden.</li> + <li>Bei einem über das Netzwerk eingebundenen <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (z.B. NFS oder SMB) ist der + Kernel möglicherweise nicht in der Lage, die Netzwerkdatei + über seinen eigenen Cache zu bedienen.</li> + <li>Unter Linux löst die Verwendung von <code>sendfile</code> + in Verbindung mit bestimmten Netzwerkkarten und IPv6 + TCP-Checksummenfehler aus.</li> + <li>Unter Linux auf Itanium-Systemen kommt sendfile unter Umständen + nicht mit Dateien größer als 2GB klar.</li> + </ul> + + <p>Bei Serverkonfigurationen, die für dieses Problam + anfällig sind, sollten die diese Funktion deaktivieren, indem + Sie schreiben:</p> + + <div class="example"><p><code> + EnableSendfile Off + </code></p></div> + + <p>Bei per NFS oder SMB eingebundenen Dateien kann diese Funktion + explizit für die störenden Dateien deaktiviert werden, indem + Sie angeben:</p> + + <div class="example"><p><code> + <Directory "/pfad-zu-den-nfs-dateien"> + <span class="indent"> + EnableSendfile Off + </span> + </Directory> + </code></p></div> + <p>Beachten Sie bitte, dass die verzeichnisbasierte und + .htaccess-Konfiguration von <code class="directive">EnableSendfile</code> + nicht vom <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code>-Modul unterstützt wird. + Nur die globale Konfiguration von <code class="directive">EnableSendfile</code> + wird vom Modul beachtet. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Error" id="Error">Error</a>-<a name="error" id="error">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Abort configuration parsing with a custom error message</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Error <var>message</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>2.3.9 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a>-<a name="errordocument" id="errordocument">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Das, was der Server im Fehlerfall an den Client +zurückgibt</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>Fehlercode</var> <var>Dokument</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Die Syntax der Anführungszeichen bei Textnachrichten hat +sich im Apache 2.0 geändert</td></tr> +</table> + <p>Im Falle eines Problems oder Fehlers kann der Apache + konfiguriert werden, eine der vier Aktionen auszuführen:</p> + + <ol> + <li>Ausgabe einer einfachen, hartkodierten Fehlermeldung</li> + + <li>Ausgabe einer angepassten Meldung</li> + + <li>Umleitung zu einem lokalen <var>URL-Pfad</var> der das + Problem bzw. den Fehler behandelt</li> + + <li>Umleitung zu einer externen <var>URL</var>, die das Problem + bzw. den Fehler behandelt</li> + </ol> + + <p>Die erste Option ist Voreinstellung, während die Optionen + 2 bis 4 über die Direktive <code class="directive">ErrorDocument</code> + eingestellt werden, welcher der HTTP-Statuscode und eine + URL oder Nachricht folgen. Abhängig vom Problem bzw. Fehler bietet + der Apache manchmal zusätzliche Informationen an.</p> + + <p>URLs können bei lokalen Webpfaden mit einem Schrägstrich + (/) beginnen (relativ zum <code class="directive"><a href="#documentroot">DocumentRoot</a></code>-Verzeichnis) oder eine vollständige URL + bilden, die der Client auflösen kann. Alternativ kann eine + Nachricht für die Anzeige im Browser angeboten werden. Beispiel:</p> + + <div class="example"><p><code> + ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br /> + ErrorDocument 404 /cgi-bin/falsche_urls.pl<br /> + ErrorDocument 401 /info_zur_anmeldung.html<br /> + ErrorDocument 403 "Der Zugriff ist nicht erlaubt." + </code></p></div> + + <p>Außerdem kann der spezielle Wert <code>default</code> angegeben + werden, um die schlichte, hartkodierte Nachricht des Apache zu verwenden. + Es wird normalerweise nicht benötigt, doch <code>default</code> + stellt die einfach, im Apache hartkodierte Meldung in Konfigurationen + wieder her, die ansonsten von einem existierenden <span class="transnote">(<em>Anm.d.Ü.:</em> zuvor + konfigurierten)</span> <code class="directive">ErrorDocument</code> erben + würden.</p> + + <div class="example"><p><code> + ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br /> + <Directory /web/docs><br /> + <span class="indent"> + ErrorDocument 404 default<br /> + </span> + </Directory> + </code></p></div> + + <p>Wenn Sie eine <code class="directive">ErrorDocument</code>-Anweisung + angeben, die auf eine entfernte URL weist (d.h. irgendetwas mit der + Methode <code>http</code> davor), beachten Sie bitte, dass der Apache + eine Umleitung zum Client sendet, um diesem mitzuteilen, wo das + Dokument zu finden ist, auch wenn das Dokument letztlich wieder zum + gleichen Server führt. Das hat mehrere Auswirkungen. Die + wichtigste ist, dass der Client nicht den Original-Statuscode + erhält sondern statt dessen einen Umleitungs-Statuscode. Dies + wiederum kann Web-Robots und andere Clients verwirren, die den + Statuscode dazu verwenden, herauszufinden ob eine URL gültig ist. + Wenn Sie eine entfernte URL in einer Anweisung + <code>ErrorDocument 401</code> verwenden, wird der Client + darüber hinaus nicht wissen, dass er den Benutzer zur Eingabe + eines Passwortes auffordern muss, da er den Statuscode 401 nicht + erhält. <strong>Deshalb müssen Sie sich auf ein lokales + Dokument beziehen, wenn Sie eine Anweisung <code>ErrorDocument + 401</code> verwenden.</strong></p> + + <p>Der Microsoft Internet Explorer (MSIE) ignoriert + standardmäßig serverseitig generierte Fehlermeldungen, wenn + sie "zu kurz" sind und ersetzt sie durch eigene "freundliche" + Fehlermeldungen. Die Größe variiert abhängig von der + Art des Fehlers, im Allgemeinen zeigt der MSIE jedoch den + serverseitig generierten Fehler, anstatt ihn zu verstecken, wenn Ihr + Fehlerdokument größer als 512 Bytes ist. Weitere Informationen + sind im Artikel <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a> in der Microsoft Knowledgebase verfügbar.</p> + + <p>Obwohl die meisten Fehlermeldungen überschrieben werden + können, werden unter bestimmten Umständen die internen + Meldungen ungeachtet der Einstellung der <code class="directive"><a href="#errordocument">ErrorDocument</a></code>-Direktive verwendet. Insbesondere bei + einer fehlerhaften Anfrage werden der normale Bearbeitungsprozess sofort + beendet und die interne Meldung zurückgegeben. Das ist notwendig, um + Sicherheitsprobleme zu vermeiden, die auf Grund fehlerhafter Anfragen + entstehen.</p> + + <p>In Versionen vor 2.0 wurden Meldungen durch ein einzelnes + vorangestelltes Anführungszeichen (") erkannt.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../custom-error.html">Dokumentation zu individuellen +Fehlermeldungen</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a>-<a name="errorlog" id="errorlog">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Ablageort, an dem der Server Fehler protokolliert</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLog <var>Dateiname</var>|syslog[:<var>facility</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and + OS/2)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">ErrorLog</code> bestimmt den Namen + der Datei, in welcher der Server alle auftretenden Fehler protokolliert. + Wenn <var>Dateiname</var> nicht absolut ist, wird er relativ zu <code class="directive"><a href="#serverroot">ServerRoot</a></code> betrachtet.</p> + + <div class="example"><h3>Beispiel</h3><p><code> + ErrorLog /var/log/httpd/error_log + </code></p></div> + + <p>Wenn der <var>Dateiname</var> mit einem senkrechten Strich (|, + engl.: Pipe) beginnt, wird angenommen, dass es sich um einen Befehl + handelt, der ausgeführt wird, um das Fehlerprotokolls zu + verarbeiten.</p> + + <div class="example"><h3>Beispiel</h3><p><code> + ErrorLog "|/usr/local/bin/httpd_errors" + </code></p></div> + + <p>Die Verwendung von <code>syslog</code> anstelle eines Dateinamens + aktiviert die Protokollierung mittels syslogd(8), sofern das System + es unterstützt. Als Voreinstellung wird der syslog-Typ (syslog + facility) <code>local7</code> verwendet, Sie können dies jedoch + auch überschreiben, indem Sie die Syntax + <code>syslog:<var>facility</var></code> verwenden, wobei + <var>facility</var> einer der Namen sein kann, die üblicherweise + in syslog(1) dokumentiert sind.</p> + + <div class="example"><h3>Beispiel</h3><p><code> + ErrorLog syslog:user + </code></p></div> + + <p>SICHERHEITSHINWEIS: Lesen Sie das Dokument <a href="../misc/security_tips.html#serverroot">Sicherheitshinweise</a> + zu Einzelheiten darüber, warum Ihre Sicherheit gefährdet + sein kann, wenn das Verzeichnis, in dem die Log-Dateien gespeichert + werden, für jemand anderen, als den Benutzer, der den Server + gestartet hat, beschreibbar ist.</p> + + <div class="warning"><h3>Anmerkung</h3> + <p>Bei der Eingabe eines Dateipfads auf nicht-Unix-Plattformen sollte + darauf geachtet werden, nur (Vorwärts-)Schrägstriche zu + verwenden, auch wenn die Plattform rückwärts gerichtete + Schrägstriche (Backslashes) erlaubt. Im Allgemeinen ist es eine gute + Idee, innerhalb der Konfigurationsdateien immer + Vorwärts-Schrägstriche zu verwenden.</p> + </div> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache-Log-Dateien</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a>-<a name="errorlogformat" id="errorlogformat">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Format specification for error log entries</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache HTTP Server Log Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a>-<a name="extendedstatus" id="extendedstatus">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Keep track of extended status information for each +request</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ExtendedStatus On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a>-<a name="fileetag" id="fileetag">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Dateiattribute, die zur Erstellung des HTTP-Response-Headers +ETag verwendet werden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>Komponente</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>FileETag INode MTime Size</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Wenn dem Dokument eine Datei zugrundeliegt, bestimmt die Direktive + <code class="directive">FileETag</code> die Dateiattribute, die zur Erstellung + des HTTP-Response-Headers <code>ETag</code> (Entity-Tag) verwendet + werden. (Der Wert von <code>ETag</code> wird bei der Cache-Verwaltung + zur Einsparung von Netzwerk-Bandbreite benutzt.) Im Apache 1.3.22 und + früher wurde der <code>ETag</code>-Wert <em>stets</em> aus + der I-Node, der Größe und dem Datum der letzten + Änderung (mtime) der Datei gebildet. Die Direktive + <code class="directive">FileETag</code> erlaubt es Ihnen, zu bestimmen, + welche dieser Eigenschaften -- falls überhaupt -- verwendet + werden sollen. Die gültigen Schlüsselworte lauten:</p> + + <dl> + <dt><strong>INode</strong></dt> + <dd>Die I-Node-Nummer wird in die Berechnung mit einbezogen</dd> + <dt><strong>MTime</strong></dt> + <dd>Datum und Uhrzeit der letzten Änderung werden mit einbezogen</dd> + <dt><strong>Size</strong></dt> + <dd>Die Anzahl der Bytes in der Datei wird mit einbezogen</dd> + <dt><strong>All</strong></dt> + <dd>Alle verfügbaren Angaben werden verwendet. Die ist + gleichbedeutend mit: + <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd> + <dt><strong>None</strong></dt> + <dd>Es wird keine <code>ETag</code>-Angabe in die Antwort eingefügt, + wenn dem Dokument eine Datei zugrundeliegt.</dd> + </dl> + + <p>Den Schlüsselwörtern <code>INode</code>, <code>MTime</code> + und <code>Size</code> kann entweder ein <code>+</code> oder ein + <code>-</code> vorangestellt werden, was die Änderung einer + Vorgabe erlaubt, die von einem größeren Umfeld + geerbt wurde. Jedes Schlüselwort ohne ein solches Prefix + hebt die ererbte Einstellung sofort und vollständig auf.</p> + + <p>Wenn die Konfiguration für ein Verzeichnis + <code>FileETag INode MTime Size</code> enthält + und die eines Unterverzeichnisses <code>FileETag -INode</code>, + dann ist die Einstellung für das Unterverzeichnis (die an + jedes Unter-Unterverzeichnis weitervererbt wird, welches dies nicht + überschreibt) äquivalent mit + <code>FileETag MTime Size</code>.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Files" id="Files"><Files></a>-<a name="files" id="files">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Enthält Direktiven, die sich nur auf passende Dateinamen +beziehen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Files <var>Dateiname</var>> ... </Files></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive"><Files></code> + begrenzt die Reichweite der enthaltenen Anweisungen auf Dateinamen. + Sie ist vergleichbar mit den Direktiven <code class="directive"><a href="#directory"><Directory></a></code> und <code class="directive"><a href="#location"><Location></a></code>. Sie muss eine + passende <code></Files></code>-Anweisung besitzen. + Die innerhalb dieses Abschnittes angegebenen Direktiven werden auf + jedes Objekt mit einem Basisnamen (letzte Komponente des Dateinamens) + angewendet, der auf die angegebenen Dateinamen passt. <code class="directive"><Files></code>-Container werden, nachdem die + <code class="directive"><a href="#directory"><Directory></a></code>-Container + und <code>.htaccess</code>-Dateien gelesen sind, jedoch vor den + <code class="directive"><a href="#location"><Location></a></code>-Containern, + in der Reihenfolge ihres Auftretens ausgeführt. Beachten Sie, dass + <code class="directive"><Files></code>-Anweisungen innerhalb von + <code class="directive"><a href="#directory"><Directory></a></code>-Containern + auftreten können, um den Teil des Dateisystems einzuschränken, + den sie betreffen.</p> + + <p>Das Argument <var>Dateiname</var> kann einen Dateinamen oder eine + Zeichenkette mit Platzhaltern enthalten, wobei <code>?</code> auf ein + einzelnes Zeichen passt und <code>*</code> auf eine beliebige Folge von + Zeichen. Erweiterte <a class="glossarylink" href="../glossary.html#regex" title="siehe Glossar">reguläre + Ausdrücke</a> können ebenfalls verwendet werden, indem + das Zeichen <code>~</code> hinzugefügt wird. Beispielsweise + würde</p> + + <div class="example"><p><code> + <Files ~ "\.(gif|jpe?g|png)$"> + </code></p></div> + + <p>auf die gebräuchlichsten Grafikformate im Internet passen. + <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> wird + jedoch bevorzugt.</p> + + <p>Beachten Sie bitte, dass die <code class="directive"><Files></code>-Container anders als <code class="directive"><a href="#directory"><Directory></a></code>- und <code class="directive"><a href="#location"><Location></a></code>-Container innerhalb + von <code>.htaccess</code>-Dateien verwendet werden können. + Dies erlaubt den Anwendern auf Dateiebene die Kontrolle über ihre + eigenen Dateien.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../sections.html">Wie die Abschnitte <Directory>, + <Location> und <Files> arbeiten</a> für eine + Erläuterung, wie diese verschiedenen Abschnitte miteinander + kombiniert werden, wenn eine Anfrage empfangen wird</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a>-<a name="filesmatch" id="filesmatch">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Enthält Direktiven, die für Dateinamen gelten, die + auf einen regulären Ausdruck passen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive"><FilesMatch></code> + begrenzt wie die Direktive <code class="directive"><a href="#files"><Files></a></code> die enthaltenen Anweisungen auf + Dateinamen. Sie akzeptiert jedoch <a class="glossarylink" href="../glossary.html#regex" title="siehe Glossar">reguläre + Ausdrücke</a>. Beispielsweise würde</p> + + <div class="example"><p><code> + <FilesMatch "\.(gif|jpe?g|png)$"> + </code></p></div> + + <p>auf die gebräuchlichsten Grafikformate im Internet passen.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../sections.html">Wie die Abschnitte <Directory>, + <Location> und <Files> arbeiten</a> für eine + Erläuterung, wie diese verschiedenen Abschnitte miteinander + kombiniert werden, wenn eine Anfrage empfangen wird</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FlushMaxPipelined" id="FlushMaxPipelined">FlushMaxPipelined</a>-<a name="flushmaxpipelined" id="flushmaxpipelined">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Maximum number of pipelined responses above which they are flushed +to the network</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FlushMaxPipelined <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>FlushMaxPipelined 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>2.4.47 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FlushMaxThreshold" id="FlushMaxThreshold">FlushMaxThreshold</a>-<a name="flushmaxthreshold" id="flushmaxthreshold">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Threshold above which pending data are flushed to the +network</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FlushMaxThreshold <var>number-of-bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>FlushMaxThreshold 65536</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>2.4.47 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a>-<a name="forcetype" id="forcetype">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Erzwingt die Auslieferung aller passendenden Dateien mit dem +angegebenen MIME-Content-Type</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>MIME-Type</var>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Wurde im Apache 2.0 in den Core verschoben</td></tr> +</table> + <p>Wenn sie innerhalb einer <code>.htaccess</code>-Datei, eines + <code class="directive"><a href="#directory"><Directory></a></code>-, + <code class="directive"><a href="#location"><Location></a></code>- + <code class="directive"><a href="#files"><Files></a></code>-Containers + angegeben wird, erzwingt die Direktive die Auslieferung aller + entsprechenden Dateien mit dem Content-Type, der durch + <var>MIME-Type</var> definiert wurde. Wenn Sie zum Beispiel ein + Verzeichnis voller GIF-Dateien haben, die Sie nicht alle durch + <code>.gif</code> kennzeichnen wollen, können Sie angeben:</p> + + <div class="example"><p><code> + ForceType image/gif + </code></p></div> + + <p>Beachten Sie bitte, dass die Direktive anders als <code class="directive"><a href="#defaulttype">DefaultType</a></code> alle MIME-Type-Zuordnungen + überschreibt, einschließlich Dateiendungen, die einen + Medientyp bezeichnen könnten.</p> + + <p>Sie können jede <code class="directive">ForceType</code>-Angabe + durch die Verwendung des Wertes <code>None</code> überschreiben:</p> + + <div class="example"><p><code> + # erzwinge image/gif für alle Dateien:<br /> + <Location /images><br /> + <span class="indent"> + ForceType image/gif<br /> + </span> + </Location><br /> + <br /> + # hier jedoch normale MIME-Type-Zuordnungen:<br /> + <Location /images/mixed><br /> + <span class="indent"> + ForceType None<br /> + </span> + </Location> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a>-<a name="gprofdir" id="gprofdir">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Directory to write gmon.out profiling data to. </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a>-<a name="hostnamelookups" id="hostnamelookups">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Aktiviert DNS-Lookups auf Client-IP-Adressen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>HostnameLookups Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Diese Direktive aktiviert die DNS-Abfrage <span class="transnote">(<em>Anm.d.Ü.:</em> ein sogenannter + DNS-Lookup)</span>, so dass Hostnamen protokolliert (und in + <code>REMOTE_HOST</code> an CGIs/SSIs übergeben) werden könnnen. + Der Wert <code>Double</code> bezieht sich auf ein + Double-Reverse-DNS-Lookup. D.h. nachdem ein Reverse-Lookup + durchgeführt wurde, wird dann auf dem Ergebnis ein + Forward-Lookup ausgeführt. Wenigstens eine der IP-Adressen + aus dem Forward-Lookup muss der Originaladresse entsprechen. + (In der "tcpwrappers"-Terminologie wird dies <code>PARANOID</code> + genannt.)</p> + + <p>Unabhängig von der Einstellung wird ein Double-Reverse-Lookup + durchgeführt, wenn <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> zur + Zugriffskontrolle per Hostnamen eingesetzt wird. Dies ist aus + Sicherheitsgründen notwendig. Beachten Sie, dass das Ergebnis dieses + Double-Reverse-Lookups nicht generell verfügbar ist, solange Sie + nicht <code>HostnameLookups Double</code> setzen. Wenn beispielsweise + nur <code>HostnameLookups On</code> angegeben ist und eine Anfrage + für ein Objekt erfolgt, welches durch Hostnamen-Beschränkungen + geschützt ist, dann wird CGIs nur das Ergebnis des + Singel-Reverse-Lookups in <code>REMOTE_HOST</code> übergeben, + egal ob das Doble-Reverse-Lookup fehlschlug oder nicht.</p> + + <p>Die Voreinstellung ist <code>Off</code>, um Netzwerktraffic bei den + Angeboten einzusparen, die nicht tatsächlich Reverse-Lookups + benötigen. Es ist auch für die Endanwender besser, da sie nicht + die zusätzliche Wartezeit ertragen müssen, die ein Lookup mit + sich bringt. Hoch frequentierte Angebote sollten diese Direktive auf + <code>Off</code>lassen. Das Hilfsprogramm <code class="program"><a href="../programs/logresolve.html">logresolve</a></code>, das standardmäßig in das + Unterverzeichnis <code>bin</code> Ihres Installationsverzeichnisses + kompiliert wird, kann dazu verwendet werden, um offline Hostnamen von + protokollierten IP-Adressen nachzuschlagen.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="HttpProtocolOptions" id="HttpProtocolOptions">HttpProtocolOptions</a>-<a name="httpprotocoloptions" id="httpprotocoloptions">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Modify restrictions on HTTP Request Messages</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>HttpProtocolOptions Strict LenientMethods Allow0.9</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>2.2.32 or 2.4.24 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="If" id="If"><If></a>-<a name="if" id="if">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Contains directives that apply only if a condition is +satisfied by a request at runtime</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><a href="../expr.html">Expressions in Apache HTTP Server</a>, +for a complete reference and more examples.</li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a>-<a name="ifdefine" id="ifdefine">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Schließt Direktiven ein, die nur ausgeführt werden, +wenn eine Testbedingung beim Start wahr ist</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfDefine [!]<var>Parametername</var>> ... + </IfDefine></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Der Container <code><IfDefine <var>Test</var>>...</IfDefine> + </code> wird dazu verwendet, Direktiven als bedingt zu kennzeichnen. + Die Direktiven innerhalb eines <code class="directive"><IfDefine></code>-Abschnittes werden nur ausgeführt, + wenn <var>Test</var> wahr ist. Ist <var>Test</var> falsch, wird alles + zwischen der Start- und Endemarkierung ignoriert.</p> + + <p>In der <code class="directive"><IfDefine></code>-Anweisung kann + <var>Test</var> eine von zwei Formen annehmen:</p> + + <ul> + <li><var>Parametername</var></li> + + <li><code>!</code><var>Parametername</var></li> + </ul> + + <p>Im ersten Fall werden die Direktiven zwischen der Start- und + Endemarkierung nur ausgeführt, wenn der Parameter namens + <var>Parametername</var> definiert ist. Die zweite Form kehrt den + Test um und führt die Direktiven nur dann aus, wenn + <var>Parametername</var> <strong>nicht</strong> definiert ist.</p> + + <p>Das Argument <var>Parametername</var> ist ein sogenanntes + "Define", das beim beim Start des Servers in der + <code class="program"><a href="../programs/httpd.html">httpd</a></code>-Befehlszeile durch + <code>-D<var>Parameter</var></code> angegeben wird.</p> + + <p><code class="directive"><IfDefine></code>-Container können + ineinander verschachtelt werden, um einfache Multi-Parameter-Tests + zu implementieren. Beispiel:</p> + + <div class="example"><p><code> + httpd -DReverseProxy ...<br /> + <br /> + # httpd.conf<br /> + <IfDefine ReverseProxy><br /> + <span class="indent"> + LoadModule rewrite_module modules/mod_rewrite.so<br /> + LoadModule proxy_module modules/libproxy.so<br /> + </span> + </IfDefine> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfDirective" id="IfDirective"><IfDirective></a>-<a name="ifdirective" id="ifdirective">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific directive</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfDirective [!]<var>directive-name</var>> ... + </IfDirective></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#ifsection"><IfSection></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfFile" id="IfFile"><IfFile></a>-<a name="iffile" id="iffile">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Encloses directives that will be processed only +if file exists at startup</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfFile [!]<var>filename</var>> ... + </IfFile></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a>-<a name="ifmodule" id="ifmodule">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Schließt Direktiven ein, die abhängig vom +Vorhandensein oder Fehlen eines speziellen Moduls ausgeführt +werden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfModule [!]<var>Modulname</var>|<var>Modulbezeichner</var>> + ... </IfModule></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Modulbezeichner sind ab Version 2.1 + verfügbar.</td></tr> +</table> + <p>Der Container <code><IfModule + <var>Test</var>>...</IfModule></code> wird dazu verwendet, + Direktiven als abhängig von dem Vorhandensein eines speziellen + Moduls zu kennzeichnen. Die Direktiven innerhalb eines <code class="directive"><IfModule></code>-Abschnitts werden nur + ausgeführt, wenn <var>Test</var> wahr ist. Ist <var>Test</var> + falsch, wird alles zwischen der Start- und Endemarkierung ignoriert.</p> + + <p>In der <code class="directive"><IfModule></code>-Anweisung + kann <var>Test</var> eine von zwei Formen annehmen:</p> + + <ul> + <li><var>Modul</var></li> + + <li><code>!</code><var>Modul</var></li> + </ul> + + <p>Im ersten Fall werden die Direktiven zwischen der Start- und + Endemarkierung nur ausgeführt, das Modul namens + <var>Modul</var> im Apache enthalten ist -- entweder einkompiliert + oder mittels <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code> + dynamisch geladen. Die zweite Form dreht den Test um und führt die + Direktiven nur aus, wenn <var>Modul</var> <strong>nicht</strong> + enthalten ist.</p> + + <p>Das Argument <var>Modul</var> kann entweder der Modulbezeichner oder + der Dateiname des Moduls zum Zeitpunkt seiner Kompilierung sein. + <code>rewrite_module</code> beispielsweise ist der Bezeichner und + <code>mod_rewrite.c</code> ist der Dateiname. Wenn ein Modul aus mehreren + Quelltext-Dateien besteht, verwenden Sie den Namen der Datei, welche die + Zeichenfolge <code>STANDARD20_MODULE_STUFF</code> enthält.</p> + + <p><code class="directive"><IfModule></code>-Container können + inneinander verschachtelt werden, um einfache Multi-Modul-Tests + durchzuführen.</p> + + <p>Dieser Container sollte verwendet werden, wenn Sie eine + Konfigurationsdatei benötigen, die unabhängig davon funktioniert, + ob ein bestimmtes Modul verfügbar ist oder nicht. Normalerweise + ist es nicht notwendig, Direktiven in <code class="directive"><IfModule></code>-Containern unterzubringen.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfSection" id="IfSection"><IfSection></a>-<a name="ifsection" id="ifsection">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific section directive</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfSection [!]<var>section-name</var>> ... + </IfSection></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#ifdirective"><IfDirective></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Include" id="Include">Include</a>-<a name="include" id="include">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Fügt andere Konfigurationsdateien innerhalb der +Server-Konfigurationsdatei ein</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include <var>Dateiname</var>|<var>Verzeichnis</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Die Platzhalter-Suche ist verfügbar seit +2.0.41</td></tr> +</table> + <p>Die Direktive erlaubt das Einfügen anderer Konfigurationsdateien + in die Konfigurationsdatei des Servers.</p> + + <p>Shell-typische (<code>fnmatch()</code>) Platzhlaterzeichen können + dazu verwendet werden, mehrere Dateien auf einmal in alphabetischer + Reihenfolge einzufügen. Wenn <code class="directive">Include</code> + darüber hinaus auf ein Verzeichnis anstatt auf eine Datei zeigt, + liest der Apache alle Dateien in diesem Verzeichnis und allen + Unterverzeichnissen ein. Das Einfügen ganzer Verzeichnisse ist + jedoch nicht empfehlenswert, da temporäre Dateien sehr leicht + versehentlich in einem Verzeichnis zurückgelassen werden, was + <code class="program"><a href="../programs/httpd.html">httpd</a></code> scheitern lassen kann.</p> + + <p>Der angegebene Dateiname kann ein absoluter Pfad sein oder relativ zum + <code class="directive"><a href="#serverroot">ServerRoot</a></code>-Verzeichnis angegeben + werden.</p> + + <p>Beispiele:</p> + + <div class="example"><p><code> + Include /usr/local/apache2/conf/ssl.conf<br /> + Include /usr/local/apache2/conf/vhosts/*.conf + </code></p></div> + + <p>Oder Sie geben Pfade relativ zu Ihrem <code class="directive"><a href="#serverroot">ServerRoot</a></code>-Verzeichnis an:</p> + + <div class="example"><p><code> + Include conf/ssl.conf<br /> + Include conf/vhosts/*.conf + </code></p></div> + + <p>Der Aufruf von <code>apachectl configtest</code> liefert eine Liste + der Dateien, die während des Konfigurations-Tests verarbeitet + werden:</p> + + <div class="example"><p><code> + root@host# apachectl configtest<br /> + Processing config file: /usr/local/apache2/conf/ssl.conf<br /> + Processing config file: /usr/local/apache2/conf/vhosts/vhost1.conf<br /> + Processing config file: /usr/local/apache2/conf/vhosts/vhost2.conf<br /> + Syntax OK + </code></p></div> + +<h3>Siehe auch</h3> +<ul> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a>-<a name="includeoptional" id="includeoptional">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Includes other configuration files from within +the server configuration files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in 2.3.6 and later. Not existent file paths without wildcards + do not cause SyntaxError after 2.4.30</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#include">Include</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a>-<a name="keepalive" id="keepalive">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Aktiviert persistente HTTP-Verbindungen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>KeepAlive On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Keep-Alive-Erweiterung von HTTP/1.0 und die + HTTP/1.1-Funktionalität persistenter Verbindungen unterstützt + langlebige HTTP-Sitzungen, die es erlauben, mehrere Anfragen über + die gleich TCP-Verbindung zu senden. In einigen Fällen wurde eine + Beschleunigung der Wartezeiten von beinahe 50% für HTML-Dokumente + mit vielen Bildern festgestellt. Um Keep-Alive-Verbindungen zu aktivieren, + setzen Sie <code>KeepAlive On</code>.</p> + + <p>Bei HTTP/1.0-Clients werden Keep-Alive-Verbindungen nur dann verwendet, + wenn sie vom Client eigens angefordert werden. Desweiteren können + Keep-Alive-Verbindungen bei einem HTTP/1.0-Client nur dann verwendet + werden, wenn die Länge des Inhalts im Voraus bekannt ist. Dies + impliziert, dass dynamische Inhalte wie CGI-Ausgaben, SSI-Seiten und + servergenerierte Verzeichnisauflistungen im Allgemeinen keine + Keep-Alive-Verbindungen mit HTTP/1.0-Clients verwenden. Bei + HTTP/1.1-Clients sind Keep-Alive-Verbindungen Voreinstellung, solange + nichts anderes angegeben ist. Wenn der Client es anfordert, wird + Chunked-Encoding verwendet, um Inhalte mit unbekannter Länge + über persistente Verbindungen zu senden.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a>-<a name="keepalivetimeout" id="keepalivetimeout">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Zeitspanne, die der Server während persistenter Verbindungen +auf nachfolgende Anfragen wartet</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>Sekunden</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>KeepAliveTimeout 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Dies legt die Anzahl der Sekunden fest, die der Apache auf weitere + Anfragen wartet, bevor er die Verbindung schließt. Nachdem einmal + eine Anfrage entgegen genommen wurde, wird die durch die Direktive + <code class="directive"><a href="#timeout">Timeout</a></code> festgelegte Auszeit + angewendet.</p> + + <p>Auf stark belasteten Servern kann ein hoher + <code class="directive">KeepAliveTimeout</code>-Wert zu Durchsatzminderungen + führen. Je höher die Auszeit angegeben ist, desto länger + ist der Apache damit beschäftigt, auf untätige Clients zu + warten.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a>-<a name="limit" id="limit">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Beschränkt die eingeschlossenen Zugriffskontrollen auf +bestimmte HTTP-Methoden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Limit <var>Methode</var> [<var>Methode</var>] ... > ... + </Limit></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Zugriffskontrollen gelten normalerweise für <strong>alle</strong> + Zugriffsmethoden, was normalerweise auch das gewünschte Verhalten ist. + <strong>Im Allgemeinen sollten Zugriffskontrollen nicht in einen + <code class="directive"><Limit></code>-Container gepackt + werden.</strong></p> + + <p>Der Sinn der Direktive <code class="directive"><Limit></code> + ist es, den Effekt der Zugriffskontrollen auf die angegebenen + HTTP-Methoden zu beschränken. Bei allen anderen Methoden haben + die in der <code class="directive"><Limit></code>-Gruppe + enthaltenen Zugriffsbeschränkungen <strong>keine Wirkung</strong>. + Im folgenden Beispiel gilt die Zugriffskontrolle nur für die + Methoden <code>POST</code>, <code>PUT</code> und <code>DELETE</code>. + Alle anderen Methoden bleiben ungeschützt:</p> + + <div class="example"><p><code> + <Limit POST PUT DELETE><br /> + <span class="indent"> + Require valid-user<br /> + </span> + </Limit> + </code></p></div> + + <p>Sie können eine oder mehrere der folgenden Methoden angeben: + <code>GET</code>, <code>POST</code>, <code>PUT</code>, <code>DELETE</code>, + <code>CONNECT</code>, <code>OPTIONS</code>, + <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>, + <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>, + <code>LOCK</code> und <code>UNLOCK</code>. <strong>Die Methodennamen + unterscheiden zwischen Groß- und Kleinschreibung.</strong> Wenn + <code>GET</code> verwendet wird, sind <code>HEAD</code>-Anfragen + ebenfalls eingeschränkt. Die <code>TRACE</code>-Methode kann nicht + limitiert werden.</p> + + <div class="warning"> + Wenn es um Zugriffsbeschränkungen geht, sollte + ein <code class="directive"><a href="#limitexcept"><LimitExcept></a></code>-Container sollte immer einem <code class="directive"><a href="#limit"><Limit></a></code>-Container vorgezogen + werden, da <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> + einen Schutz gegen beliebige Methoden bietet. + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept"><LimitExcept></a>-<a name="limitexcept" id="limitexcept">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Beschränkt Zugriffskontrollen auf alle HTTP-Methoden +außer den genannten</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LimitExcept <var>Methode</var> [<var>Methode</var>] ... > ... + </LimitExcept></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><LimitExcept></code> und + <code></LimitExcept></code> werden dazu verwendet, eine Gruppe + von Anweisungen zur Zugriffskontrolle zusammenzufassen, die dann auf + jede HTTP-Methode angewendet werden, die <strong>nicht</strong> + als Argument angegeben ist. D.h. dies ist das Gegenteil des + <code class="directive"><a href="#limit"><Limit></a></code>-Containers + und kann zur Steuerung von Standard- und nicht-Standard-/unbekannten + Methoden verwendet werden. Für weitere Einzelheiten lesen Sie bitte + die Beschreibung zu <code class="directive"><a href="#limit"><Limit></a></code>.</p> + + <p>Beispiel:</p> + + <div class="example"><p><code> + <LimitExcept POST GET><br /> + <span class="indent"> + Require valid-user<br /> + </span> + </LimitExcept> + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a>-<a name="limitinternalrecursion" id="limitinternalrecursion">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Bestimmt die maximale Anzahl interner Umleitungen und + verschachtelter Unteranfragen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>Zahl</var> [<var>Zahl</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>LimitInternalRecursion 10</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Verfügbar ab Apache 2.0.47</td></tr> +</table> + <p>Eine interne Umleitung erfolgt beispielsweise, wenn die Direktive + <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> verwendet wird, welche + die Originalanfrage intern zu einem CGI-Skript weiterleitet. Eine + Unteranfrage <span class="transnote">(<em>Anm.d.Ü.:</em> engl. Subrequest)</span> ist ein Mechanismus des + Apache, um herauszufinden, was bei einer URI geschehen würde, wäre + sie angefordert worden. <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> z.B. verwendet + Unteranfragen, um nach den Dateien zu suchen, die in der <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>-Anweisung aufgeführt + sind.</p> + + <p><code class="directive">LimitInternalRecursion</code> bewahrt den Server vor + einem Absturz, wenn er in eine Endlosschleife aus internen Umleitungen + oder Unteranfragen hineinläuft. Derartige Schleifen werden + gewöhnlich durch Fehlkonfiguration verursacht.</p> + + <p>Die Direktive setzt zwei verschiedene Begrenzungen, welche je Anfrage + ausgewertet werden. Die erste <var>Zahl</var> bestimmt die maximale + Anzahl der Umleitungen, die aufeinander folgen dürfen. Die zweite + <var>Zahl</var> legt fest, wie tief Unteranfragen ineinander + verschachtelt werden dürfen. Wenn Sie lediglich eine <var>Zahl</var> + angeben, wird sie beiden Begrenzungen zugewiesen.</p> + + <div class="example"><h3>Beispiel</h3><p><code> + LimitInternalRecursion 5 + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a>-<a name="limitrequestbody" id="limitrequestbody">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Begrenzt die Gesamtgröße des vom Client gesendeten +HTTP-Request-Body</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>Bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>LimitRequestBody 0</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive gibt die Anzahl der <var>Bytes</var> zwischen 0 + (unbegrenzt) und 2147483647 (2GB) an, die im Request-Body (Datenteil der + Anfrage) erlaubt sind.</p> + + <p>Die Direktive <code class="directive">LimitRequestBody</code> erlaubt es dem + Benutzer, die Größe des HTTP-Request-Bodys in dem Kontext zu + begrenzen, in dem die Anweisung angegeben ist (Server, pro Verzeichnis, + pro Datei oder pro Adresse). Wenn die Anfrage des Clients dieses Limit + überschreitet, gibt der Server einen Fehler zurück anstatt die + Anfrage zu bearbeiten. Die Größe des Datenteils einer Anfrage + kann sehr stark variieren, abhängig von der Art der Ressource und + den für diese Ressource erlaubten Methoden. CGI-Skripte verwenden + den Datenteil üblicherweise zum Empfang von Formulardaten. Wird + die <code>PUT</code>-Methode angewendet, dann muss der Wert mindestens + so groß sein wie irgendeine Darstellungsform, die der Server + für diese Ressource akzeptieren soll.</p> + + <p>Die Direktive gibt dem Serveradministrator eine größere + Kontrolle gegenüber abnormalem Verhalten von Clients, was bei der + Vermeidung einiger Formen von Denial-of-Service-Attacken hilfreich + sein kann.</p> + + <p>Wenn Sie beispielsweise das Hochladen von Dateien zu einer bestimmten + Adresse erlauben, aber die Größe der hochgeladenen Dateien + auf 100K beschränken wollen, können Sie die folgende Anweisung + verwenden:</p> + + <div class="example"><p><code> + LimitRequestBody 102400 + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a>-<a name="limitrequestfields" id="limitrequestfields">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Begrenzt die Anzahl der HTTP-Request-Header, die vom Client +entgegengenommen werden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>Anzahl</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>LimitRequestFields 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p><var>Anzahl</var> ist ein Integer-Wert (eine positive Ganzzahl) + zwischen 0 (unbegrenzt) und 32767. Die Voreinstellung wird durch die + Konstante <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (<code>100</code> + bei der Auslieferung) zur Kompilierungszeit gesetzt.</p> + + <p>Die Direktive <code class="directive">LimitRequestFields</code> erlaubt es + dem Serveradministrator, die maximale Anzahl der in einem HTTP-Request + erlaubten HTTP-Request-Header zu verändern. Für den Server + muss dieser Wert größer sein als die Anzahl der Headerzeilen, + die ein normaler Client senden könnte. Die Anzahl der Request-Header, + die ein gewöhnlicher Client verwendet, überschreitet selten 20 + Zeilen. Allerdings kann dies zwischen den verschiedenen + Client-Ausführungen variieren, oft abhängig vom Ausmaß, + mit dem der Anwender die genaue Content-Negotiation-Unterstützung + seines Browsers konfiguriert hat. Optionale HTTP-Erweiterungen + äußern sich oft in Form von HTTP-Headern.</p> + + <p>Die Direktive gibt dem Serveradministrator eine größere + Kontrolle gegenüber abnormalem Verhalten von Clients, was bei der + Vermeidung einiger Formen von Denial-of-Service-Attacken hilfreich + sein kann. Der Wert sollte erhöht werden, wenn normale Clients + eine Fehlermeldung vom Server erhalten, die besagt, dass mit der Anfrage + zu viele Headerzeilen gesendet wurden.</p> + + <p>Beispiel:</p> + + <div class="example"><p><code> + LimitRequestFields 50 + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a>-<a name="limitrequestfieldsize" id="limitrequestfieldsize">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Begrenzt die Länge des vom Client gesendeten +HTTP-Request-Headers</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFieldsize <var>Bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>LimitRequestFieldsize 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive gibt die Anzahl der <var>Bytes</var> an, die in einem + HTTP-Header erlaubt sind.</p> + + <p>Die Direktive <code class="directive">LimitRequestFieldsize</code> erlaubt es + dem Serveradministrator, die maximale Größe eines + HTTP-Request-Headers zu verringern oder erhöhen. Für den Server + muss der Wert groß genug sein, um eine beliebige Headerzeile einer + normalen Client-Anfrage vorzuhalten. Die Größe variiert stark + zwischen den verschiedenen Client-Ausführungen, oft abhängig vom + Ausmaß, mit dem der Anwender die genaue + Content-Negotiation-Unterstützung seines Browsers konfiguriert hat. + SPNEGO-Authentisierungs-Header können bis zu 12392 Bytes lang + sein.</p> + + <p>Die Direktive gibt dem Serveradministrator eine größere + Kontrolle gegenüber abnormalem Verhalten von Clients, was bei der + Vermeidung einiger Formen von Denial-of-Service-Attacken hilfreich + sein kann.</p> + + <p>Beispiel:</p> + + <div class="example"><p><code> + LimitRequestFieldSize 4094 + </code></p></div> + + <div class="note">Unter normalen Umständen sollte die Voreinstellung nicht + verändert werden.</div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a>-<a name="limitrequestline" id="limitrequestline">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Begrenzt die Länge der vom Client entgegengenommenen +HTTP-Anfragezeile</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>Bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>LimitRequestLine 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive legt die Anzahl der <var>Bytes</var> fest, die in der + HTTP-Anfragezeile erlaubt sind.</p> + + <p>Die Direktive <code class="directive">LimitRequestLine</code> erlaubt es dem + Serveradministrator, die maximale Größe der + HTTP-Anfragezeile zu verringern oder erhöhen. Da + die Anfragezeile aus der HTTP-Methode, der URI und der Protokollversion + besteht, bedeutet die <code class="directive">LimitRequestLine</code>-Direktive + eine Beschränkung der Länge der für eine Anfrage an den + Server erlaubten Anfrage-URI. Für den Server muss der Wert groß + genug sein, um jeden seiner Ressourcennamen vorzuhalten, + einschließlich aller Informationen, die im Query-String einer + <code>GET</code>-Anfrage übergeben werden können.</p> + + <p>Die Direktive gibt dem Serveradministrator eine größere + Kontrolle gegenüber abnormalem Verhalten von Clients, was bei der + Vermeidung einiger Formen von Denial-of-Service-Attacken hilfreich + sein kann.</p> + + <p>Beispiel:</p> + + <div class="example"><p><code> + LimitRequestLine 4094 + </code></p></div> + + <div class="note">Unter normalen Umständen sollte die Voreinstellung nicht + verändert werden.</div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a>-<a name="limitxmlrequestbody" id="limitxmlrequestbody">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Begrenzt die Größe eines XML-basierten +Request-Bodys</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>Bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Dies gibt die Grenze für die maximale Größe (in Bytes) + des XML-basierten Request-Bodys an. Der Wert <code>0</code> deaktiviert + diese Prüfung.</p> + + <p>Beispiel:</p> + + <div class="example"><p><code> + LimitXMLRequestBody 0 + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Location" id="Location"><Location></a>-<a name="location" id="location">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Wendet die enthaltenen Direktiven nur auf die entsprechenden +URLs an</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Location + <var>URL-Pfad</var>|<var>URL</var>> ... </Location></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive"><Location></code> + begrenzt die Reichweite der enthaltenen Anweisungen auf URLs. + Sie ist der Direktive <code class="directive"><a href="#directory"><Directory></a></code> ähnlich und startet einen + Abschnitt, der mit der Anweisung <code></Location></code> + abgeschlossen wird. <code class="directive"><Location></code>-Container werden, nachdem die + <code class="directive"><a href="#directory"><Directory></a></code>-Container + und <code>.htaccess</code>-Dateien gelesen wurden, und nach den + <code class="directive"><a href="#files"><Files></a></code>-Containern, in + der Reihenfolge ausgeführt, in der sie in der Konfigurationsdatei + erscheinen.</p> + + <p><code class="directive"><Location></code>-Abschnitte operieren + vollständig außerhalb des Dateisystems. Dies hat mehrere + Konsequenzen. An Wichtigsten, <code class="directive"><Location></code>-Anweisungen sollten nicht dafür + verwendet werden, den Zugriff zu Teilen des Dateisystems zu steuern. Da + mehrere unterschiedliche URLs auf die gleiche Stelle des Dateisystems + zeigen können, könnte eine solche Zugriffskontrolle u.U. + umgangen werden.</p> + + <div class="note"><h3>Wann sollte<code class="directive"><Location></code> verwendet werden</h3> + + <p>Verwenden Sie <code class="directive"><Location></code>, um + Anweisungen auf Inhalte anzuwenden, die außerhalb des Dateisystems + abgelegt sind. Benutzen Sie <code class="directive"><a href="#directory"><Directory></a></code> und <code class="directive"><a href="#files"><Files></a></code> für Inhalte, die + innerhalb des Dateisystems abgelegt sind. Eine Ausnahme bildet + <code><Location /></code>, welches ein einfacher Weg ist, um eine + Konfiguration auf den gesamten Server anzuwenden.</p> + </div> + + <p>Für alle nicht-Proxy-Anfragen ist die entsprechende URL + ein URL-Pfad in der Form <code>/path/</code>. Es dürfen weder ein + Schema, noch ein Hostname, noch ein Port, noch ein Query-String einbezogen + werden. Für Proxy-Anfragen hat die Vergleichs-URL die Form + <code>schema://servername/path</code>. Das Präfix muss angegeben + werden.</p> + + <p>Die URL kann Platzhalter verwenden. In einer Zeichenfolge mit + Platzhaltern entspricht <code>?</code> einem einzelnen Zeichen und + <code>*</code>einer beliebigen Zeichenfolge.</p> + + <p>Erweiterte <a class="glossarylink" href="../glossary.html#regex" title="siehe Glossar">reguläre + Ausdrücke</a> können ebenfalls verwendet werden, indem + das Zeichen <code>~</code> hinzugefügt wird. Beispielsweise + würde</p> + + <div class="example"><p><code> + <Location ~ "/(extra|special)/data"> + </code></p></div> + + <p>auf URLs passen, welche die Zeichenfolge <code>/extra/data</code> + oder <code>/special/data</code> enthalten. Die Direktive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> verhält sich + genauso wie <code class="directive"><Location></code> mit + regulären Ausdrücken.</p> + + <p>Die Funktionalität von <code class="directive"><Location></code> ist insbesondere dann nützlich, + wenn sie mit der <code class="directive"><a href="#sethandler">SetHandler</a></code>-Direktive + kombiniert wird. Um zum Beispiel Statusabfragen zu aktivieren, sie aber + nur von Browsern aus <code>foo.com</code> zuzulassen, könnten Sie + schreiben:</p> + + <div class="example"><p><code> + <Location /status><br /> + <span class="indent"> + SetHandler server-status<br /> + Order Deny,Allow<br /> + Deny from all<br /> + Allow from .foo.com<br /> + </span> + </Location> + </code></p></div> + + <div class="note"><h3>Anmerkung zu / (Schrägstrich, Slash)</h3> + <p>Das Slash-Zeichen hat eine besondere Bedeutung, je nachdem, wo es + in der URL erscheint. Manche werden sein Verhalten vom Dateisystem + gewohnt sein, wo mehrere aufeinanderfolgende Schrägstriche + häufig zu einem Schrägstrich zusammengefaßt werden + (<em>d.h.</em> <code>/home///foo</code> ist das gleiche wie + <code>/home/foo</code>). Im URL-Raum ist dies nicht notwendigerweise + genauso. Bei der Direktive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> und der <code class="directive"><Location></code>-Version mit regulären Ausdrücken + müssen Sie explizit mehrere Schrägstriche angeben, wenn Sie + genau dies beabsichtigen.</p> + + <p>Beispielsweise würde <code><LocationMatch ^/abc></code> + auf die angeforderte URL <code>/abc</code> passen, nicht aber auf + <code>//abc</code>. Die Direktive <code class="directive"><Location></code> (ohne reguläre Ausdrücke) verhält + sich ähnlich, wenn sie für Proxy-Anfragen verwendet wird. + Wenn <code class="directive"><Location></code> (ohne + reguläre Ausdrücke) jedoch für nicht-Proxy-Anfragen + verwendet wird, werden stillscheigend mehrere Schrächstriche mit + mit einem einzigen Schrägstrich gleichgesetzt. Geben Sie + beispielsweise <code><Location /abc/def></code> an und die + Anfrage lautet auf <code>/abc//def</code>, dann greift die Anweisung.</p> + </div> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../sections.html">Wie die Abschnitte <Directory>, + <Location> und <Files> arbeiten</a> für eine + Erläuterung, wie diese verschiedenen Abschnitte miteinander + kombiniert werden, wenn eine Anfrage empfangen wird</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a>-<a name="locationmatch" id="locationmatch">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Wendet die enthaltenen Direktiven nur auf URLs an, die auf +reguläre Ausdrücke passen</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LocationMatch + <var>regex</var>> ... </LocationMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive"><LocationMatch></code> + begrenzt die Reichweite der enthaltenen Anweisungen in der gleichen Weise + wie <code class="directive"><a href="#location"><Location></a></code> auf URLs. + Sie verwendet jedoch <a class="glossarylink" href="../glossary.html#regex" title="siehe Glossar">reguläre + Ausdrücke</a> als Argument anstelle einer einfachen + Zeichenkette. Beispielsweise würde</p> + + <div class="example"><p><code> + <LocationMatch "/(extra|special)/data"> + </code></p></div> + + <p>auf URLs passen, welche die Zeichenfolge <code>/extra/data</code> + oder <code>/special/data</code> enthalten.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../sections.html">Wie die Abschnitte <Directory>, + <Location> und <Files> arbeiten</a> für eine + Erläuterung, wie diese verschiedenen Abschnitte miteinander + kombiniert werden, wenn eine Anfrage empfangen wird</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a>-<a name="loglevel" id="loglevel">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Steuert die Ausführlichkeit des Fehlerprotokolls</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel <var>Level</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>LogLevel warn</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p><code class="directive">LogLevel</code> stellt die Ausführlichkeit + der Nachrichten ein, die im Fehlerprotokoll aufgezeichnet werden (siehe + Direktive <code class="directive"><a href="#errorlog">ErrorLog</a></code>). Die folgenden, + nach absteigender Aussagekraft sortierten <var>Level</var> sind + verfügbar:</p> + + <table class="bordered"> + + <tr> + <th><strong>Level</strong> </th> + + <th><strong>Beschreibung</strong> </th> + + <th><strong>Beispiel</strong> </th> + </tr> + + <tr> + <td><code>emerg</code> </td> + + <td>Notfall - das System ist unbenutzbar.</td> + + <td>"Child cannot open lock file. Exiting" + <span class="transnote">(<em>Anm.d.Ü.:</em> "Kindprozess kann die Lock-Datei nicht öffnen. + Beende Programm")</span></td> + </tr> + + <tr> + <td><code>alert</code> </td> + + <td>Maßnahmen müssen unverzüglich ergriffen + werden.</td> + + <td>"getpwuid: couldn't determine user name from uid" + <span class="transnote">(<em>Anm.d.Ü.:</em> "getpwuid: kann keinen Benutzernamen aus der UID + ermitteln")</span></td> + </tr> + + <tr> + <td><code>crit</code> </td> + + <td>Kritischer Zustand.</td> + + <td>"socket: Failed to get a socket, exiting child" + <span class="transnote">(<em>Anm.d.Ü.:</em> "socket: Socket-Zuweisung fehlgeschlagen, beende + Kindprozess")</span></td> + </tr> + + <tr> + <td><code>error</code> </td> + + <td>Fehlerbedingung.</td> + + <td>"Premature end of script headers" + <span class="transnote">(<em>Anm.d.Ü.:</em> "Vorzeitiges Ende der Skript-Header")</span></td> + </tr> + + <tr> + <td><code>warn</code> </td> + + <td>Warnung.</td> + + <td>"child process 1234 did not exit, sending another SIGHUP" + <span class="transnote">(<em>Anm.d.Ü.:</em> "Kindprozess 1234 nicht beendet, sende ein weiteres + SIGHUP")</span></td> + </tr> + + <tr> + <td><code>notice</code> </td> + + <td>Normaler, aber signifikanter Zustand.</td> + + <td>"httpd: caught SIGBUS, attempting to dump core in ..." + <span class="transnote">(<em>Anm.d.Ü.:</em> "httpd: SIGBUS empfangen, versuche Speicherabbild nach ... + zu schreiben")</span></td> + </tr> + + <tr> + <td><code>info</code> </td> + + <td>Information.</td> + + <td>"Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..." + <span class="transnote">(<em>Anm.d.Ü.:</em> "Server scheint beschäftigt zu sein, + (möglicherweise müssen Sie StartServers oder + Min/MaxSpareServers erhöhen)")</span></td> + </tr> + + <tr> + <td><code>debug</code> </td> + + <td>Debug-Level-Nachrichten</td> + + <td>"Opening config file ..." + <span class="transnote">(<em>Anm.d.Ü.:</em> "Öffne Konfigurationsdatei ...")</span></td> + </tr> + </table> + + <p>Geben Sie einen bestimmten Level an, denn werden Nachrichten von + allen höheren Leveln ebenso angezeigt. <em>Z.B.:</em> Wenn + <code>LogLevel info</code> eingestellt ist, dann werden Nachrichten der + Log-Level <code>notice</code> und <code>warn</code> ebenso eingetragen.</p> + + <p>Es wird empfohlen, mindestens den Level <code>crit</code> zu + verwenden.</p> + + <p>Beispiel:</p> + + <div class="example"><p><code> + LogLevel notice + </code></p></div> + + <div class="note"><h3>Hinweis</h3> + <p>Beim Protokollieren in eine reguläre Datei können + Nachrichten des Levels <code>notice</code> nicht unterdrückt + werden und werden daher immer protokolliert. Dies trifft allerdings + nicht zu, wenn mittels <code>syslog</code> protokolliert wird.</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a>-<a name="maxkeepaliverequests" id="maxkeepaliverequests">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Anzahl der Anfragen, die bei einer persistenten Verbindung +zulässig sind</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>Anzahl</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">MaxKeepAliveRequests</code> + begrenzt die Anzahl der Anfragen, die pro Verbindung zulässig sind, + wenn <code class="directive"><a href="#keepalive">KeepAlive</a></code> eingeschaltet ist. + Bei der Einstellung <code>0</code> sind unbegrenzt viele Anfragen + erlaubt. Wir empfehlen für diese Einstellung einen hohen Wert + für eine maximale Serverleistung.</p> + + <p>Beispiel:</p> + + <div class="example"><p><code> + MaxKeepAliveRequests 500 + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a>-<a name="maxrangeoverlaps" id="maxrangeoverlaps">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Number of overlapping ranges (eg: <code>100-200,150-300</code>) allowed before returning the complete + resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a>-<a name="maxrangereversals" id="maxrangereversals">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Number of range reversals (eg: <code>100-200,50-70</code>) allowed before returning the complete + resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeReversals default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>MaxRangeReversals 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a>-<a name="maxranges" id="maxranges">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Number of ranges allowed before returning the complete +resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRanges default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>MaxRanges 200</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MergeSlashes" id="MergeSlashes">MergeSlashes</a>-<a name="mergeslashes" id="mergeslashes">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Controls whether the server merges consecutive slashes in URLs. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MergeSlashes ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>MergeSlashes ON</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Added in 2.4.39</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a>-<a name="mergetrailers" id="mergetrailers">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Determines whether trailers are merged into headers</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MergeTrailers [on|off]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>MergeTrailers off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>2.4.11 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a>-<a name="mutex" id="mutex">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Configures mutex mechanism and lock file directory for all +or specified mutexes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>Mutex default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a>-<a name="namevirtualhost" id="namevirtualhost">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Bestimmt eine IP-Adresse für den Betrieb namensbasierter +virtueller Hosts</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>Adresse</var>[:<var>Port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">NameVirtualHost</code> ist erforderlich, + wenn Sie <a href="../vhosts/">namensbasierte virtuelle Hosts</a> + konfigurieren möchten.</p> + + <p>Obwohl <var>Adresse</var> eine Hostname sein kann, wird empfohlen, + dass Sie stets eine IP-Adresse verwenden, z.B.:</p> + + <div class="example"><p><code> + NameVirtualHost 111.22.33.44 + </code></p></div> + + <p>Mit der <code class="directive">NameVirtualHost</code>-Anweisung geben Sie + die IP-Adresse an, unter der der Server Anfragen für + namensbasierte virtuelle Hosts entgegennimmt. Das ist üblicherweise + die Adresse, zu der die Namen Ihrer namensbasierten virtuellen Hosts + aufgelöst werden. Falls eine Firewall oder ein anderer Proxy die + Anfrage in Empfang nimmt und Sie zu einer weiteren IP-Adresse des Servers + weiterleitet, müssen Sie die IP-Adresse der physikalischen + Schnittstelle der Maschine angeben, welche die Anfragen bedient. + Wenn Sie mehrere namensbasierte Hosts an verschiedenen Adressen + betreiben, wiederholen Sie einfach die Anweisung für jede + Adresse.</p> + + <div class="note"><h3>Anmerkung</h3> + <p>Beachten Sie, dass der "Hauptserver" und jeder + <code>_default_</code>-Server <strong>niemals</strong> bei einer + Anfrage an einer <code class="directive">NameVirtualHost</code>-IP-Adresse + bedient wird (es sei denn, Sie geben aus irgendwelchen Gründen + <code class="directive">NameVirtualHost</code> an, definieren dann aber keine + <code class="directive">VirtualHost</code>s für diese Adresse).</p> + </div> + + <p>Optional können Sie die Nummer eines Ports angeben, an dem + namensbasierte virtuelle Hosts verwendet werden sollen. Beispiel:</p> + + <div class="example"><p><code> + NameVirtualHost 111.22.33.44:8080 + </code></p></div> + + <p>IPv6-Adressen müssen, wie im folgenden Beispiel angegeben, in + eckige Klammern eingeschlossen werden:</p> + + <div class="example"><p><code> + NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080 + </code></p></div> + + <p>Um an allen Schnittstellen Anfragen zu empfangen, können Sie + <code>*</code> als Argument verwenden.</p> + + <div class="example"><p><code> + NameVirtualHost * + </code></p></div> + + <div class="note"><h3>Argument der Direktive <code class="directive"><VirtualHost></code></h3> + <p>Beachten Sie, dass das Argument der <code class="directive"><VirtualHost></code>-Anweisung exakt auf das Argument + der <code class="directive">NameVirtualHost</code>-Anweisung passen muss.</p> + + <div class="example"><p><code> + NameVirtualHost 1.2.3.4<br /> + <VirtualHost 1.2.3.4><br /> + # ...<br /> + </VirtualHost><br /> + </code></p></div> + </div> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../vhosts/">Dokumentation zu virtuellen Hosts</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Options" id="Options">Options</a>-<a name="options" id="options">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Definiert, welche Eigenschaften oder Funktionen in einem +bestimmten Verzeichnis verfügbar sind</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options + [+|-]<var>Option</var> [[+|-]<var>Option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>Options All</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">Options</code> steuert, welche + Eigenschaften bzw. Funktionen in einem bestimmten Verzeichnis + verfügbar sind.</p> + + <p><var>Option</var> kann auf <code>None</code> gesetzt werden, wobei + keine der besonderen Eigenschaften verfügbar sind, oder auf eines + oder mehrere der folgenden:</p> + + <dl> + <dt><code>All</code></dt> + + <dd>Alle Optionen außer <code>MultiViews</code>. Dies ist + die Voreinstellung.</dd> + + <dt><code>ExecCGI</code></dt> + + <dd>Die Ausführung von CGI-Skripten, welche <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> + verwenden, ist erlaubt.</dd> + + <dt><code>FollowSymLinks</code></dt> + + <dd>Der Server folgt symbolischen Links in diesem Verzeichnis. + <div class="note"> + <p>Auch wenn der Server symbolischen Links folgt, bedeutet dies + <em>nicht</em>, dass der zum Abgleich gegen <code class="directive"><a href="#directory"><Directory></a></code>-Abschnitte verwendete Pfadname + wechselt.</p> + <p>Beachten Sie auch, dass diese Option innerhalb eines + <code class="directive"><a href="#location"><Location></a></code>-Abschnitts + <strong>ignoriert wird</strong>.</p> + </div></dd> + + <dt><code>Includes</code></dt> + + <dd> + Server Side Includes, die von <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> bereitgestellt + werden, sind erlaubt.</dd> + + <dt><code>IncludesNOEXEC</code></dt> + + <dd>Server Side Includes sind erlaubt, <code>#exec cmd</code> + und <code>#exec cgi</code> sind jedoch deaktiviert. Es ist aber noch + möglich, CGI-Skripte aus + <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>-Verzeichnissen mittels + <code>#include virtual</code> einzubinden.</dd> + + <dt><code>Indexes</code></dt> + + <dd>Wenn eine URL, die auf ein Verzeichnis zeigt, in dem sich keine durch + <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> definierte + Indexdatei (<em>z.B.</em> <code>index.html</code>) befindet, dann liefert + <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> eine formatierte Auflistung des + Verzeichnisses zurück.</dd> + + <dt><code>MultiViews</code></dt> + + <dd>"MultiViews" sind bei der Verwendung von + <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> erlaubt (siehe <a href="../content-negotiation.html">Content-Negotiation</a>).</dd> + + <dt><code>SymLinksIfOwnerMatch</code></dt> + + <dd>Der Server folgt nur symbolischen Links, bei denen die Zieldatei + bzw. das Zielverzeichnis der gleichen Benutzerkennung gehört, wie + der Link. + <div class="note"><h3>Anmerkung</h3> Diese Option wird innerhalb eines + <code class="directive"><a href="#location"><Location></a></code>-Abschnitts + ignoriert.</div></dd> + </dl> + + <p>Wenn mehrere <code class="directive">Options</code> auf ein Verzeichnis + angewandt werden können, dann wird normalerweise die + spezifischste <span class="transnote">(<em>Anm.d.Ü.:</em> Gemeint ist die zuletzt + ausgeführte Option.)</span> verwendet und alle anderen werden + ignoriert; die Optionen werden nicht vermischt. (Siehe auch <a href="../sections.html#mergin">Wie Abschnitte zusammengeführt + werden.</a>.) Wenn jedoch <em>allen</em> Optionen der + <code class="directive">Options</code>-Anweisung eines der Zeichen + <code>+</code> oder <code>-</code> vorangestellt wird, werden die Optionen + zusammengemischt. Jede Option mit vorangestelltem <code>+</code> wird + zu den momentan gültigen Optionen hinzugefügt und jede Option + mit vorangestelltem <code>-</code> wird aus den derzeit gültigen + Optionen entfernt.</p> + + <div class="warning"><h3>Warnung</h3> + <p>Die Vermischung von Optionen mit <code>+</code> oder <code>-</code> mit + Optionen ohne diese (Zeichen) ist keine gültige Syntax und führt + mit hoher Wahrscheinlichkeit zu unerwarteten Effekten.</p> + </div> + + <p>So wird zum Beispiel ohne die Zeichen <code>+</code> und + <code>-</code></p> + + <div class="example"><p><code> + <Directory /web/docs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory><br /> + <br /> + <Directory /web/docs/spec><br /> + <span class="indent"> + Options Includes<br /> + </span> + </Directory> + </code></p></div> + + <p>für das Verzeichnis <code>/web/docs/spec</code> wird jetzt + lediglich <code>Includes</code> gesetzt. Wenn die zweite + <code class="directive">Options</code>-Anweisung jedoch <code>+</code>- + und <code>-</code>-Zeichen verwenden würde,</p> + + <div class="example"><p><code> + <Directory /web/docs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory><br /> + <br /> + <Directory /web/docs/spec><br /> + <span class="indent"> + Options +Includes -Indexes<br /> + </span> + </Directory> + </code></p></div> + + <p>dann würden die Optionen <code>FollowSymLinks</code> und + <code>Includes</code> für das Verzeichnis <code>/web/docs/spec</code> + gesetzt.</p> + + <div class="note"><h3>Anmerkung</h3> + <p>Die Verwendung von <code>-IncludesNOEXEC</code> oder + <code>-Includes</code> deaktiviert Server Side Includes unabhängig + von der vorigen Einstellung vollständig.</p> + </div> + + <p>Die Voreinstellung ist <code>All</code>, sofern keine anderen Angaben + gemacht wurden.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a>-<a name="protocol" id="protocol">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Protocol for a listening socket</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocol <var>protocol</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache 2.1.5 and later. +On Windows, from Apache 2.3.3 and later.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Protocols" id="Protocols">Protocols</a>-<a name="protocols" id="protocols">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Protocols available for a server/virtual host</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocols <var>protocol</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>Protocols http/1.1</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#protocolshonororder">ProtocolsHonorOrder</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ProtocolsHonorOrder" id="ProtocolsHonorOrder">ProtocolsHonorOrder</a>-<a name="protocolshonororder" id="protocolshonororder">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Determines if order of Protocols determines precedence during negotiation</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProtocolsHonorOrder On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ProtocolsHonorOrder On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#protocols">Protocols</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="QualifyRedirectURL" id="QualifyRedirectURL">QualifyRedirectURL</a>-<a name="qualifyredirecturl" id="qualifyredirecturl">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Controls whether the REDIRECT_URL environment variable is + fully qualified</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>QualifyRedirectURL On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>QualifyRedirectURL Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL On' was configured.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ReadBufferSize" id="ReadBufferSize">ReadBufferSize</a>-<a name="readbuffersize" id="readbuffersize">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Size of the buffers used to read data</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ReadBufferSize <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ReadBufferSize 8192</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>2.4.27 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RegexDefaultOptions" id="RegexDefaultOptions">RegexDefaultOptions</a>-<a name="regexdefaultoptions" id="regexdefaultoptions">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Allow to configure global/default options for regexes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RegexDefaultOptions [none] [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>RegexDefaultOptions DOTALL DOLLAR_ENDONLY</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Only available from Apache 2.4.30 and later.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a>-<a name="registerhttpmethod" id="registerhttpmethod">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Register non-standard HTTP methods</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache HTTP Server 2.4.24 and later</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#httpprotocoloptions">HTTPProtocolOptions</a></code></li> +<li><code class="directive"><a href="../mod/mod_allowmethods.html#allowmethods">AllowMethods</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a>-<a name="rlimitcpu" id="rlimitcpu">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Begrenzt den CPU-Verbrauch von Prozessen, die von +Apache-Kindprozessen gestartet wurden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitCPU <var>Sekunden</var>|max [<var>Sekunden</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>unbestimmt; verwendet die Voreinstellung des Systems</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Akzeptiert einen oder zwei Parameter. Der erste Paramater setzt eine + weiche Ressourcenbegrenzung für alle Prozesse, der zweite Parameter + setzt die Maximalgrenze für die Ressourcennutzung. Jeder der + Parameter kann eine Zahl oder <code>max</code> sein. <code>max</code> + zeigt dem Server an, dass das vom Betriebssystem erlaubte Maximum + verwendet werden soll. Das Anheben der maximal erlaubten Ressourcennutzung + erfordert, dass der Server als <code>root</code> läuft, zumindest in + der anfänglichen Startphase.</p> + + <p>Dies wird auf Prozesse angewendet, die von Anfragen bearbeitenden + Apache-Kindprozessen abgespalten werden, nicht auf die + Apache-Kindprozesse selbst. Das beinhaltet CGI-Skripte und + SSI-exec-Befehle, nicht jedoch Prozesse, die vom Apache-Elternprozess + abgespalten werden, wie z.B. Protokollierung.</p> + + <p>CPU-Ressourcenbegrenzung wird in Sekunden pro Prozess + ausgedrückt.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a>-<a name="rlimitmem" id="rlimitmem">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Begrenzt den Speicherverbrauch von Prozessen, die von +Apache-Kindprozessen gestartet wurden</td></tr> +<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> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>unbestimmt; verwendet die Voreinstellung des Systems</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Akzeptiert einen oder zwei Parameter. Der erste Paramater setzt eine + weiche Ressourcenbegrenzung für alle Prozesse, der zweite Parameter + setzt die Maximalgrenze für die Ressourcennutzung. Jeder der + Parameter kann eine Zahl oder <code>max</code> sein. <code>max</code> + zeigt dem Server an, dass das vom Betriebssystem erlaubte Maximum + verwendet werden soll. Das Anheben der maximal erlaubten Ressourcennutzung + erfordert, dass der Server als <code>root</code> läuft, zumindest in + der anfänglichen Startphase.</p> + + <p>Dies wird auf Prozesse angewendet, die von Anfragen bearbeitenden + Apache-Kindprozessen abgespalten werden, nicht auf die + Apache-Kindprozesse selbst. Das beinhaltet CGI-Skripte und + SSI-exec-Befehle, nicht jedoch Prozesse, die vom Apache-Elternprozess + abgespalten werden, wie z.B. Protokollierung.</p> + + <p>Die Begrenzung des Speicherverbrauchs wird in Bytes pro Prozess + ausgedrückt.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a>-<a name="rlimitnproc" id="rlimitnproc">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Begrenzt die Anzahl der Prozesse, die von Prozessen gestartet +werden können, der ihrerseits von Apache-Kinprozessen gestartet +wurden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitNPROC <var>Zahl</var>|max [<var>Zahl</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>unbestimmt; verwendet die Voreinstellung des Systems</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Akzeptiert einen oder zwei Parameter. Der erste Paramater setzt eine + weiche Ressourcenbegrenzung für alle Prozesse, der zweite Parameter + setzt die Maximalgrenze für die Ressourcennutzung. Jeder der + Parameter kann eine Zahl oder <code>max</code> sein. <code>max</code> + zeigt dem Server an, dass das vom Betriebssystem erlaubte Maximum + verwendet werden soll. Das Anheben der maximal erlaubten Ressourcennutzung + erfordert, dass der Server als <code>root</code> läuft, zumindest in + der anfänglichen Startphase.</p> + + <p>Dies wird auf Prozesse angewendet, die von Anfragen bearbeitenden + Apache-Kindprozessen abgespalten werden, nicht auf die + Apache-Kindprozesse selbst. Dies beinhaltet CGI-Skripte und + SSI-exec-Befehle, nicht jedoch Prozesse, die vom Apache-Elternprozess + abgespalten werden, wie z.B. Protokollierung.</p> + + <p>Prozessbegrenzungen steuern die Anzahl der Prozesse pro Benutzer.</p> + + <div class="note"><h3>Anmerkung</h3> + <p>Wenn CGI-Prozesse nicht unter anderen Benutzerkennungen als der + User-ID des Webservers laufen, dann beschränkt diese Direktive + die Anzahl der Prozesse, die der Server selbst erstellen kann. + Kennzeichen einer solchen Situation sind + <strong><code>cannot fork</code></strong>-Meldungen + <span class="transnote">(<em>Anm.d.Ü.:</em> <code>kann nicht abspalten</code>)</span> in der + Datei <code>error_log</code>.</p> + </div> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a>-<a name="scriptinterpretersource" id="scriptinterpretersource">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Methode zur Ermittlung des Interpreters von +CGI-Skripten</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>ausschließlich Win32; +Die Option <code>Registry-Strict</code> ist verfügbar seit Apache +2.0.</td></tr> +</table> + <p>Die Direktive steuert, wie der Apache den Interpreter zur Ausführung + von CGI-Skripten bestimmt. Die Voreinstellung ist <code>Script</code>. Dies + veranlaßt den Apache, den Interpreter zu verwenden, auf den die + Shebang-Zeile (erste Zeile, beginnt mit <code>#!</code>) im Skript zeigt. + Auf Win32-Systemen sieht diese Zeile üblicherweise so aus:</p> + + <div class="example"><p><code> + #!C:/Perl/bin/perl.exe + </code></p></div> + + <p>oder, wenn <code>perl</code> im Pfad (Umgebungsvariable <code>PATH</code>) liegt, + einfach:</p> + + <div class="example"><p><code> + #!perl + </code></p></div> + + <p>Die Einstellung <code>ScriptInterpreterSource Registry</code> + veranlaßt eine Suche in <code>HKEY_CLASSES_ROOT</code> der + Windows-Registrierungsdatenbank und verwendet die Endung der Skript-Datei + (z.B. <code>.pl</code>) als Suchargument. Der durch den Unterschlüssel + <code>Shell\ExecCGI\Command</code> oder, falls dieser nicht existiert, + <code>Shell\Open\Command</code> definierte Befehl wird zum Öffnen der + Skript-Datei verwendet. Wenn der Schlüssel zur Dateiendung oder + beide Unterschlüssel fehlen, dann verwendet der Apache die Option + <code>Script</code>.</p> + + <div class="warning"><h3>Sicherheit</h3> + <p>Seien Sie vorsichtig, <code>ScriptInterpreterSource Registry</code> bei + Verzeichnissen zu verwenden, auf die eine <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>-Anweisung zeigt, denn der + Apache versucht <strong>jede</strong> Datei innerhalb des Verzeichnisses + auszuführen. Die Einstellung <code>Registry</code> kann + unerwünschte Programmaufrufe bei Dateien verursachen, die + üblicherweise nicht ausgeführt werden. Auf den meisten + Windows-Systemen beispielsweise startet der voreingestellte + Öffnen-Befehl für <code>.htm</code>-Dateien den Microsoft + Internet Explorer, so dass jede HTTP-Anfrage nach einer existierenden + <code>.htm</code>-Datei im Skript-Verzeichnis den Browser im Hintergrund + starten würde. Dies ist eine wirksame Methode, Ihr System binnen + etwa einer Minute zum Absturz zu bringen.</p> + </div> + + <p>Die seit Apache 2.0 neue Option <code>Registry-Strict</code> + macht das gleiche wie <code>Registry</code>, verwendet jedoch nur den + Unterschlüssel <code>Shell\ExecCGI\Command</code>. Der Schlüssel + <code>ExecCGI</code> ist gewöhnlich nicht voreingestellt. Er muss + manuell eingerichtet werden und schützt Ihr System so for + versehentlichen Programmaufrufen.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a>-<a name="seerequesttail" id="seerequesttail">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Determine if mod_status displays the first 63 characters +of a request or the last 63, assuming the request itself is greater than +63 chars.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SeeRequestTail On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>SeeRequestTail Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Available in Apache httpd 2.2.7 and later.</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a>-<a name="serveradmin" id="serveradmin">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>E-Mail-Adresse, die der Server in Fehlermeldungen einfügt, +welche an den Client gesendet werden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>E-Mail-Adresse</var>|<var>URL</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerAdmin</code> legt die Kontaktadresse fest, + die der Server in jede Fehlermeldung einfügt, die er an den + Client zurückschickt. Wenn <code>httpd</code> das übergebene + Argument nicht als URL erkennt, nimmt er an, dess es sich um eine + <var>E-Mail-Adresse</var> handelt und stellt in Hyperlinks + <code>mailto:</code> voran. Es ist jedoch sogar sinnvoll, eine + E-Mail-Adresse zu verwenden, da viele CGI-Skripte davon ausgehen. Wenn Sie + eine URL verwenden möchten, sollten Sie auf einem anderen unter Ihrer + Kontrolle stehenden Server verweisen. Andernfalls können Besucher Sie + im Fehlerfall möglicherweise nicht kontaktieren.</p> + + <p>Es kann sich lohnen, hierfür eine reservierte Adresse + anzugeben, z.B.</p> + + <div class="example"><p><code> + ServerAdmin www-admin@foo.example.com + </code></p></div> + + <p>da Anwender nicht unbedingt erwähnen, dass sie vom Server + sprechen!</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a>-<a name="serveralias" id="serveralias">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Alternativer Name für einen Host, der verwendet wird, wenn +Anfragen einem namensbasierten virtuellen Host zugeordnet werden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>Hostname</var> [<var>Hostname</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">ServerAlias</code> bestimmt die + alternativen Namen eines Hosts zur Verwendung mit <a href="../vhosts/name-based.html">namensbasierten virtuellen Hosts</a>.</p> + + <div class="example"><p><code> + <VirtualHost *><br /> + ServerName server.domain.com<br /> + ServerAlias server server2.domain.com server2<br /> + # ...<br /> + </VirtualHost> + </code></p></div> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../vhosts/">Apache-Dokumentation zu virtuellen + Hosts</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a>-<a name="servername" id="servername">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Rechnername und Port, die der Server dazu verwendet, sich +selbst zu identifizieren</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerName +<var>voll-qualifizierter-Domainname</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Diese Direktive löst in Version 2.0 die + Funktionalität der Direktive <code class="directive">Port</code> aus + Version 1.3 ab.</td></tr> +</table> + <p>Die Direktive <code class="directive">ServerName</code> bestimmt den + Rechnernamen und Port, den der Server dazu verwendet, sich selbst + zu identifizieren. Diese werden bei der Erstellung von Umleitungs-URLs + benötigt. Wenn beispielsweise der Name der Maschine, die den Webserver + beherbergt, <code>simple.example.com</code> lautet, die Maschine jedoch + auch einen DNS-Alias <code>www.example.com</code> besitzt und Sie den + Webserver so identifizieren möchten, sollten Sie die folgende + Anweisung verwenden:</p> + + <div class="example"><p><code> + ServerName www.example.com:80 + </code></p></div> + + <p>Wenn kein <code class="directive">ServerName</code> angegeben wurde, + dann versucht der Server den Rechnernamen mittels eines Reverse-Lookup + herzuleiten. Wenn kein Port in der + <code class="directive">ServerName</code>-Anweisung angegeben wurde, dann + verwendet der Server den Port der eingegangenen Anfrage. Für eine + optimale Zuverlässigkeit und Berechenbarkeit sollten Sie einen + eindeutigen Rechnernamen und Port angeben, in dem Sie die Direktive + <code class="directive">ServerName</code> verwenden.</p> + + <p>Wenn Sie <a href="../vhosts/name-based.html">namensbasierte + virtuelle Hosts</a> verwenden, gibt <code class="directive">ServerName</code> + innerhalb eines <code class="directive"><a href="#virtualhost"><VirtualHost></a></code>-Abschnitts an, welcher + Hostname im <code>Host:</code>-Header der Anfrage auftauchen muss, + damit sie diesem virtuellen Host zugeordnet wird.</p> + + <p>Lesen Sie bitte die Beschreibung der Direktiven <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> und <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> für Einstellungen, die + bestimmen, ob selbstreferenzierende URLs (z.B. vom Modul + <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>) auf den angegebenen Port zeigen oder auf die + Portnummern die in der Anfrage des Clients angegeben ist.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../dns-caveats.html">Probleme bezüglich DNS und +Apache</a></li> +<li><a href="../vhosts/">Apache-Dokumentation zu virtuellen + Hosts</a></li> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li> +<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a>-<a name="serverpath" id="serverpath">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Veralteter URL-Pfad für einen namensbasierten +virtuellen Host, auf den von einem inkompatiblen Browser zugegriffen +wird</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-Pfad</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">ServerPath</code> legt den + veralteten <span class="transnote">(<em>Anm.d.Ü.:</em> Gemeint ist eigentlich "Altlast" aufgrund + antiquierter Clients.)</span> URL-Pfad eines Hosts zur Verwendung mit + <a href="../vhosts/">namensbasierten virtuellen Hosts</a> fest.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../vhosts/">Apache-Dokumentation zu virtuellen + Hosts</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a>-<a name="serverroot" id="serverroot">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Basisverzeichnis der Serverinstallation</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>Verzeichnis</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">ServerRoot</code> bestimmt das + Verzeichnis, in dem der Server installiert ist. Üblicherweise + enthält es die Unterverzeichnisse <code>conf/</code> und + <code>logs/</code>. Relative Pfadangaben anderer Direktiven (wie z.B. + <code class="directive"><a href="#include">Include</a></code> oder <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>) werden relativ zu diesem + Verzeichnis betrachtet.</p> + + <div class="example"><h3>Beispiel</h3><p><code> + ServerRoot /home/httpd + </code></p></div> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../invoking.html">Die <code>httpd</code>-Option + <code>-d</code></a></li> +<li><a href="../misc/security_tips.html#serverroot">Sicherheitshinweise</a> + für Informationen, wie die Rechte auf das <code class="directive">ServerRoot</code>-Verzeichnis richtig gesetzt werden</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a>-<a name="serversignature" id="serversignature">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Konfiguriert die Fußzeile von servergenerierten +Dokumenten</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ServerSignature Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">ServerSignature</code> ermöglicht + die Gestaltung einer unter servergenerierten Dokumenten (z.B. + Fehlerdokumente, FTP-Verzeichnislisten von <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, + <code class="module"><a href="../mod/mod_info.html">mod_info</a></code>-Ausgaben, ...) angefügten + Fußzeile. Ein möglicher Grund für die Aktivierung einer + solchen Fußzeile ist, dass der Anwender bei einer Kette von + Proxy-Servern oft keine Möglichkeit hat, zu erkennen, welcher der + verketteten Server gegenwärtig die zurückgegebene Fehlermeldung + produziert hat.</p> + + <p>Die (Vor-)Einstellung <code>Off</code> unterdrückt die + Fußzeile (und ist damit kompatibel zum Verhalten des Apache 1.2 und + früher). Die Einstellung <code>On</code> fügt schlicht eine + Zeile mit der Versionsnummer des Servers und dem Servernamen (<code class="directive"><a href="#servername">ServerName</a></code>) des bedienenden virtuellen Hosts an. + Die Einstellung <code>EMail</code> erstellt zusätzlich einen + "mailto:"-Verweis zum Serveradministrator (<code class="directive"><a href="#serveradmin">ServerAdmin</a></code>) des referenzierten Dokuments.</p> + + <p>Ab Version 2.0.44 werden die Details der angegebenen Versionsnummer des + Servers von der Direktive <code class="directive"><a href="#servertokens">ServerTokens</a></code> kontrolliert.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a>-<a name="servertokens" id="servertokens">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Konfiguriert den HTTP-Response-Header +<code>Server</code></td></tr> +<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> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>ServerTokens Full</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>die Direktive steuert, ob der Response-Header <code>Server</code>, + der an den Client zurückgesendet wird, eine Beschreibung des + allgemeinen Betriesbsystemtyps des Servers wie auch Informationen + über einkompilierte Module enthält.</p> + + <dl> + <dt><code>ServerTokens Prod[uctOnly]</code></dt> + + <dd>Der Server sendet (<em>z.B.</em>): <code>Server: + Apache</code></dd> + + <dt><code>ServerTokens Major</code></dt> + + <dd>Der Server sendet (<em>z.B.</em>): <code>Server: + Apache/2</code></dd> + + <dt><code>ServerTokens Minor</code></dt> + + <dd>Der Server sendet (<em>z.B.</em>): <code>Server: + Apache/2.0</code></dd> + + <dt><code>ServerTokens Min[imal]</code></dt> + + <dd>Der Server sendet (<em>z.B.</em>): <code>Server: + Apache/2.0.41</code></dd> + + <dt><code>ServerTokens OS</code></dt> + + <dd>Der Server sendet (<em>z.B.</em>): <code>Server: Apache/2.0.41 + (Unix)</code></dd> + + <dt><code>ServerTokens Full</code> (oder nicht angegeben)</dt> + + <dd>Der Server sendet (<em>z.B.</em>): <code>Server: Apache/2.0.41 + (Unix) PHP/4.2.2 MyMod/1.2</code></dd> + </dl> + + <p>Diese Einstellung gilt für den gesamten Server und kann nicht + auf Virtual-Host-Basis aktiviert oder deaktiviert werden.</p> + + <p>Ab Version 2.0.44 steuert diese Direktive auch die Informationen, die + durch die Direktive <code class="directive"><a href="#serversignature">ServerSignature</a></code> + angeboten werden.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a>-<a name="sethandler" id="sethandler">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Erzwingt die Verarbeitung aller passenden Dateien durch +einen Handler</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetHandler <var>Handlername</var>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Seit Apache 2.0 im Core</td></tr> +</table> + <p>Wenn die Direktive innerhalb einer <code>.htaccess</code>-Datei + oder in einem <code class="directive"><a href="#directory"><Directory></a></code>- oder + <code class="directive"><a href="#location"><Location></a></code>-Abschnitt + angegeben wird, erzwingt sie, dass alle entsprechenden Dateien von dem + durch <var>Handlername</var> angegebenen <a href="../handler.html">Handler</a> analysiert werden. Wenn Sie + beispielsweise ein Verzeichnis haben, dessen Dateien unabhängig von + der Endung gänzlich als Image-Maps interpretiert werden sollen, + können Sie folgendes in eine <code>.htaccess</code>-Datei in + dem Verzeichnis schreiben:</p> + + <div class="example"><p><code> + SetHandler imap-file + </code></p></div> + + <p>Noch ein Beispiel: wenn Sie den Server immer, wenn die URL + <code>http://servername/status</code> aufgerufen wird, einen + Statusbericht anzeigen lassen möchten, dann können + Sie folgendes in die <code>httpd.conf</code> schreiben:</p> + + <div class="example"><p><code> + <Location /status><br /> + <span class="indent"> + SetHandler server-status<br /> + </span> + </Location> + </code></p></div> + <p>Sie können eine zuvor definierte + <code class="directive">SetHandler</code>-Anweisung aufheben, indem Sie den Wert + <code>None</code> verwenden.</p> + <p><strong>Hinweis:</strong> SetHandler setzt die Standard-Handler + außer Kraft und unterdrückt gewohnte Verhaltensweisen, wie + beispielsweise die Behandlung von URLs, die auf einen Schrägstrich + (/) enden als Verzeichnisse oder (die Auslieferung von) Index-Dateien.</p> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a>-<a name="setinputfilter" id="setinputfilter">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Bestimmt die Filter, die Client-Anfragen und POST-Eingaben +verarbeiten</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetInputFilter <var>Filter</var>[;<var>Filter</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">SetInputFilter</code> bestimmt den oder + die Filter, die Client-Anfragen und POST-Eingaben verarbeiten, wenn + sie vom Server empfangen werden. Diese gelten zusätzlich zu + anderweitig definierten Filtern, einschließlich denen der Direktive + <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>.</p> + + <p>Wenn mehr als ein Filter angegeben wird, dann müssen diese + durch Semikolon voneinander getrennt in der Reihenfolge angegeben werden, + in der sie die Daten verarbeiten sollen.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../filter.html">Filter</a>-Dokumentation</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a>-<a name="setoutputfilter" id="setoutputfilter">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Bestimmt die Filter, die Antworten des Servers verarbeiten</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>Filter</var>[;<var>Filter</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">AllowOverride:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">SetOutputFilter</code> bestimmt + die Filter, die Antworten des Servers verarbeiten, bevor sie an den + Client gesendet werden. Diese gelten zusätzlich zu anderweitig + definierten Filtern, einschließlich denen der Direktive + <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>.</p> + + <p>Die folgende Konfiguration verarbeitet zum Beispiel alle Dateien + im Verzeichnis <code>/www/data</code> als Server Side Includes.</p> + + <div class="example"><p><code> + <Directory /www/data/><br /> + <span class="indent"> + SetOutputFilter INCLUDES<br /> + </span> + </Directory> + </code></p></div> + + <p>Wenn mehr als ein Filter angegeben wird, dann müssen diese + durch Semikolon voneinander getrennt in der Reihenfolge angegeben werden, + in der sie die Daten verarbeiten sollen.</p> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../filter.html">Filter</a>-Dokumentation</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="StrictHostCheck" id="StrictHostCheck">StrictHostCheck</a>-<a name="stricthostcheck" id="stricthostcheck">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Controls whether the server requires the requested hostname be + listed enumerated in the virtual host handling the request + </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>StrictHostCheck ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>StrictHostCheck OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Added in 2.4.49</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a>-<a name="timeout" id="timeout">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Zeitspanne, die der Server auf verschiedene Ereignisse wartet, +bevor er die Anfrage abbricht</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>Sekunden</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>TimeOut 60</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>Die Direktive <code class="directive">TimeOut</code> definiert derzeit die + Zeitspanne, die der Apache auf drei Dinge wartet:</p> + + <ol> + <li>Die gesamte Zeispanne, die benötigt wird, um eine GET-Anfrage + zu empfangen.</li> + + <li>Die Zeitspanne zwischen dem Empfang von TCP-Paketen einer + POST- oder PUT-Anfrage.</li> + + <li>Die Zeitspanne zwischen ACKs bei der Übermittlung der + TCP-Pakete der Antwort.</li> + </ol> + + <p>Wir haben vor, diese Zeitspannen in Zukunft separat konfigurierbar zu + machen. Vor Version 1.2 war der Zeitgeber auf 1200 voreingestellt, wurde + dann aber auf 300 herabgesetzt, was immer noch weit mehr ist, als in den + meisten Situationen benötigt wird. Die Voreinstellung wurde nicht + weiter herabgesetzt, da gelegentlich noch Stellen im Code existieren + können, wo der Zeitgeber nicht zurückgesetzt wird, wenn ein + Paket verschickt wird. Seit Apache 2.4 ist die Voreinstellung 60.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a>-<a name="traceenable" id="traceenable">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Legt das Verhalten von <code>TRACE</code>-Anfragen fest</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>TraceEnable on</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Kompatibilität:</a></th><td>Verfügbar ab Apache 1.3.34 und 2.0.55</td></tr> +</table> + <p>Diese Direktive beeinflusst das Verhalten von <code>TRACE</code> sowohl + für den Server selbst als auch <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>. Die + Voreinstellung <code>TraceEnable on</code> erlaubt + <code>TRACE</code>-Anfragen gemäß RFC 2616. Dort werden + nur Anfragen ohne Datenteil zugelassen. <code>TraceEnable off</code> + sorgt dafür, dass der Serverkern und <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> den + Fehler <code>405</code> (Zugriffsmethode nicht erlaubt) an den Client + senden.</p> + + <p>Zu Test- und Diagnosezwecken können Sie auch + nicht-standardkonforme Anfragen mit Datenteil erlauben, indem Sie die + Direktive <code>TraceEnable extended</code> verwenden. Der Server (als + Ursprungsserver) beschränkt den Anfrageinhalt auf 64k. (Wenn + <code>Transfer-Encoding: chunked</code> benutzt wird, können + weitere 8k für die Chunk-Kopfzeilen verwendet werden.) Der + Server selbst reflektiert dann die vollständigen HTTP- und + Chunk-Kopfzeilen in seiner Antwort. Die Einschränkung auf 64k gilt + nicht, wenn der Server als Proxy arbeitet.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a>-<a name="undefine" id="undefine">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Undefine the existence of a variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table><p>Die Dokumentation zu dieser Direktive wurde + noch nicht übersetzt. Bitte schauen Sie in die englische + Version.</p><h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#define">Define</a></code></li> +<li><code class="directive"><a href="#ifdefine">IfDefine</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a>-<a name="usecanonicalname" id="usecanonicalname">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Bestimmt, wie der Server seinen eigenen Namen und Port +ermittelt</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>UseCanonicalName Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>In vielen Situationen muss der Apache eine + <em>selbstreferenzierende</em> URL -- d.h. eine URL, die auf den selben + Server zurück verweist -- zusammenbauen. Bei <code>UseCanonicalName + On</code> verwendet der Apache den Hostnamen und Port, der in der + <code class="directive"><a href="#servername">ServerName</a></code>-Anweisung angegeben ist, + um den kanonischen Namen des Servers zu erstellen. Dieser Name wird in + allen selbstreferenzierenden URLs sowie in CGI-Skripten für die + Werte von <code>SERVER_NAME</code> und <code>SERVER_PORT</code> + verwendet.</p> + + <p>Bei <code>UseCanonicalName Off</code> bildet der Apache + selbstreferenzierende URLs, indem er den vom Client übermittelten + Hostnamen und Port verwendet, sofern diese vorhanden sind (andernfalls + wird der kanonische Name, wie oben beschrieben, benutzt). Die Werte + sind die gleichen, die zur Anwendung von <a href="../vhosts/name-based.html">namensbasierten virtuellen Hosts</a> + verwendet werden, und sie sind mit den gleichen Clients verfügbar + <span class="transnote">(<em>Anm.d.Ü.:</em> , die auch in der Lage sind, auf namensbasierte virtuelle Hosts + zuzugreifen, d.h. einen <code>Host</code>-Header mitschicken)</span>. + Die CGI-Variablen <code>SERVER_NAME</code> und <code>SERVER_PORT</code> + werden ebenfalls aus den vom Client angeboten Werten erstellt.</p> + + <p>Ein Intranet-Server, auf den Anwender mit kurzen Namen wie + <code>www</code> zugreifen, ist ein Beispiel, wo dies sinnvoll sein kann. + Sie werden bemerken, dass der Apache den Benutzer auf + <code>http://www.domain.com/splat/</code> umleitet, wenn dieser einen + Kurznamen und eine URL, die einem Verzeichnis entspricht, ohne + abschließenden Schrägstrich eingibt, wie z.B. + <code>http://www/splat</code>. Wenn Sie Authentisierung aktiviert haben, + bewirkt dies, dass der Benutzer sich zweimal identifizieren muss + (einmal für <code>www</code> und noch einmal für + <code>www.domain.com</code> -- lesen Sie für weitere Informationen <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">die + FAQ zu diesem Thema</a>). Wenn <code class="directive">UseCanonicalName</code> + jedoch auf <code>Off</code> gesetzt ist, denn wird der Apache zu + <code>http://www/splat/</code> umleiten.</p> + + <p>Es existiert noch eine dritte Option, <code>UseCanonicalName DNS</code>, + die für den Betrieb von IP-basierten Massen-Virtual-Hosts gedacht ist, + um antiquierte Clients zu unterstützen, die keinen + <code>Host:</code>-Header bereit stellen. Um selbstreferenzierende + URLs zu ermitteln, führt der Apache bei dieser Option ein + Reverse-DNS-Lookup auf die IP-Adresse des Servers aus, zu der der Client + Verbindung aufgenommen hat.</p> + + <div class="warning"><h3>Warnung</h3> + <p>Wenn CGI-Skripte Vermutungen aufgrund des Wertes von + <code>SERVER_NAME</code> anstellen, können sie durch diese + Option fehlschlagen. Clients steht es im Wesentlichen frei, einen Wert + für den Hostnamen anzugeben, wie er will. Wenn das + CGI-Skript <code>SERVER_NAME</code> jedoch lediglich dazu verwendet, + selbstreferenzierende URLs zu erstellen, sollte das gerade noch + in Ordnung sein.</p> + </div> + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a>-<a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Bestimmt, wie der Server seinen eigenen Namen und Port +ermittelt</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Voreinstellung:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration, Virtual Host, Verzeichnis</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p>In vielen Situationen muss der Apache eine + <em>selbstreferenzierende</em> URL zusammenbauen, d.h. eine URL, die auf + den selben Server zurück verweist. Wenn der Apache für die + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>-Direktive den Port + bestimmt, wird mit <code>UseCanonicalPhysicalPort On</code> die + tatsächlich für die Anfrage verwendete physische Portnummer + in Betracht gezogen. Mit <code>UseCanonicalPhysicalPort Off</code> + verläßt sich der Apache nur auf die Konfiguration, um eine + gültige Portnummer zu bestimmen und läßt die + physische Portnummer außer acht.</p> + + <div class="note"><h3>Hinweis</h3> + <p>Wenn der physische Port verwendet wird, ist die Reihenfolge wie + folgt:<br /><br /> + <code>UseCanonicalName On</code></p> + <ul> + <li>Der in <code>Servername</code> angegebene Port</li> + <li>Der physische Port</li> + <li>Der Standardport</li> + </ul> + <code>UseCanonicalName Off | DNS</code> + <ul> + <li>Der Port, der aus dem <code>Host:</code>-Header gewonnen wurde</li> + <li>Der physische Port</li> + <li>Der in <code>Servername</code> angegebene Port</li> + <li>Der Standardport</li> + </ul> + + <p>Bei <code>UseCanonicalPhysicalPort Off</code> werden die physischen + Ports aus der Suchreihe entfernt.</p> + </div> + + +<h3>Siehe auch</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a>-<a name="virtualhost" id="virtualhost">Direktive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Beschreibung:</a></th><td>Enthält Direktiven, die nur auf bestimmte Hostnamen oder +IP-Adressen angewendet werden</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><VirtualHost + <var>Adresse</var>[:<var>Port</var>] [<var>Adresse</var>[:<var>Port</var>]] + ...> ... </VirtualHost></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Kontext:</a></th><td>Serverkonfiguration</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Modul:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><VirtualHost></code> und + <code></VirtualHost></code> werden dazu verwendet, eine Gruppe + von Direktiven zusammenzufassen, die nur auf einen bestimmten virtuellen + Host angewendet werden. Jede Direktive, die im Virtual-Host-Kontext + zulässig ist, kann verwendet werden. Wenn der Server eine Anfrage + für ein bestimmtes Dokument eines bestimmten virtuellen Hosts + empfängt, dann benutzt er die im + <code class="directive"><VirtualHost></code>-Container enthaltenen + Konfigurationsanweisungen. <var>Adresse</var> kann sein:</p> + + <ul> + <li>Die IP-Adresse des virtuellen Hosts.</li> + + <li>Ein voll qualifizierter Domainname für die IP-Adresse des + virtuellen Hosts.</li> + + <li>Das Zeichen <code>*</code>, welches nur in Kombination mit + <code>NameVirtualHost *</code> verwendet wird, um allen IP-Adressen + zu entsprechen.</li> + + <li>Die Zeichenkette <code>_default_</code>, die nur mit IP-basierten + virtuellen Hosts verwendet wird, um nicht zugewiesene IP-Adressen + aufzufangen.</li> + </ul> + + <div class="example"><h3>Beispiel</h3><p><code> + <VirtualHost 10.1.2.3><br /> + <span class="indent"> + ServerAdmin webmaster@host.foo.com<br /> + DocumentRoot /www/docs/host.foo.com<br /> + ServerName host.foo.com<br /> + ErrorLog logs/host.foo.com-error_log<br /> + TransferLog logs/host.foo.com-access_log<br /> + </span> + </VirtualHost> + </code></p></div> + + <p>IPv6-Adressen müssen in eckigen Klammern angegeben werden, da die + optionale Portnummer sonst nicht erkannt werden kann. Hier ein + IPv6-Beispiel:</p> + + <div class="example"><p><code> + <VirtualHost [2001:db8::a00:20ff:fea7:ccea]><br /> + <span class="indent"> + ServerAdmin webmaster@host.example.com<br /> + DocumentRoot /www/docs/host.example.com<br /> + ServerName host.example.com<br /> + ErrorLog logs/host.example.com-error_log<br /> + TransferLog logs/host.example.com-access_log<br /> + </span> + </VirtualHost> + </code></p></div> + + <p>Jeder virtuelle Host muss einer anderen IP-Adresse, einem anderen Port + oder einem anderen Hostnamen für den Server entsprechen. Im ersten + Fall muss die Servermaschine so eingerichtet sein, dass sie IP-Pakete + für mehrere Adressen akzeptiert. (Wenn der Rechner nicht mehrere + Netzwerkkarten besitzt, kann dies mit dem Befehl <code>ifconfig + alias</code> durchgeführt werden -- sofern Ihr Betriebssystem das + unterstützt).</p> + + <div class="note"><h3>Anmerkung</h3> + <p>Die Verwendung von <code class="directive"><VirtualHost></code> + beeinflusst <strong>nicht</strong>, an welchen Adressen der Apache + lauscht. Sie müssen mit <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> sicherstellen, dass der Apache + an der richtigen Adresse lauscht.</p> + </div> + + <p>Bei der Verwendung IP-basierter virtuellen Hosts kann der spezielle + Name <code>_default_</code> benutzt werden. In diesem Fall weist + der Apache jede IP-Adresse diesem virtuellen Host zu, die nicht explizit in + einem anderen virtuellen Host angegeben ist. Falls kein virtueller Host + <code>_default_</code> angegeben ist, wird die "Hauptserver"-Konfiguration, + die aus allen Definitionen außerhalb der Virtual-Host-Abschnitte + besteht, für nicht passende IPs verwendet. (Beachten Sie jedoch, + dass eine IP-Adressen die zu einer <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code>-Anweisung passt, weder den + "Hauptserver" noch den virtuellen Host <code>_default_</code> verwendet. + Lesen Sie für weitere Details die Dokumentation zu <a href="../vhosts/name-based.html">namensbasierten virtuell Hosts</a>.)</p> + + <p>Sie können einen speziellen <code>:Port</code> angeben, + um den entsprechenden Port zu wechseln. Falls nicht angegeben, wird + er auf den gleichen Port voreingestellt, wie die letzte + <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>-Anweisung des + Hauptservers. Sie können auch <code>:*</code> angeben, um alle + Ports dieser Adresse zu akzeptieren. (Dies wird zusammen mit + <code>_default_</code> empfohlen.)</p> + + <div class="warning"><h3>Sicherheit</h3> + <p>Lesen Sie das Dokument <a href="../misc/security_tips.html">Sicherheitshinweise</a> für + Details, warum Ihre Sicherheit gefährdet sein kann, wenn das + Verzeichnis, in dem Protokolldateien gespeichert werden, für + jemanden anderes als den Benutzer beschreibbar ist, der den Server + gestartet hat.</p> + </div> + +<h3>Siehe auch</h3> +<ul> +<li><a href="../vhosts/">Apache-Dokumentation zu virtuellen + Hosts</a></li> +<li><a href="../dns-caveats.html">Probleme bezüglich DNS und + Apache</a></li> +<li><a href="../bind.html">Bestimmen, welche Adressen und Ports + der Apache verwendet</a></li> +<li><a href="../sections.html">Wie die Abschnitte <Directory>, + <Location> und <Files> arbeiten</a> für eine + Erläuterung, wie diese verschiedenen Abschnitte miteinander + kombiniert werden, wenn eine Anfrage empfangen wird</li> +</ul> +</div> +</div> +<div class="bottomlang"> +<p><span>Verfügbare Sprachen: </span><a href="../de/mod/core.html" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Kommentare</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/core.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Lizenziert unter der <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en new file mode 100644 index 0000000..457edbf --- /dev/null +++ b/docs/manual/mod/core.html.en @@ -0,0 +1,5288 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>core - Apache HTTP Server Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Modules</a></div> +<div id="page-content"> +<div id="preamble"><h1>Apache Core Features</h1> +<div class="toplang"> +<p><span>Available Languages: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are always +available</td></tr> +<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">Directives</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgivar">CGIVar</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxpipelined">FlushMaxPipelined</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxthreshold">FlushMaxThreshold</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#httpprotocoloptions">HttpProtocolOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#if"><If></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdirective"><IfDirective></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#iffile"><IfFile></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifsection"><IfSection></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergeslashes">MergeSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocols">Protocols</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocolshonororder">ProtocolsHonorOrder</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#qualifyredirecturl">QualifyRedirectURL</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#readbuffersize">ReadBufferSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#regexdefaultoptions">RegexDefaultOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#stricthostcheck">StrictHostCheck</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li> +</ul> +<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=core">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=core">Report a bug</a></li></ul><h3>See also</h3> +<ul class="seealso"> +<li><a href="#comments_section">Comments</a></li></ul></div> + +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures optimizations for a Protocol's Listener Sockets</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive enables operating system specific optimizations for a + listening socket by the <code class="directive">Protocol</code> type. + The basic premise is for the kernel to not send a socket to the server + process until either data is received or an entire HTTP Request is buffered. + Only <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9"> + FreeBSD's Accept Filters</a>, Linux's more primitive + <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx() + are currently supported.</p> + + <p>Using <code>none</code> for an argument will disable any accept filters + for that protocol. This is useful for protocols that require a server + send data first, such as <code>ftp:</code> or <code>nntp</code>:</p> + <pre class="prettyprint lang-config">AcceptFilter nntp none</pre> + + + <p>The default protocol names are <code>https</code> for port 443 + and <code>http</code> for all other ports. To specify that another + protocol is being used with a listening port, add the <var>protocol</var> + argument to the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> + directive.</p> + + <p>The default values on FreeBSD are:</p> + <pre class="prettyprint lang-config">AcceptFilter http httpready +AcceptFilter https dataready</pre> + + + <p>The <code>httpready</code> accept filter buffers entire HTTP requests at + the kernel level. Once an entire request is received, the kernel then + sends it to the server. See the + <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9"> + accf_http(9)</a> man page for more details. Since HTTPS requests are + encrypted, only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9"> + accf_data(9)</a> filter is used.</p> + + <p>The default values on Linux are:</p> + <pre class="prettyprint lang-config">AcceptFilter http data +AcceptFilter https data</pre> + + + <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http + requests. Any value besides <code>none</code> will enable + <code>TCP_DEFER_ACCEPT</code> on that listener. For more details + see the Linux + <a href="http://man7.org/linux/man-pages/man7/tcp.7.html"> + tcp(7)</a> man page.</p> + + <p>The default values on Windows are:</p> + <pre class="prettyprint lang-config">AcceptFilter http connect +AcceptFilter https connect</pre> + + + <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx() + API, and does not support http protocol buffering. <code>connect</code> + will use the AcceptEx() API, also retrieve the network endpoint + addresses, but like <code>none</code> the <code>connect</code> option + does not wait for the initial data transmission.</p> + + <p>On Windows, <code>none</code> uses accept() rather than AcceptEx() + and will not recycle sockets between connections. This is useful for + network adapters with broken driver support, as well as some virtual + network providers such as vpn drivers, or spam, virus or spyware + filters.</p> + + <div class="warning"> + <h3>The <code>data</code> AcceptFilter (Windows)</h3> + + <p>For versions 2.4.23 and prior, the Windows <code>data</code> accept + filter waited until data had been transmitted and the initial data + buffer and network endpoint addresses had been retrieved from the + single AcceptEx() invocation. This implementation was subject to a + denial of service attack and has been disabled.</p> + + <p>Current releases of httpd default to the <code>connect</code> filter + on Windows, and will fall back to <code>connect</code> if + <code>data</code> is specified. Users of prior releases are encouraged + to add an explicit setting of <code>connect</code> for their + AcceptFilter, as shown above.</p> + </div> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#protocol">Protocol</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Resources accept trailing pathname information</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + + <p>This directive controls whether requests that contain trailing + pathname information that follows an actual filename (or + non-existent file in an existing directory) will be accepted or + rejected. The trailing pathname information can be made + available to scripts in the <code>PATH_INFO</code> environment + variable.</p> + + <p>For example, assume the location <code>/test/</code> points to + a directory that contains only the single file + <code>here.html</code>. Then requests for + <code>/test/here.html/more</code> and + <code>/test/nothere.html/more</code> both collect + <code>/more</code> as <code>PATH_INFO</code>.</p> + + <p>The three possible arguments for the + <code class="directive">AcceptPathInfo</code> directive are:</p> + <dl> + <dt><code>Off</code></dt><dd>A request will only be accepted if it + maps to a literal path that exists. Therefore a request with + trailing pathname information after the true filename such as + <code>/test/here.html/more</code> in the above example will return + a 404 NOT FOUND error.</dd> + + <dt><code>On</code></dt><dd>A request will be accepted if a + leading path component maps to a file that exists. The above + example <code>/test/here.html/more</code> will be accepted if + <code>/test/here.html</code> maps to a valid file.</dd> + + <dt><code>Default</code></dt><dd>The treatment of requests with + trailing pathname information is determined by the <a href="../handler.html">handler</a> responsible for the request. + The core handler for normal files defaults to rejecting + <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 + <code>PATH_INFO</code> by default.</dd> + </dl> + + <p>The primary purpose of the <code>AcceptPathInfo</code> + directive is to allow you to override the handler's choice of + accepting or rejecting <code>PATH_INFO</code>. This override is required, + for example, when you use a <a href="../filter.html">filter</a>, such + as <a href="mod_include.html">INCLUDES</a>, to generate content + based on <code>PATH_INFO</code>. The core handler would usually reject + the request, so you can use the following configuration to enable + such a script:</p> + + <pre class="prettyprint lang-config"><Files "mypaths.shtml"> + Options +Includes + SetOutputFilter INCLUDES + AcceptPathInfo On +</Files></pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the distributed configuration file</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AccessFileName .htaccess</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>While processing a request, the server looks for + the first existing configuration file from this list of names in + every directory of the path to the document, if distributed + configuration files are <a href="#allowoverride">enabled for that + directory</a>. For example:</p> + + <pre class="prettyprint lang-config">AccessFileName .acl</pre> + + + <p>Before returning the document + <code>/usr/local/web/index.html</code>, the server will read + <code>/.acl</code>, <code>/usr/.acl</code>, + <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code> + for directives unless they have been disabled with:</p> + + <pre class="prettyprint lang-config"><Directory "/"> + AllowOverride None +</Directory></pre> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Configuration Files</a></li> +<li><a href="../howto/htaccess.html">.htaccess Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default charset parameter to be added when a response +content-type is <code>text/plain</code> or <code>text/html</code></td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AddDefaultCharset Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive specifies a default value for the media type + charset parameter (the name of a character encoding) to be added + to a response if and only if the response's content-type is either + <code>text/plain</code> or <code>text/html</code>. This should override + any charset specified in the body of the response via a <code>META</code> + element, though the exact behavior is often dependent on the user's client + configuration. A setting of <code>AddDefaultCharset Off</code> + disables this functionality. <code>AddDefaultCharset On</code> enables + a default charset of <code>iso-8859-1</code>. Any other value is assumed + to be the <var>charset</var> to be used, which should be one of the + <a href="http://www.iana.org/assignments/character-sets">IANA registered + charset values</a> for use in Internet media types (MIME types). + For example:</p> + + <pre class="prettyprint lang-config">AddDefaultCharset utf-8</pre> + + + <p><code class="directive">AddDefaultCharset</code> should only be used when all + of the text resources to which it applies are known to be in that + character encoding and it is too inconvenient to label their charset + individually. One such example is to add the charset parameter + to resources containing generated content, such as legacy CGI + scripts, that might be vulnerable to cross-site scripting attacks + due to user-provided data being included in the output. Note, however, + that a better solution is to just fix (or delete) those scripts, since + setting a default charset does not protect users that have enabled + the "auto-detect character encoding" feature on their browser.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to +be passed through</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off|NoDecode</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td> +NoDecode option available in 2.3.12 and later.</td></tr> +</table> + <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs + which contain encoded path separators (<code>%2F</code> for <code>/</code> + and additionally <code>%5C</code> for <code>\</code> on accordant systems) + to be used in the path info.</p> + + <p>With the default value, <code>Off</code>, such URLs are refused + with a 404 (Not found) error.</p> + + <p>With the value <code>On</code>, such URLs are accepted, and encoded + slashes are decoded like all other encoded characters.</p> + + <p>With the value <code>NoDecode</code>, such URLs are accepted, but + encoded slashes are not decoded but left in their encoded state.</p> + + <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is + mostly useful when used in conjunction with <code>PATH_INFO</code>.</p> + + <div class="note"><h3>Note</h3> + <p>If encoded slashes are needed in path info, use of <code>NoDecode</code> is + strongly recommended as a security measure. Allowing slashes + to be decoded could potentially allow unsafe paths.</p> + </div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in +<code>.htaccess</code> files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var> +[<var>directive-type</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>When the server finds an <code>.htaccess</code> file (as + specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>), + it needs to know which directives declared in that file can override + earlier configuration directives.</p> + + <div class="note"><h3>Only available in <Directory> sections</h3> + <code class="directive">AllowOverride</code> is valid only in + <code class="directive"><a href="#directory"><Directory></a></code> + sections specified without regular expressions, not in <code class="directive"><a href="#location"><Location></a></code>, <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> or + <code class="directive"><a href="#files"><Files></a></code> sections. + </div> + + <p>When this directive is set to <code>None</code> and <code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code> is set to + <code>None</code>, <a href="#accessfilename">.htaccess</a> files are + completely ignored. In this case, the server will not even attempt + to read <code>.htaccess</code> files in the filesystem.</p> + + <p>When this directive is set to <code>All</code>, then any + directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in + <code>.htaccess</code> files.</p> + + <p>The <var>directive-type</var> can be one of the following + groupings of directives. (See the <a href="overrides.html">override class + index</a> for an up-to-date listing of which directives are enabled by each + <var>directive-type</var>.)</p> + + <dl> + <dt><a href="overrides.html#override-authconfig">AuthConfig</a></dt> + + <dd> + + Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_authz_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>, + <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>, + <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> + + <dt><a href="overrides.html#override-fileinfo">FileInfo</a></dt> + + <dd> + Allow use of the directives controlling document types + (<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>, + <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 + <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives), + document meta data (<code class="directive"><a href="../mod/mod_headers.html#header">Header</a></code>, <code class="directive"><a href="../mod/mod_headers.html#requestheader">RequestHeader</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvif">SetEnvIf</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookieexpires">CookieExpires</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiedomain">CookieDomain</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiestyle">CookieStyle</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookietracking">CookieTracking</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiename">CookieName</a></code>), + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> directives (<code class="directive"><a href="../mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>), + <code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code> directives (<code class="directive"><a href="../mod/mod_alias.html#redirect">Redirect</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirecttemp">RedirectTemp</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirectpermanent">RedirectPermanent</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirectmatch">RedirectMatch</a></code>), and + <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> from + <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>. + </dd> + + <dt><a href="overrides.html#override-indexes">Indexes</a></dt> + + <dd> + Allow use of the directives controlling directory indexing + (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <a href="mod_autoindex.html#indexoptions.fancyindexing"><code>FancyIndexing</code></a>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code>, + <em>etc.</em>).</dd> + + <dt><a href="overrides.html#override-limit">Limit</a></dt> + + <dd> + Allow use of the directives controlling host access (<code class="directive"><a href="../mod/mod_access_compat.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_access_compat.html#deny">Deny</a></code> and <code class="directive"><a href="../mod/mod_access_compat.html#order">Order</a></code>).</dd> + + <dt>Nonfatal=[Override|Unknown|All]</dt> + + <dd> + Allow use of AllowOverride option to treat syntax errors in + .htaccess as nonfatal. Instead of causing an Internal Server + Error, disallowed or unrecognised directives will be ignored + and a warning logged: + <ul> + <li><strong>Nonfatal=Override</strong> treats directives + forbidden by AllowOverride as nonfatal.</li> + <li><strong>Nonfatal=Unknown</strong> treats unknown directives + as nonfatal. This covers typos and directives implemented + by a module that's not present.</li> + <li><strong>Nonfatal=All</strong> treats both the above as nonfatal.</li> + </ul> + <p>Note that a syntax error in a valid directive will still cause + an internal server error.</p> + <div class="warning"><h3>Security</h3> + Nonfatal errors may have security implications for .htaccess users. + For example, if AllowOverride disallows AuthConfig, users' + configuration designed to restrict access to a site will be disabled. + </div> + </dd> + + <dt><a href="overrides.html#override-options">Options</a>[=<var>Option</var>,...]</dt> + + <dd> + Allow use of the directives controlling specific directory + features (<code class="directive"><a href="#options">Options</a></code> and + <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>). + An equal sign may be given followed by a comma-separated list, without + spaces, of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command. + + <div class="note"><h3>Implicit disabling of Options</h3> + <p>Even though the list of options that may be used in .htaccess files + can be limited with this directive, as long as any <code class="directive"><a href="#options">Options</a></code> directive is allowed any + other inherited option can be disabled by using the non-relative + syntax. In other words, this mechanism cannot force a specific option + to remain <em>set</em> while allowing any others to be set. + </p></div> + + <div class="example"><p><code> + AllowOverride Options=Indexes,MultiViews + </code></p></div> + </dd> + </dl> + + <p>Example:</p> + + <pre class="prettyprint lang-config">AllowOverride AuthConfig Indexes</pre> + + + <p>In the example above, all directives that are neither in the group + <code>AuthConfig</code> nor <code>Indexes</code> cause an internal + server error.</p> + + <div class="note"><p>For security and performance reasons, do not set + <code>AllowOverride</code> to anything other than <code>None</code> + in your <code><Directory "/"></code> block. Instead, find (or + create) the <code><Directory></code> block that refers to the + directory where you're actually planning to place a + <code>.htaccess</code> file.</p> + </div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code></li> +<li><a href="../configuring.html">Configuration Files</a></li> +<li><a href="../howto/htaccess.html">.htaccess Files</a></li> +<li><a href="overrides.html">Override Class Index for .htaccess</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Individual directives that are allowed in +<code>.htaccess</code> files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverrideList None|<var>directive</var> +[<var>directive-type</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverrideList None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>When the server finds an <code>.htaccess</code> file (as + specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>), + it needs to know which directives declared in that file can override + earlier configuration directives.</p> + + <div class="note"><h3>Only available in <Directory> sections</h3> + <code class="directive">AllowOverrideList</code> is valid only in + <code class="directive"><a href="#directory"><Directory></a></code> + sections specified without regular expressions, not in <code class="directive"><a href="#location"><Location></a></code>, <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> or + <code class="directive"><a href="#files"><Files></a></code> sections. + </div> + + <p>When this directive is set to <code>None</code> and <code class="directive"><a href="#allowoverride">AllowOverride</a></code> is set to <code>None</code>, + then <a href="#accessfilename">.htaccess</a> files are completely + ignored. In this case, the server will not even attempt to read + <code>.htaccess</code> files in the filesystem.</p> + + <p>Example:</p> + + <pre class="prettyprint lang-config">AllowOverride None +AllowOverrideList Redirect RedirectMatch</pre> + + + <p>In the example above, only the <code>Redirect</code> and + <code>RedirectMatch</code> directives are allowed. All others will + cause an internal server error.</p> + + <p>Example:</p> + + <pre class="prettyprint lang-config">AllowOverride AuthConfig +AllowOverrideList CookieTracking CookieName</pre> + + + <p>In the example above, <code class="directive"><a href="#allowoverride">AllowOverride</a></code> + grants permission to the <code>AuthConfig</code> + directive grouping and <code class="directive">AllowOverrideList</code> grants + permission to only two directives from the <code>FileInfo</code> directive + grouping. All others will cause an internal server error.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Configuration Files</a></li> +<li><a href="../howto/htaccess.html">.htaccess Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI +scripts</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>NetWare only</td></tr> +</table> + <p>This directive is used to control how Apache httpd finds the + interpreter used to run CGI scripts. For example, setting + <code>CGIMapExtension sys:\foo.nlm .foo</code> will + cause all CGI script files with a <code>.foo</code> extension to + be passed to the FOO interpreter.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a> <a name="cgipassauth" id="cgipassauth">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables passing HTTP authorization headers to scripts as CGI +variables</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIPassAuth On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CGIPassAuth Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.4.13 and later</td></tr> +</table> + <p><code class="directive">CGIPassAuth</code> allows scripts access to HTTP + authorization headers such as <code>Authorization</code>, which is + required for scripts that implement HTTP Basic authentication. + Normally these HTTP headers are hidden from scripts. This is to disallow + scripts from seeing user ids and passwords used to access the server when + HTTP Basic authentication is enabled in the web server. This directive + should be used when scripts are allowed to implement HTTP Basic + authentication.</p> + + <p>This directive can be used instead of the compile-time setting + <code>SECURITY_HOLE_PASS_AUTHORIZATION</code> which has been available + in previous versions of Apache HTTP Server.</p> + + <p>The setting is respected by any modules which use + <code>ap_add_common_vars()</code>, such as <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, + <code class="module"><a href="../mod/mod_cgid.html">mod_cgid</a></code>, <code class="module"><a href="../mod/mod_proxy_fcgi.html">mod_proxy_fcgi</a></code>, + <code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code>, and so on. Notably, it affects + modules which don't handle the request in the usual sense but + still use this API; examples of this are <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + and <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>. Third-party modules that don't + use <code>ap_add_common_vars()</code> may choose to respect the setting + as well.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIVar" id="CGIVar">CGIVar</a> <a name="cgivar" id="cgivar">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls how some CGI variables are set</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIVar <var>variable</var> <var>rule</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.4.21 and later</td></tr> +</table> + <p>This directive controls how some CGI variables are set.</p> + + <p><strong>REQUEST_URI</strong> rules:</p> + <dl> + <dt><code>original-uri</code> (default)</dt> + <dd>The value is taken from the original request line, and will not + reflect internal redirects or subrequests which change the requested + resource.</dd> + <dt><code>current-uri</code></dt> + <dd>The value reflects the resource currently being processed, + which may be different than the original request from the client + due to internal redirects or subrequests.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response +headers</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive enables the generation of + <code>Content-MD5</code> headers as defined in RFC1864 + respectively RFC2616.</p> + + <p>MD5 is an algorithm for computing a "message digest" + (sometimes called "fingerprint") of arbitrary-length data, with + a high degree of confidence that any alterations in the data + will be reflected in alterations in the message digest.</p> + + <p>The <code>Content-MD5</code> header provides an end-to-end + message integrity check (MIC) of the entity-body. A proxy or + client may check this header for detecting accidental + modification of the entity-body in transit. Example header:</p> + + <div class="example"><p><code> + Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== + </code></p></div> + + <p>Note that this can cause performance problems on your server + since the message digest is computed on every request (the + values are not cached).</p> + + <p><code>Content-MD5</code> is only sent for documents served + by the <code class="module"><a href="../mod/core.html">core</a></code>, and not by any module. For example, + SSI documents, output from CGI scripts, and byte range responses + do not have this header.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server run-time files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.4.2 and later</td></tr> +</table> + <p>The <code class="directive">DefaultRuntimeDir</code> directive sets the + directory in which the server will create various run-time files + (shared memory, locks, etc.). If set as a relative path, the full path + will be relative to <code class="directive">ServerRoot</code>.</p> + + <p><strong>Example</strong></p> + <pre class="prettyprint lang-config">DefaultRuntimeDir scratch/</pre> + + + <p>The default location of <code class="directive">DefaultRuntimeDir</code> may be + modified by changing the <code>DEFAULT_REL_RUNTIMEDIR</code> #define + at build time.</p> + + <p>Note: <code class="directive">ServerRoot</code> should be specified before this + directive is used. Otherwise, the default value of <code class="directive">ServerRoot</code> + would be used to set the base directory.</p> + + +<h3>See also</h3> +<ul> +<li><a href="../misc/security_tips.html#serverroot">the + security tips</a> for information on how to properly set + permissions on the <code class="directive">ServerRoot</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>This directive has no effect other than to emit warnings +if the value is not <code>none</code>. In prior versions, DefaultType +would specify a default media type to assign to response content for +which no other media type configuration could be found. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The argument <code>none</code> is available in Apache httpd 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.</td></tr> +</table> + <p>This directive has been disabled. For backwards compatibility + of configuration files, it may be specified with the value + <code>none</code>, meaning no default media type. For example:</p> + + <pre class="prettyprint lang-config">DefaultType None</pre> + + + <p><code>DefaultType None</code> is only available in + httpd-2.2.7 and later.</p> + + <p>Use the mime.types configuration file and the + <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> to configure media + type assignments via file extensions, or the + <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure + the media type for specific resources. Otherwise, the server will + send the response without a Content-Type header field and the + recipient may attempt to guess the media type.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define a variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>parameter-name</var> [<var>parameter-value</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>In its one parameter form, <code class="directive">Define</code> is + equivalent to passing the <code>-D</code> argument to + <code class="program"><a href="../programs/httpd.html">httpd</a></code>. It can be used to toggle the use of + <code class="directive"><a href="#ifdefine"><IfDefine></a></code> + sections without needing to alter <code>-D</code> arguments in any + startup scripts.</p> + + <p>In addition to that, if the second parameter is given, a config variable + is set to this value. The variable can be used in the configuration using + the <code>${VAR}</code> syntax. The variable is always globally defined + and not limited to the scope of the surrounding config section.</p> + + <pre class="prettyprint lang-config"><IfDefine TEST> + Define servername test.example.com +</IfDefine> +<IfDefine !TEST> + Define servername www.example.com + Define SSL +</IfDefine> + +DocumentRoot "/var/www/${servername}/htdocs"</pre> + + + <p>Variable names may not contain colon ":" characters, to avoid clashes + with <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>'s syntax.</p> + + <div class="note"><h3>Virtual Host scope and pitfalls</h3> + <p>While this directive is supported in virtual host context, + the changes it makes are visible to any later configuration + directives, beyond any enclosing virtual host.</p> + </div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#undefine">UnDefine</a></code></li> +<li><code class="directive"><a href="#ifdefine">IfDefine</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to the +named file-system directory, sub-directories, and their contents.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Directory <var>directory-path</var>> +... </Directory></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><Directory></code> and + <code></Directory></code> are used to enclose a group of + directives that will apply only to the named directory, + sub-directories of that directory, and the files within the respective + directories. Any directive that is allowed + in a directory context may be used. <var>Directory-path</var> is + either the full path to a directory, or a wild-card string using + Unix shell-style matching. In a wild-card string, <code>?</code> matches + any single character, and <code>*</code> matches any sequences of + characters. You may also use <code>[]</code> character ranges. None + of the wildcards match a `/' character, so <code><Directory + "/*/public_html"></code> will not match + <code>/home/user/public_html</code>, but <code><Directory + "/home/*/public_html"></code> will match. Example:</p> + + <pre class="prettyprint lang-config"><Directory "/usr/local/httpd/htdocs"> + Options Indexes FollowSymLinks +</Directory></pre> + + + <p>Directory paths <em>may</em> be quoted, if you like, however, it + <em>must</em> be quoted if the path contains spaces. This is because a + space would otherwise indicate the end of an argument.</p> + + <div class="note"> + <p>Be careful with the <var>directory-path</var> arguments: + They have to literally match the filesystem path which Apache httpd uses + to access the files. Directives applied to a particular + <code><Directory></code> will not apply to files accessed from + that same directory via a different path, such as via different symbolic + links.</p> + </div> + + <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular + expressions</a> can also be used, with the addition of the + <code>~</code> character. For example:</p> + + <pre class="prettyprint lang-config"><Directory ~ "^/www/[0-9]{3}"> + +</Directory></pre> + + + <p>would match directories in <code>/www/</code> that consisted of + three numbers.</p> + + <p>If multiple (non-regular expression) <code class="directive"><Directory></code> sections + match the directory (or one of its parents) containing a document, + then the directives are applied in the order of shortest match + first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example, + with</p> + + <pre class="prettyprint lang-config"><Directory "/"> + AllowOverride None +</Directory> + +<Directory "/home"> + AllowOverride FileInfo +</Directory></pre> + + + <p>for access to the document <code>/home/web/dir/doc.html</code> + the steps are:</p> + + <ul> + <li>Apply directive <code>AllowOverride None</code> + (disabling <code>.htaccess</code> files).</li> + + <li>Apply directive <code>AllowOverride FileInfo</code> (for + directory <code>/home</code>).</li> + + <li>Apply any <code>FileInfo</code> directives in + <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and + <code>/home/web/dir/.htaccess</code> in that order.</li> + </ul> + + <p>Regular expressions are not considered until after all of the + normal sections have been applied. Then all of the regular + expressions are tested in the order they appeared in the + configuration file. For example, with</p> + + <pre class="prettyprint lang-config"><Directory ~ "abc$"> + # ... directives here ... +</Directory></pre> + + + <p>the regular expression section won't be considered until after + all normal <code class="directive"><Directory></code>s and + <code>.htaccess</code> files have been applied. Then the regular + expression will match on <code>/home/abc/public_html/abc</code> and + the corresponding <code class="directive"><Directory></code> will + be applied.</p> + + <p><strong>Note that the default access for + <code><Directory "/"></code> is to permit all access. + This means that Apache httpd will serve any file mapped from an URL. It is + recommended that you change this with a block such + as</strong></p> + + <pre class="prettyprint lang-config"><Directory "/"> + Require all denied +</Directory></pre> + + + <p><strong>and then override this for directories you + <em>want</em> accessible. See the <a href="../misc/security_tips.html">Security Tips</a> page for more + details.</strong></p> + + <p>The directory sections occur in the <code>httpd.conf</code> file. + <code class="directive"><Directory></code> directives + cannot nest, and cannot appear in a <code class="directive"><a href="#limit"><Limit></a></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section.</p> + +<h3>See also</h3> +<ul> +<li><a href="../sections.html">How <Directory>, + <Location> and <Files> sections work</a> for an + explanation of how these different sections are combined when a + request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to +the contents of file-system directories matching a regular expression.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><DirectoryMatch <var>regex</var>> +... </DirectoryMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><DirectoryMatch></code> and + <code></DirectoryMatch></code> are used to enclose a group + of directives which will apply only to the named directory (and the files within), + the same as <code class="directive"><a href="#directory"><Directory></a></code>. + However, it takes as an argument a + <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>. For example:</p> + + <pre class="prettyprint lang-config"><DirectoryMatch "^/www/(.+/)?[0-9]{3}/"> + # ... +</DirectoryMatch></pre> + + + <p>matches directories in <code>/www/</code> (or any subdirectory thereof) + that consist of three numbers.</p> + + <div class="note"><h3>Compatibility</h3> + Prior to 2.3.9, this directive implicitly applied to sub-directories + (like <code class="directive"><a href="#directory"><Directory></a></code>) and + could not match the end of line symbol ($). In 2.3.9 and later, + only directories that match the expression are affected by the enclosed + directives. + </div> + + <div class="note"><h3>Trailing Slash</h3> + This directive applies to requests for directories that may or may + not end in a trailing slash, so expressions that are anchored to the + end of line ($) must be written with care. + </div> + + <p>From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of paths to be referenced + from within <a href="../expr.html">expressions</a> and modules like + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.</p> + + <pre class="prettyprint lang-config"><DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</DirectoryMatch></pre> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#directory"><Directory></a></code> for +a description of how regular expressions are mixed in with normal +<code class="directive"><Directory></code>s</li> +<li><a href="../sections.html">How <Directory>, <Location> and +<Files> sections work</a> for an explanation of how these different +sections are combined when a request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible +from the web</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot "/usr/local/apache/htdocs"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive sets the directory from which <code class="program"><a href="../programs/httpd.html">httpd</a></code> + 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 + path from the requested URL to the document root to make the + path to the document. Example:</p> + + <pre class="prettyprint lang-config">DocumentRoot "/usr/web"</pre> + + + <p>then an access to + <code>http://my.example.com/index.html</code> refers to + <code>/usr/web/index.html</code>. If the <var>directory-path</var> is + not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p> + + <p>The <code class="directive">DocumentRoot</code> should be specified without + a trailing slash.</p> + +<h3>See also</h3> +<ul> +<li><a href="../urlmapping.html#documentroot">Mapping URLs to Filesystem +Locations</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Else" id="Else"><Else></a> <a name="else" id="else">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if the condition of a +previous <code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><a href="#elseif"><ElseIf></a></code> section is not +satisfied by a request at runtime</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Else> ... </Else></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table> + <p>The <code class="directive"><Else></code> applies the enclosed + directives if and only if the most recent + <code class="directive"><If></code> or + <code class="directive"><ElseIf></code> section + in the same scope has not been applied. + For example: In </p> + + <pre class="prettyprint lang-config"><If "-z req('Host')"> + # ... +</If> +<Else> + # ... +</Else></pre> + + + <p> The <code class="directive"><If></code> would match HTTP/1.0 + requests without a <var>Host:</var> header and the + <code class="directive"><Else></code> would match requests + with a <var>Host:</var> header.</p> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ElseIf" id="ElseIf"><ElseIf></a> <a name="elseif" id="elseif">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is satisfied +by a request at runtime while the condition of a previous +<code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><ElseIf></code> section is not +satisfied</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table> + <p>The <code class="directive"><ElseIf></code> applies the enclosed + directives if and only if both the given condition evaluates to true and + the most recent <code class="directive"><If></code> or + <code class="directive"><ElseIf></code> section in the same scope has + not been applied. For example: In </p> + + <pre class="prettyprint lang-config"><If "-R '10.1.0.0/16'"> + #... +</If> +<ElseIf "-R '10.0.0.0/8'"> + #... +</ElseIf> +<Else> + #... +</Else></pre> + + + <p>The <code class="directive"><ElseIf></code> would match if + the remote address of a request belongs to the subnet 10.0.0.0/8 but + not to the subnet 10.1.0.0/16.</p> + + +<h3>See also</h3> +<ul> +<li><a href="../expr.html">Expressions in Apache HTTP Server</a>, +for a complete reference and more examples.</li> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableMMAP On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive controls whether the <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use + memory-mapping if it needs to read the contents of a file during + delivery. By default, when the handling of a request requires + access to the data within a file -- for example, when delivering a + server-parsed file using <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache httpd + memory-maps the file if the OS supports it.</p> + + <p>This memory-mapping sometimes yields a performance improvement. + But in some environments, it is better to disable the memory-mapping + to prevent operational problems:</p> + + <ul> + <li>On some multiprocessor systems, memory-mapping can reduce the + performance of the <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</li> + <li>Deleting or truncating a file while <code class="program"><a href="../programs/httpd.html">httpd</a></code> + has it memory-mapped can cause <code class="program"><a href="../programs/httpd.html">httpd</a></code> to + crash with a segmentation fault. + </li> + </ul> + + <p>For server configurations that are vulnerable to these problems, + you should disable memory-mapping of delivered files by specifying:</p> + + <pre class="prettyprint lang-config">EnableMMAP Off</pre> + + + <p>For NFS mounted files, this feature may be disabled explicitly for + the offending files by specifying:</p> + + <pre class="prettyprint lang-config"><Directory "/path-to-nfs-files"> + EnableMMAP Off +</Directory></pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2> +<table class="directive"> +<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> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Default changed to Off in +version 2.3.9.</td></tr> +</table> + <p>This directive controls whether <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use the + sendfile support from the kernel to transmit file contents to the client. + By default, when the handling of a request requires no access + to the data within a file -- for example, when delivering a + static file -- Apache httpd uses sendfile to deliver the file contents + without ever reading the file if the OS supports it.</p> + + <p>This sendfile mechanism avoids separate read and send operations, + and buffer allocations. But on some platforms or within some + filesystems, it is better to disable this feature to avoid + operational problems:</p> + + <ul> + <li>Some platforms may have broken sendfile support that the build + system did not detect, especially if the binaries were built on + another box and moved to such a machine with broken sendfile + support.</li> + <li>On Linux the use of sendfile triggers TCP-checksum + offloading bugs on certain networking cards when using IPv6.</li> + <li>On Linux on Itanium, <code>sendfile</code> may be unable to handle + files over 2GB in size.</li> + <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS, SMB, CIFS, FUSE), + the kernel may be unable to serve the network file through + its own cache.</li> + </ul> + + <p>For server configurations that are not vulnerable to these problems, + you may enable this feature by specifying:</p> + + <pre class="prettyprint lang-config">EnableSendfile On</pre> + + + <p>For network mounted files, this feature may be disabled explicitly + for the offending files by specifying:</p> + + <pre class="prettyprint lang-config"><Directory "/path-to-nfs-files"> + EnableSendfile Off +</Directory></pre> + + <p>Please note that the per-directory and .htaccess configuration + of <code class="directive">EnableSendfile</code> is not supported by + <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code>. + Only global definition of <code class="directive">EnableSendfile</code> + is taken into account by the module. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Abort configuration parsing with a custom error message</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Error <var>message</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.3.9 and later</td></tr> +</table> + <p>If an error can be detected within the configuration, this + directive can be used to generate a custom error message, and halt + configuration parsing. The typical use is for reporting required + modules which are missing from the configuration.</p> + + <pre class="prettyprint lang-config"># Example +# ensure that mod_include is loaded +<IfModule !include_module> + Error "mod_include is required by mod_foo. Load it with LoadModule." +</IfModule> + +# ensure that exactly one of SSL,NOSSL is defined +<IfDefine SSL> +<IfDefine NOSSL> + Error "Both SSL and NOSSL are defined. Define only one of them." +</IfDefine> +</IfDefine> +<IfDefine !SSL> +<IfDefine !NOSSL> + Error "Either SSL or NOSSL must be defined." +</IfDefine> +</IfDefine></pre> + + + <div class="warning"><h3>Note</h3> + <p> This directive is evaluated and configuration processing time, + not at runtime. As a result, this directive cannot be conditonally + evaluated by enclosing it in an <code class="directive"><a href="#if"><If></a></code> section.</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>What the server will return to the client +in case of an error</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>In the event of a problem or error, Apache httpd can be configured + to do one of four things,</p> + + <ol> + <li>output a simple hardcoded error message</li> + + <li>output a customized message</li> + + <li>internally redirect to a local <var>URL-path</var> to handle the + problem/error</li> + + <li>redirect to an external <var>URL</var> to handle the + problem/error</li> + </ol> + + <p>The first option is the default, while options 2-4 are + configured using the <code class="directive">ErrorDocument</code> + directive, which is followed by the HTTP response code and a URL + or a message. Apache httpd will sometimes offer additional information + regarding the problem/error.</p> + + <p>From 2.4.13, <a href="../expr.html">expression syntax</a> can be + used inside the directive to produce dynamic strings and URLs.</p> + + <p>URLs can begin with a slash (/) for local web-paths (relative + to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a + full URL which the client can resolve. Alternatively, a message + can be provided to be displayed by the browser. Note that deciding + whether the parameter is an URL, a path or a message is performed + before any expression is parsed. Examples:</p> + + <pre class="prettyprint lang-config">ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi +ErrorDocument 404 /errors/bad_urls.php +ErrorDocument 401 /subscription_info.html +ErrorDocument 403 "Sorry, can't allow you access today" +ErrorDocument 403 Forbidden! +ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}}</pre> + + + <p>Additionally, the special value <code>default</code> can be used + to specify Apache httpd's simple hardcoded message. While not required + under normal circumstances, <code>default</code> will restore + Apache httpd's simple hardcoded message for configurations that would + otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p> + + <pre class="prettyprint lang-config">ErrorDocument 404 /cgi-bin/bad_urls.pl + +<Directory "/web/docs"> + ErrorDocument 404 default +</Directory></pre> + + + <p>Note that when you specify an <code class="directive">ErrorDocument</code> + that points to a remote URL (ie. anything with a method such as + <code>http</code> in front of it), Apache HTTP Server will send a redirect to the + client to tell it where to find the document, even if the + document ends up being on the same server. This has several + implications, the most important being that the client will not + receive the original error status code, but instead will + receive a redirect status code. This in turn can confuse web + robots and other clients which try to determine if a URL is + valid using the status code. In addition, if you use a remote + URL in an <code>ErrorDocument 401</code>, the client will not + know to prompt the user for a password since it will not + receive the 401 status code. Therefore, <strong>if you use an + <code>ErrorDocument 401</code> directive, then it must refer to a local + document.</strong></p> + + <p>Microsoft Internet Explorer (MSIE) will by default ignore + server-generated error messages when they are "too small" and substitute + its own "friendly" error messages. The size threshold varies depending on + the type of error, but in general, if you make your error document + greater than 512 bytes, then MSIE will show the server-generated + error rather than masking it. More information is available in + Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p> + + <p>Although most error messages can be overridden, there are certain + circumstances where the internal messages are used regardless of the + setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. In + particular, if a malformed request is detected, normal request processing + will be immediately halted and the internal error message returned. + This is necessary to guard against security problems caused by + bad requests.</p> + + <p>If you are using mod_proxy, you may wish to enable + <code class="directive"><a href="../mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide + custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride, + Apache httpd will not generate custom error documents for proxied content.</p> + +<h3>See also</h3> +<ul> +<li><a href="../custom-error.html">documentation of + customizable responses</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLog <var>file-path</var>|syslog[:[<var>facility</var>][:<var>tag</var>]]</code></td></tr> +<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> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ErrorLog</code> directive sets the name of + the file to which the server will log any errors it encounters. If + the <var>file-path</var> is not absolute then it is assumed to be + relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p> + + <pre class="prettyprint lang-config">ErrorLog "/var/log/httpd/error_log"</pre> + + + <p>If the <var>file-path</var> + begins with a pipe character "<code>|</code>" then it is assumed to be a + command to spawn to handle the error log.</p> + + <pre class="prettyprint lang-config">ErrorLog "|/usr/local/bin/httpd_errors"</pre> + + + <p>See the notes on <a href="../logs.html#piped">piped logs</a> for + more information.</p> + + <p>Using <code>syslog</code> instead of a filename enables logging + via syslogd(8) if the system supports it. The default is to use + syslog facility <code>local7</code>, but you can override this by + using the <code>syslog:<var>facility</var></code> syntax where + <var>facility</var> can be one of the names usually documented in + syslog(1). The facility is effectively global, and if it is changed + in individual virtual hosts, the final facility specified affects the + entire server. Same rules apply for the syslog tag, which by default + uses the Apache binary name, <code>httpd</code> in most cases. You can + also override this by using the <code>syslog::<var>tag</var></code> + syntax.</p> + + <pre class="prettyprint lang-config">ErrorLog syslog:user +ErrorLog syslog:user:httpd.srv1 +ErrorLog syslog::httpd.srv2</pre> + + + <p>SECURITY: See the <a href="../misc/security_tips.html#serverroot">security tips</a> + document for details on why your security could be compromised + if the directory where log files are stored is writable by + anyone other than the user that starts the server.</p> + <div class="warning"><h3>Note</h3> + <p>When entering a file path on non-Unix platforms, care should be taken + to make sure that only forward slashes are used even though the platform + may allow the use of back slashes. In general it is a good idea to always + use forward slashes throughout the configuration files.</p> + </div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache HTTP Server Log Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Format specification for error log entries</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ErrorLogFormat</code> allows to specify what + supplementary information is logged in the error log in addition to the + actual log message.</p> + + <pre class="prettyprint lang-config">#Simple example +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"</pre> + + + <p>Specifying <code>connection</code> or <code>request</code> as first + parameter allows to specify additional formats, causing additional + information to be logged when the first message is logged for a specific + connection or request, respectively. This additional information is only + logged once per connection/request. If a connection or request is processed + without causing any log message, the additional information is not logged + either.</p> + + <p>It can happen that some format string items do not produce output. For + example, the Referer header is only present if the log message is + associated to a request and the log message happens at a time when the + Referer header has already been read from the client. If no output is + produced, the default behavior is to delete everything from the preceding + space character to the next space character. This means the log line is + implicitly divided into fields on non-whitespace to whitespace transitions. + If a format string item does not produce output, the whole field is + omitted. For example, if the remote address <code>%a</code> in the log + format <code>[%t] [%l] [%a] %M </code> is not available, the surrounding + brackets are not logged either. Space characters can be escaped with a + backslash to prevent them from delimiting a field. The combination '% ' + (percent space) is a zero-width field delimiter that does not produce any + output.</p> + + <p>The above behavior can be changed by adding modifiers to the format + string item. A <code>-</code> (minus) modifier causes a minus to be logged if the + respective item does not produce any output. In once-per-connection/request + formats, it is also possible to use the <code>+</code> (plus) modifier. If an + item with the plus modifier does not produce any output, the whole line is + omitted.</p> + + <p>A number as modifier can be used to assign a log severity level to a + format item. The item will only be logged if the severity of the log + message is not higher than the specified log severity level. The number can + range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p> + + <p>For example, here's what would happen if you added modifiers to + the <code>%{Referer}i</code> token, which logs the + <code>Referer</code> request header.</p> + + <table class="bordered"><tr class="header"><th>Modified Token</th><th>Meaning</th></tr> +<tr> + <td><code>%-{Referer}i</code></td> + <td>Logs a <code>-</code> if <code>Referer</code> is not set.</td> + </tr> +<tr class="odd"> + <td><code>%+{Referer}i</code></td> + <td>Omits the entire line if <code>Referer</code> is not set.</td> + </tr> +<tr> + <td><code>%4{Referer}i</code></td> + <td>Logs the <code>Referer</code> only if the log message severity + is higher than 4.</td> + </tr> +</table> + + <p>Some format string items accept additional parameters in braces.</p> + + <table class="bordered"><tr class="header"><th>Format String</th> <th>Description</th></tr> +<tr><td><code>%%</code></td> + <td>The percent sign</td></tr> +<tr class="odd"><td><code>%a</code></td> + <td>Client IP address and port of the request</td></tr> +<tr><td><code>%{c}a</code></td> + <td>Underlying peer IP address and port of the connection (see the + <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> module)</td></tr> +<tr class="odd"><td><code>%A</code></td> + <td>Local IP-address and port</td></tr> +<tr><td><code>%{<em>name</em>}e</code></td> + <td>Request environment variable <em>name</em></td></tr> +<tr class="odd"><td><code>%E</code></td> + <td>APR/OS error status code and string</td></tr> +<tr><td><code>%F</code></td> + <td>Source file name and line number of the log call</td></tr> +<tr class="odd"><td><code>%{<em>name</em>}i</code></td> + <td>Request header <em>name</em></td></tr> +<tr><td><code>%k</code></td> + <td>Number of keep-alive requests on this connection</td></tr> +<tr class="odd"><td><code>%l</code></td> + <td>Loglevel of the message</td></tr> +<tr><td><code>%L</code></td> + <td>Log ID of the request</td></tr> +<tr class="odd"><td><code>%{c}L</code></td> + <td>Log ID of the connection</td></tr> +<tr><td><code>%{C}L</code></td> + <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr> +<tr class="odd"><td><code>%m</code></td> + <td>Name of the module logging the message</td></tr> +<tr><td><code>%M</code></td> + <td>The actual log message</td></tr> +<tr class="odd"><td><code>%{<em>name</em>}n</code></td> + <td>Request note <em>name</em></td></tr> +<tr><td><code>%P</code></td> + <td>Process ID of current process</td></tr> +<tr class="odd"><td><code>%T</code></td> + <td>Thread ID of current thread</td></tr> +<tr><td><code>%{g}T</code></td> + <td>System unique thread ID of current thread (the same ID as + displayed by e.g. <code>top</code>; currently Linux only)</td></tr> +<tr class="odd"><td><code>%t</code></td> + <td>The current time</td></tr> +<tr><td><code>%{u}t</code></td> + <td>The current time including micro-seconds</td></tr> +<tr class="odd"><td><code>%{cu}t</code></td> + <td>The current time in compact ISO 8601 format, including + micro-seconds</td></tr> +<tr><td><code>%v</code></td> + <td>The canonical <code class="directive"><a href="#servername">ServerName</a></code> + of the current server.</td></tr> +<tr class="odd"><td><code>%V</code></td> + <td>The server name of the server serving the request according to the + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> + setting.</td></tr> +<tr><td><code>\ </code> (backslash space)</td> + <td>Non-field delimiting space</td></tr> +<tr class="odd"><td><code>% </code> (percent space)</td> + <td>Field delimiter (no output)</td></tr> +</table> + + <p>The log ID format <code>%L</code> produces a unique id for a connection + or request. This can be used to correlate which log lines belong to the + same connection or request, which request happens on which connection. + A <code>%L</code> format string is also available in + <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code> to allow to correlate access log entries + with error log lines. If <code class="module"><a href="../mod/mod_unique_id.html">mod_unique_id</a></code> is loaded, its + unique id will be used as log ID for requests.</p> + + <pre class="prettyprint lang-config">#Example (default format for threaded MPMs) +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"</pre> + + + <p>This would result in error messages such as:</p> + + <div class="example"><p><code> + [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico + </code></p></div> + + <p>Notice that, as discussed above, some fields are omitted + entirely because they are not defined.</p> + + <pre class="prettyprint lang-config">#Example (similar to the 2.2.x format) +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"</pre> + + + <pre class="prettyprint lang-config">#Advanced example with request/connection log IDs +ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M" +ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T" +ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'" +ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'" +ErrorLogFormat connection "[%{uc}t] [C:%{c}L] remote\ %a local\ %A"</pre> + + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache HTTP Server Log Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Keep track of extended status information for each +request</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ExtendedStatus On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This option tracks additional data per worker about the + currently executing request and creates a utilization summary. + You can see these variables during runtime by configuring + <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>. Note that other modules may + rely on this scoreboard.</p> + + <p>This setting applies to the entire server and cannot be + enabled or disabled on a virtualhost-by-virtualhost basis. + The collection of extended status information can slow down + the server. Also note that this setting cannot be changed + during a graceful restart.</p> + + <div class="note"> + <p>Note that loading <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> will change + the default behavior to ExtendedStatus On, while other + third party modules may do the same. Such modules rely on + collecting detailed information about the state of all workers. + The default is changed by <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> beginning + with version 2.3.6. The previous default was always Off.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File attributes used to create the ETag +HTTP response header for static files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag MTime Size</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The default used to be "INode MTime Size" in 2.3.14 and +earlier.</td></tr> +</table> + <p> + The <code class="directive">FileETag</code> directive configures the file + attributes that are used to create the <code>ETag</code> (entity + tag) response header field when the document is based on a static file. + (The <code>ETag</code> value is used in cache management to save + network bandwidth.) The + <code class="directive">FileETag</code> directive allows you to choose + which of these -- if any -- should be used. The recognized keywords are: + </p> + + <dl> + <dt><strong>INode</strong></dt> + <dd>The file's i-node number will be included in the calculation</dd> + <dt><strong>MTime</strong></dt> + <dd>The date and time the file was last modified will be included</dd> + <dt><strong>Size</strong></dt> + <dd>The number of bytes in the file will be included</dd> + <dt><strong>All</strong></dt> + <dd>All available fields will be used. This is equivalent to: + <pre class="prettyprint lang-config">FileETag INode MTime Size</pre> +</dd> + <dt><strong>Digest</strong></dt> + <dd>If a document is file-based, the <code>ETag</code> field will be + calculated by taking the digest over the file.</dd> + <dt><strong>None</strong></dt> + <dd>If a document is file-based, no <code>ETag</code> field will be + included in the response</dd> + </dl> + + <p>The <code>INode</code>, <code>MTime</code>, <code>Size</code> and + <code>Digest</code> keywords may be prefixed with either <code>+</code> + or <code>-</code>, which allow changes to be made to the default setting + inherited from a broader scope. Any keyword appearing without such a prefix + immediately and completely cancels the inherited setting.</p> + + <p>If a directory's configuration includes + <code>FileETag INode MTime Size</code>, and a + subdirectory's includes <code>FileETag -INode</code>, + the setting for that subdirectory (which will be inherited by + any sub-subdirectories that don't override it) will be equivalent to + <code>FileETag MTime Size</code>.</p> + <div class="note"><h3>Server Side Includes</h3> + An ETag is not generated for responses parsed by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + since the response entity can change without a change of the INode, MTime, + Size or Digest of the static file with embedded SSI directives. + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Files" id="Files"><Files></a> <a name="files" id="files">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched +filenames</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Files <var>filename</var>> ... </Files></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><Files></code> directive + limits the scope of the enclosed directives by filename. It is comparable + to the <code class="directive"><a href="#directory"><Directory></a></code> + and <code class="directive"><a href="#location"><Location></a></code> + directives. It should be matched with a <code></Files></code> + directive. The directives given within this section will be applied to + any object with a basename (last component of filename) matching the + specified filename. <code class="directive"><Files></code> + sections are processed in the order they appear in the + configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and + <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location"><Location></a></code> sections. Note + that <code class="directive"><Files></code> can be nested + inside <code class="directive"><a href="#directory"><Directory></a></code> sections to restrict the + portion of the filesystem they apply to.</p> + + <p>The <var>filename</var> argument should include a filename, or + a wild-card string, where <code>?</code> matches any single character, + and <code>*</code> matches any sequences of characters.</p> + <pre class="prettyprint lang-config"><Files "cat.html"> + # Insert stuff that applies to cat.html here +</Files> + +<Files "?at.*"> + # This would apply to cat.html, bat.html, hat.php and so on. +</Files></pre> + + <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a> + can also be used, with the addition of the + <code>~</code> character. For example:</p> + + <pre class="prettyprint lang-config"><Files ~ "\.(gif|jpe?g|png)$"> + #... +</Files></pre> + + + <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> is preferred, + however.</p> + + <p>Note that unlike <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#location"><Location></a></code> sections, <code class="directive"><Files></code> sections can be used inside + <code>.htaccess</code> files. This allows users to control access to + their own files, at a file-by-file level.</p> + + +<h3>See also</h3> +<ul> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a> <a name="filesmatch" id="filesmatch">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched +filenames</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><FilesMatch></code> directive + limits the scope of the enclosed directives by filename, just as the + <code class="directive"><a href="#files"><Files></a></code> directive + does. However, it accepts a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular + expression</a>. For example:</p> + + <pre class="prettyprint lang-config"><FilesMatch ".+\.(gif|jpe?g|png)$"> + # ... +</FilesMatch></pre> + + + <p>would match most common Internet graphics formats.</p> + + <div class="note">The <code>.+</code> at the start of the regex ensures that + files named <code>.png</code>, or <code>.gif</code>, for example, + are not matched.</div> + + <p>From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of files to be referenced + from within <a href="../expr.html">expressions</a> and modules like + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.</p> + + <pre class="prettyprint lang-config"><FilesMatch "^(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</FilesMatch></pre> + + +<h3>See also</h3> +<ul> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FlushMaxPipelined" id="FlushMaxPipelined">FlushMaxPipelined</a> <a name="flushmaxpipelined" id="flushmaxpipelined">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of pipelined responses above which they are flushed +to the network</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FlushMaxPipelined <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FlushMaxPipelined 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.47 and later</td></tr> +</table> + <p>This directive allows to configure the maximum number of pipelined + responses, which remain pending so long as pipelined request are received. + When the limit is reached, responses are forcibly flushed to the network in + blocking mode, until passing under the limit again.</p> + + <p><code class="directive">FlushMaxPipelined</code> helps constraining memory + usage. When set to <code>0</code> pipelining is disabled, when set to + <code>-1</code> there is no limit (<code class="directive"><a href="#flushmaxthreshold">FlushMaxThreshold</a></code> + still applies).</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FlushMaxThreshold" id="FlushMaxThreshold">FlushMaxThreshold</a> <a name="flushmaxthreshold" id="flushmaxthreshold">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Threshold above which pending data are flushed to the +network</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FlushMaxThreshold <var>number-of-bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FlushMaxThreshold 65536</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.47 and later</td></tr> +</table> + <p>This directive allows to configure the threshold for pending output + data (in bytes). When the limit is reached, data are forcibly flushed to + the network in blocking mode, until passing under the limit again.</p> + + <p><code class="directive">FlushMaxThreshold</code> helps constraining memory + usage. When set to <code>0</code> or a too small value there are actually + no pending data, but for threaded MPMs there can be more threads busy + waiting for the network thus less ones available to handle the other + simultaneous connections.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be served with the specified +media type in the HTTP Content-Type header field</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>When placed into an <code>.htaccess</code> file or a + <code class="directive"><a href="#directory"><Directory></a></code>, or + <code class="directive"><a href="#location"><Location></a></code> or + <code class="directive"><a href="#files"><Files></a></code> + section, this directive forces all matching files to be served + with the content type identification given by + <var>media-type</var>. For example, if you had a directory full of + GIF files, but did not want to label them all with <code>.gif</code>, + you might want to use:</p> + + <pre class="prettyprint lang-config">ForceType image/gif</pre> + + + <p>Note that this directive overrides other indirect media type + associations defined in mime.types or via the + <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code>.</p> + + <p>You can also override more general + <code class="directive">ForceType</code> settings + by using the value of <code>None</code>:</p> + + <pre class="prettyprint lang-config"># force all files to be image/gif: +<Location "/images"> + ForceType image/gif +</Location> + +# but normal mime-type associations here: +<Location "/images/mixed"> + ForceType None +</Location></pre> + + + <p>This directive primarily overrides the content types generated for + static files served out of the filesystem. For resources other than + static files, where the generator of the response typically specifies + a Content-Type, this directive has no effect.</p> + + <div class="note"><h3>Note</h3> + <p>When explicit directives such as + <code class="directive"><a href="#sethandler">SetHandler</a></code> or + <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> do not apply + to the current request, the internal handler name normally set by those + directives is set to match the content type specified by this directive. + This is a historical behavior that some third-party modules + (such as mod_php) may use "magic" content types used only to signal the + module to take responsibility for the matching request. Configurations + that rely on such "magic" types should be avoided by the use of + <code class="directive"><a href="#sethandler">SetHandler</a></code> or + <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code>. </p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory to write gmon.out profiling data to. </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>When the server has been compiled with gprof profiling support, + <code class="directive">GprofDir</code> causes <code>gmon.out</code> files to + be written to the specified directory when the process exits. If the + argument ends with a percent symbol ('%'), subdirectories are created + for each process id.</p> + + <p>This directive currently only works with the <code class="module"><a href="../mod/prefork.html">prefork</a></code> + MPM.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables DNS lookups on client IP addresses</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HostnameLookups Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive enables DNS lookups so that host names can be + logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>). + The value <code>Double</code> refers to doing double-reverse + DNS lookup. That is, after a reverse lookup is performed, a forward + lookup is then performed on that result. At least one of the IP + addresses in the forward lookup must match the original + address. (In "tcpwrappers" terminology this is called + <code>PARANOID</code>.)</p> + + <p>Regardless of the setting, when <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> is + used for controlling access by hostname, a double reverse lookup + will be performed. This is necessary for security. Note that the + result of this double-reverse isn't generally available unless you + set <code>HostnameLookups Double</code>. For example, if only + <code>HostnameLookups On</code> and a request is made to an object + that is protected by hostname restrictions, regardless of whether + the double-reverse fails or not, CGIs will still be passed the + single-reverse result in <code>REMOTE_HOST</code>.</p> + + <p>The default is <code>Off</code> in order to save the network + traffic for those sites that don't truly need the reverse + lookups done. It is also better for the end users because they + don't have to suffer the extra latency that a lookup entails. + Heavily loaded sites should leave this directive + <code>Off</code>, since DNS lookups can take considerable + amounts of time. The utility <code class="program"><a href="../programs/logresolve.html">logresolve</a></code>, compiled by + default to the <code>bin</code> subdirectory of your installation + directory, can be used to look up host names from logged IP addresses + offline.</p> + + <p>Finally, if you have <a href="mod_authz_host.html#reqhost">hostname-based Require + directives</a>, a hostname lookup will be performed regardless of + the setting of <code class="directive">HostnameLookups</code>.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="HttpProtocolOptions" id="HttpProtocolOptions">HttpProtocolOptions</a> <a name="httpprotocoloptions" id="httpprotocoloptions">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Modify restrictions on HTTP Request Messages</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HttpProtocolOptions Strict LenientMethods Allow0.9</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.2.32 or 2.4.24 and later</td></tr> +</table> + <p>This directive changes the rules applied to the HTTP Request Line + (<a href="https://tools.ietf.org/html/rfc7230#section-3.1.1">RFC 7230 §3.1.1</a>) and the HTTP Request Header Fields + (<a href="https://tools.ietf.org/html/rfc7230#section-3.2">RFC 7230 §3.2</a>), which are now applied by default or using + the <code>Strict</code> option. Due to legacy modules, applications or + custom user-agents which must be deprecated the <code>Unsafe</code> + option has been added to revert to the legacy behaviors.</p> + + <p>These rules are applied prior to request processing, + so must be configured at the global or default (first) matching + virtual host section, by IP/port interface (and not by name) + to be honored.</p> + + <p>The directive accepts three parameters from the following list + of choices, applying the default to the ones not specified:</p> + + <dl> + <dt>Strict|Unsafe</dt> + <dd> + <p>Prior to the introduction of this directive, the Apache HTTP Server + request message parsers were tolerant of a number of forms of input + which did not conform to the protocol. + <a href="https://tools.ietf.org/html/rfc7230#section-9.4">RFC 7230 §9.4 Request Splitting</a> and + <a href="https://tools.ietf.org/html/rfc7230#section-9.5">§9.5 Response Smuggling</a> call out only two of the potential + risks of accepting non-conformant request messages, while + <a href="https://tools.ietf.org/html/rfc7230#section-3.5">RFC 7230 §3.5</a> "Message Parsing Robustness" identify the + risks of accepting obscure whitespace and request message formatting. + As of the introduction of this directive, all grammar rules of the + specification are enforced in the default <code>Strict</code> operating + mode, and the strict whitespace suggested by section 3.5 is enforced + and cannot be relaxed.</p> + + <div class="warning"><h3>Security risks of Unsafe</h3> + <p>Users are strongly cautioned against toggling the <code>Unsafe</code> + mode of operation, particularly on outward-facing, publicly accessible + server deployments. If an interface is required for faulty monitoring + or other custom service consumers running on an intranet, users should + toggle the Unsafe option only on a specific virtual host configured + to service their internal private network.</p> + </div> + + <div class="example"><h3>Example of a request leading to HTTP 400 with Strict mode</h3><p><code> + + # Missing CRLF<br /> + GET / HTTP/1.0\n\n + </code></p></div> + <div class="warning"><h3>Command line tools and CRLF</h3> + <p>Some tools need to be forced to use CRLF, otherwise httpd will return + a HTTP 400 response like described in the above use case. For example, + the <strong>OpenSSL s_client needs the -crlf parameter to work + properly</strong>.</p> + <p>The <code class="directive"><a href="../mod/mod_dumpio.html#dumpioinput">DumpIOInput</a></code> directive + can help while reviewing the HTTP request to identify issues like the + absence of CRLF.</p> + </div> + </dd> + <dt>RegisteredMethods|LenientMethods</dt> + <dd> + <p><a href="https://tools.ietf.org/html/rfc7231#section-4.1">RFC 7231 §4.1</a> "Request Methods" "Overview" requires that + origin servers shall respond with a HTTP 501 status code when an + unsupported method is encountered in the request line. + This already happens when the <code>LenientMethods</code> option is used, + but administrators may wish to toggle the <code>RegisteredMethods</code> + option and register any non-standard methods using the + <code class="directive"><a href="#registerhttpmethod">RegisterHttpMethod</a></code> + directive, particularly if the <code>Unsafe</code> + option has been toggled.</p> + + <div class="warning"><h3>Forward Proxy compatibility</h3> + <p>The <code>RegisteredMethods</code> option should <strong>not</strong> + be toggled for forward proxy hosts, as the methods supported by the + origin servers are unknown to the proxy server.</p> + </div> + + <div class="example"><h3>Example of a request leading to HTTP 501 with LenientMethods mode</h3><p><code> + + # Unknown HTTP method<br /> + WOW / HTTP/1.0\r\n\r\n<br /><br /> + # Lowercase HTTP method<br /> + get / HTTP/1.0\r\n\r\n<br /> + </code></p></div> + </dd> + <dt>Allow0.9|Require1.0</dt> + <dd> + <p><a href="https://tools.ietf.org/html/rfc2616#section-19.6">RFC 2616 §19.6</a> "Compatibility With Previous Versions" had + encouraged HTTP servers to support legacy HTTP/0.9 requests. RFC 7230 + supersedes this with "The expectation to support HTTP/0.9 requests has + been removed" and offers additional comments in + <a href="https://tools.ietf.org/html/rfc7230#appendix-A">RFC 7230 Appendix A</a>. The <code>Require1.0</code> option allows + the user to remove support of the default <code>Allow0.9</code> option's + behavior.</p> + + <div class="example"><h3>Example of a request leading to HTTP 400 with Require1.0 mode</h3><p><code> + + # Unsupported HTTP version<br /> + GET /\r\n\r\n + </code></p></div> + </dd> + </dl> + <p>Reviewing the messages logged to the + <code class="directive"><a href="#errorlog">ErrorLog</a></code>, configured with + <code class="directive"><a href="#loglevel">LogLevel</a></code> <code>debug</code> level, + can help identify such faulty requests along with their origin. + Users should pay particular attention to the 400 responses in the access + log for invalid requests which were unexpectedly rejected.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="If" id="If"><If></a> <a name="if" id="if">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is +satisfied by a request at runtime</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table> + <p>The <code class="directive"><If></code> directive + evaluates an expression at runtime, and applies the enclosed + directives if and only if the expression evaluates to true. + For example:</p> + + <pre class="prettyprint lang-config"><If "-z req('Host')"></pre> + + + <p>would match HTTP/1.0 requests without a <var>Host:</var> header. + Expressions may contain various shell-like operators for string + comparison (<code>==</code>, <code>!=</code>, <code><</code>, ...), + integer comparison (<code>-eq</code>, <code>-ne</code>, ...), + and others (<code>-n</code>, <code>-z</code>, <code>-f</code>, ...). + It is also possible to use regular expressions, </p> + + <pre class="prettyprint lang-config"><If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"></pre> + + + <p>shell-like pattern matches and many other operations. These operations + can be done on request headers (<code>req</code>), environment variables + (<code>env</code>), and a large number of other properties. The full + documentation is available in <a href="../expr.html">Expressions in + Apache HTTP Server</a>.</p> + + <p>Only directives that support the <a href="directive-dict.html#Context">directory context</a> can be used within this configuration section.</p> + + <div class="warning"> + Certain variables, such as <code>CONTENT_TYPE</code> and other + response headers, are set after <If> conditions have already + been evaluated, and so will not be available to use in this + directive. + </div> + + <div class="warning"> + Directives that take affect during configuration parsing, such as + <code class="directive">Define</code>, <code class="directive">Include</code>, and + <code class="directive">Error</code> cannot be made conditional by enclosing + them in an if <code class="directive"><If></code> configuration + section. These sections are always part of the configuration, + regardless of how they evaluate at runtime. + </div> + + + +<h3>See also</h3> +<ul> +<li><a href="../expr.html">Expressions in Apache HTTP Server</a>, +for a complete reference and more examples.</li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a> <a name="ifdefine" id="ifdefine">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only +if a test is true at startup</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ... + </IfDefine></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code><IfDefine <var>test</var>>...</IfDefine> + </code> section is used to mark directives that are conditional. The + directives within an <code class="directive"><IfDefine></code> + section are only processed if the <var>test</var> is true. If <var> + test</var> is false, everything between the start and end markers is + ignored.</p> + + <p>The <var>test</var> in the <code class="directive"><IfDefine></code> section directive can be one of two forms:</p> + + <ul> + <li><var>parameter-name</var></li> + + <li><code>!</code><var>parameter-name</var></li> + </ul> + + <p>In the former case, the directives between the start and end + markers are only processed if the parameter named + <var>parameter-name</var> is defined. The second format reverses + the test, and only processes the directives if + <var>parameter-name</var> is <strong>not</strong> defined.</p> + + <p>The <var>parameter-name</var> argument is a define as given on the + <code class="program"><a href="../programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var> + </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p> + + <p><code class="directive"><IfDefine></code> sections are + nest-able, which can be used to implement simple + multiple-parameter tests. Example:</p> + + <div class="example"><p><code>httpd -DReverseProxy -DUseCache -DMemCache ...</code></p></div> + <pre class="prettyprint lang-config"><IfDefine ReverseProxy> + LoadModule proxy_module modules/mod_proxy.so + LoadModule proxy_http_module modules/mod_proxy_http.so + <IfDefine UseCache> + LoadModule cache_module modules/mod_cache.so + <IfDefine MemCache> + LoadModule mem_cache_module modules/mod_mem_cache.so + </IfDefine> + <IfDefine !MemCache> + LoadModule cache_disk_module modules/mod_cache_disk.so + </IfDefine> + </IfDefine> +</IfDefine></pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfDirective" id="IfDirective"><IfDirective></a> <a name="ifdirective" id="ifdirective">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific directive</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfDirective [!]<var>directive-name</var>> ... + </IfDirective></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table> + <p>The <code><IfDirective <var>test</var>>...</IfDirective></code> + section is used to mark directives that are conditional on the presence of + a specific directive. The directives within an <code class="directive"><IfDirective></code> section are only processed if the <var>test</var> + is true. If <var>test</var> is false, everything between the start and + end markers is ignored.</p> + + <p>The <var>test</var> in the <code class="directive"><IfDirective></code> section can be one of two forms:</p> + + <ul> + <li><var>directive-name</var></li> + + <li>!<var>directive-name</var></li> + </ul> + + <p>In the former case, the directives between the start and end + markers are only processed if a directive of the given name is + available at the time of processing. The second format reverses the test, + and only processes the directives if <var>directive-name</var> is + <strong>not</strong> available.</p> + + <div class="note">This section should only be used if you need to have one + configuration file that works across multiple versions of + <code class="program"><a href="../programs/httpd.html">httpd</a></code>, regardless of whether a particular + directive is available. In normal operation, directives need not + be placed in <code class="directive"><IfDirective></code> + sections.</div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#ifsection"><IfSection></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfFile" id="IfFile"><IfFile></a> <a name="iffile" id="iffile">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only +if file exists at startup</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfFile [!]<var>filename</var>> ... + </IfFile></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table> + <p>The <code><IfFile <var>filename</var>>...</IfFile> + </code> section is used to mark directives that are conditional on + the existence of a file on disk. The directives within an + <code class="directive"><IfFile></code> section are only + processed if <var>filename</var> exists. If <var>filename</var> + doesn't exist, everything between the start and end markers is + ignored. <var>filename</var> can be an absolute path or a path + relative to the server root.</p> + + <p>The <var>filename</var> in the <code class="directive"><IfFile></code> section directive can take the same forms as the + <var>test</var> variable in the <code class="directive"><a href="#ifdefine"><IfDefine></a></code> section, i.e. the test can be negated if the <code> + !</code> character is placed directly before <var>filename</var>. + </p> + + <p>If a relative <var>filename</var> is supplied, the check is + <code class="directive"><a href="#serverroot">ServerRoot</a></code> relative. In the case where + this directive occurs before the <code class="directive"><a href="#serverroot">ServerRoot</a></code>, + the path will be checked relative to the compiled-in server root or + the server root passed in on the command line via the <code>-d</code> + parameter.</p> + + <div class="warning"><h3>Warning</h3> + In 2.4.34, it is not possible to specify a <var>filename</var> + with surrounding quotes. This would generate a parsing error at start-up. + The main impact is that filenames with spaces can't be used. + This behavior is fixed in 2.4.35.</div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a> <a name="ifmodule" id="ifmodule">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific module</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ... + </IfModule></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Module identifiers are available in version 2.1 and +later.</td></tr> +</table> + <p>The <code><IfModule <var>test</var>>...</IfModule></code> + section is used to mark directives that are conditional on the presence of + a specific module. The directives within an <code class="directive"><IfModule></code> section are only processed if the <var>test</var> + is true. If <var>test</var> is false, everything between the start and + end markers is ignored.</p> + + <p>The <var>test</var> in the <code class="directive"><IfModule></code> section directive can be one of two forms:</p> + + <ul> + <li><var>module</var></li> + + <li>!<var>module</var></li> + </ul> + + <p>In the former case, the directives between the start and end + markers are only processed if the module named <var>module</var> + is included in Apache httpd -- either compiled in or + dynamically loaded using <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test, + and only processes the directives if <var>module</var> is + <strong>not</strong> included.</p> + + <p>The <var>module</var> argument can be either the module identifier or + the file name of the module, at the time it was compiled. For example, + <code>rewrite_module</code> is the identifier and + <code>mod_rewrite.c</code> is the file name. If a module consists of + several source files, use the name of the file containing the string + <code>STANDARD20_MODULE_STUFF</code>.</p> + + <p><code class="directive"><IfModule></code> sections are + nest-able, which can be used to implement simple multiple-module + tests.</p> + + <div class="note">This section should only be used if you need to have one + configuration file that works whether or not a specific module + is available. In normal operation, directives need not be + placed in <code class="directive"><IfModule></code> + sections.</div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfSection" id="IfSection"><IfSection></a> <a name="ifsection" id="ifsection">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific section directive</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfSection [!]<var>section-name</var>> ... + </IfSection></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table> + <p>The <code><IfSection + <var>test</var>>...</IfSection></code> section is used + to mark directives that are conditional on the presence of a + specific section directive. A section directive is any directive + such as <code class="directive"><VirtualHost></code> which + encloses other directives, and has a directive name with a leading + "<".</p> + + <p>The directives within an <code class="directive"><IfSection></code> section are only processed if the <var>test</var> + is true. If <var>test</var> is false, everything between the start and + end markers is ignored.</p> + + <p>The <var>section-name</var> must be specified without either + the leading "<" or closing ">". The <var>test</var> in the + <code class="directive"><IfSection></code> section can be one + of two forms:</p> + + <ul> + <li><var>section-name</var></li> + <li>!<var>section-name</var></li> + </ul> + + <p>In the former case, the directives between the start and end + markers are only processed if a section directive of the given + name is available at the time of processing. The second format + reverses the test, and only processes the directives if + <var>section-name</var> is <strong>not</strong> an available + section directive.</p> + + <p>For example:</p> + + <pre class="prettyprint lang-config"><IfSection VirtualHost> + ... +</IfSection></pre> + + + <div class="note">This section should only be used if you need to have one + configuration file that works across multiple versions of <code class="program"><a href="../programs/httpd.html">httpd</a></code>, + regardless of whether a particular section directive is + available. In normal operation, directives need not be placed in + <code class="directive"><IfSection></code> sections.</div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#ifdirective"><IfDirective></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within +the server configuration files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Directory +wildcard matching available in 2.3.6 and later</td></tr> +</table> + <p>This directive allows inclusion of other configuration files + from within the server configuration files.</p> + + <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used + in the filename or directory parts of the path to include several files + at once, in alphabetical order. In addition, if + <code class="directive">Include</code> points to a directory, rather than a file, + Apache httpd will read all files in that directory and any subdirectory. + However, including entire directories is not recommended, because it is + easy to accidentally leave temporary files in a directory that can cause + <code class="program"><a href="../programs/httpd.html">httpd</a></code> to fail. Instead, we encourage you to use the + wildcard syntax shown below, to include files that match a particular + pattern, such as *.conf, for example.</p> + + <p>The <code class="directive"><a href="#include">Include</a></code> directive will + <strong>fail with an error</strong> if a wildcard expression does not + match any file. The <code class="directive"><a href="#includeoptional">IncludeOptional</a></code> + directive can be used if non-matching wildcards should be ignored.</p> + + <p>The file path specified may be an absolute path, or may be relative + to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p> + + <p>Examples:</p> + + <pre class="prettyprint lang-config">Include /usr/local/apache2/conf/ssl.conf +Include /usr/local/apache2/conf/vhosts/*.conf</pre> + + + <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p> + + <pre class="prettyprint lang-config">Include conf/ssl.conf +Include conf/vhosts/*.conf</pre> + + + <p>Wildcards may be included in the directory or file portion of the + path. This example will fail if there is no subdirectory in conf/vhosts + that contains at least one *.conf file:</p> + + <pre class="prettyprint lang-config">Include conf/vhosts/*/*.conf</pre> + + + <p>Alternatively, the following command will just be ignored in case of + missing files or directories:</p> + + <pre class="prettyprint lang-config">IncludeOptional conf/vhosts/*/*.conf</pre> + + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#includeoptional">IncludeOptional</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within +the server configuration files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.3.6 and later. Not existent file paths without wildcards + do not cause SyntaxError after 2.4.30</td></tr> +</table> + <p>This directive allows inclusion of other configuration files + from within the server configuration files. It works identically to the + <code class="directive"><a href="#include">Include</a></code> directive, but it will be + silently ignored (instead of causing an error) if wildcards are used and + they do not match any file or directory or if a file path does not exist + on the file system.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#include">Include</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables HTTP persistent connections</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAlive On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The Keep-Alive extension to HTTP/1.0 and the persistent + connection feature of HTTP/1.1 provide long-lived HTTP sessions + which allow multiple requests to be sent over the same TCP + connection. In some cases this has been shown to result in an + almost 50% speedup in latency times for HTML documents with + many images. To enable Keep-Alive connections, set + <code>KeepAlive On</code>.</p> + + <p>For HTTP/1.0 clients, Keep-Alive connections will only be + used if they are specifically requested by a client. In + addition, a Keep-Alive connection with an HTTP/1.0 client can + only be used when the length of the content is known in + advance. This implies that dynamic content such as CGI output, + SSI pages, and server-generated directory listings will + generally not use Keep-Alive connections to HTTP/1.0 clients. + For HTTP/1.1 clients, persistent connections are the default + unless otherwise specified. If the client requests it, chunked + encoding will be used in order to send content of unknown + length over persistent connections.</p> + + <p>When a client uses a Keep-Alive connection, it will be counted + as a single "request" for the <code class="directive"><a href="../mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code> directive, regardless + of how many requests are sent using the connection.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for subsequent +requests on a persistent connection</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The number of seconds Apache httpd will wait for a subsequent + request before closing the connection. By adding a postfix of ms the + timeout can be also set in milliseconds. Once a request has been + received, the timeout value specified by the + <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p> + + <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value + may cause performance problems in heavily loaded servers. The + higher the timeout, the more server processes will be kept + occupied waiting on connections with idle clients.</p> + + <p>If <code class="directive">KeepAliveTimeout</code> is <strong>not</strong> + set for a name-based virtual host, the value of the first defined + virtual host best matching the local IP and port will be used.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP +methods</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ... + </Limit></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Access controls are normally effective for + <strong>all</strong> access methods, and this is the usual + desired behavior. <strong>In the general case, access control + directives should not be placed within a + <code class="directive"><Limit></code> section.</strong></p> + + <p>The purpose of the <code class="directive"><Limit></code> + directive is to restrict the effect of the access controls to the + nominated HTTP methods. For all other methods, the access + restrictions that are enclosed in the <code class="directive"><Limit></code> bracket <strong>will have no + effect</strong>. The following example applies the access control + only to the methods <code>POST</code>, <code>PUT</code>, and + <code>DELETE</code>, leaving all other methods unprotected:</p> + + <pre class="prettyprint lang-config"><Limit POST PUT DELETE> + Require valid-user +</Limit></pre> + + + <p>The method names listed can be one or more of: <code>GET</code>, + <code>POST</code>, <code>PUT</code>, <code>DELETE</code>, + <code>CONNECT</code>, <code>OPTIONS</code>, + <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>, + <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>, + <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is + case-sensitive.</strong> If <code>GET</code> is used, it will also + restrict <code>HEAD</code> requests. The <code>TRACE</code> method + cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p> + + <div class="warning">A <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section should always be + used in preference to a <code class="directive"><Limit></code> + section when restricting access, since a <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section provides protection + against arbitrary methods.</div> + + <p>The <code class="directive"><Limit></code> and + <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> + directives may be nested. In this case, each successive level of + <code class="directive"><Limit></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> directives must + further restrict the set of methods to which access controls apply.</p> + + <div class="warning">When using + <code class="directive"><Limit></code> or + <code class="directive"><LimitExcept></code> directives with + the <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive, + note that the first <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> + to succeed authorizes the request, regardless of the presence of other + <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directives.</div> + + <p>For example, given the following configuration, all users will + be authorized for <code>POST</code> requests, and the + <code>Require group editors</code> directive will be ignored + in all cases:</p> + + <pre class="prettyprint lang-config"><LimitExcept GET> + Require valid-user +</LimitExcept> +<Limit POST> + Require group editors +</Limit></pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods +except the named ones</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ... + </LimitExcept></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><LimitExcept></code> and + <code></LimitExcept></code> are used to enclose + a group of access control directives which will then apply to any + HTTP access method <strong>not</strong> listed in the arguments; + i.e., it is the opposite of a <code class="directive"><a href="#limit"><Limit></a></code> section and can be used to control + both standard and nonstandard/unrecognized methods. See the + documentation for <code class="directive"><a href="#limit"><Limit></a></code> for more details.</p> + + <p>For example:</p> + + <pre class="prettyprint lang-config"><LimitExcept POST GET> + Require valid-user +</LimitExcept></pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine maximum number of internal redirects and nested +subrequests</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitInternalRecursion 10</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <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 + redirects the original request to a CGI script. A subrequest is Apache httpd's + mechanism to find out what would happen for some URI if it were requested. + For example, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the + files listed in the <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> + directive.</p> + + <p><code class="directive">LimitInternalRecursion</code> prevents the server + from crashing when entering an infinite loop of internal redirects or + subrequests. Such loops are usually caused by misconfigurations.</p> + + <p>The directive stores two different limits, which are evaluated on + per-request basis. The first <var>number</var> is the maximum number of + internal redirects that may follow each other. The second <var>number</var> + determines how deeply subrequests may be nested. If you specify only one + <var>number</var>, it will be assigned to both limits.</p> + + <pre class="prettyprint lang-config">LimitInternalRecursion 5</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent +from the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 1073741824</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>In Apache HTTP Server 2.4.53 and earlier, the default value +was 0 (unlimited)</td></tr> +</table> + <p>This directive specifies the number of <var>bytes</var> + that are allowed in a request body. A value of <var>0</var> means unlimited.</p> + + <p>The <code class="directive">LimitRequestBody</code> directive allows + the user to set a limit on the allowed size of an HTTP request + message body within the context in which the directive is given + (server, per-directory, per-file or per-location). If the client + request exceeds that limit, the server will return an error + response instead of servicing the request. The size of a normal + request message body will vary greatly depending on the nature of + the resource and the methods allowed on that resource. CGI scripts + typically use the message body for retrieving form information. + Implementations of the <code>PUT</code> method will require + a value at least as large as any representation that the server + wishes to accept for that resource.</p> + + <p>This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service + attacks.</p> + + <p>If, for example, you are permitting file upload to a particular + location and wish to limit the size of the uploaded file to 100K, + you might use the following directive:</p> + + <pre class="prettyprint lang-config">LimitRequestBody 102400</pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of HTTP request header fields that +will be accepted from the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFields 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Setting <var>number</var> at 0 means unlimited. + The default value is defined by the compile-time + constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as + distributed).</p> + + <p>The <code class="directive">LimitRequestFields</code> directive allows + the server administrator to modify the limit on the number of + request header fields allowed in an HTTP request. A server needs + this value to be larger than the number of fields that a normal + client request might include. The number of request header fields + used by a client rarely exceeds 20, but this may vary among + different client implementations, often depending upon the extent + to which a user has configured their browser to support detailed + content negotiation. Optional HTTP extensions are often expressed + using request header fields.</p> + + <p>This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks. + The value should be increased if normal clients see an error + response from the server that indicates too many fields were + sent in the request.</p> + + <p>For example:</p> + + <pre class="prettyprint lang-config">LimitRequestFields 50</pre> + + + <div class="warning"><h3>Warning</h3> + <p> When name-based virtual hosting is used, the value for this + directive is taken from the default (first-listed) virtual host for the + local IP and port combination.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of the HTTP request header allowed from the +client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive specifies the number of <var>bytes</var> + that will be allowed in an HTTP request header.</p> + + <p>The <code class="directive">LimitRequestFieldSize</code> directive + allows the server administrator to set the limit + on the allowed size of an HTTP request header field. A server + needs this value to be large enough to hold any one header field + from a normal client request. The size of a normal request header + field will vary greatly among different client implementations, + often depending upon the extent to which a user has configured + their browser to support detailed content negotiation. SPNEGO + authentication headers can be up to 12392 bytes.</p> + + <p>This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks.</p> + + <p>For example:</p> + + <pre class="prettyprint lang-config">LimitRequestFieldSize 4094</pre> + + + <div class="note">Under normal conditions, the value should not be changed from + the default.</div> + + <div class="warning"><h3>Warning</h3> + <p> When name-based virtual hosting is used, the value for this + directive is taken from the default (first-listed) virtual host best + matching the current IP address and port combination.</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limit the size of the HTTP request line that will be accepted +from the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestLine 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive sets the number of <var>bytes</var> that will be + allowed on the HTTP request-line.</p> + + <p>The <code class="directive">LimitRequestLine</code> directive allows + the server administrator to set the limit on the allowed size + of a client's HTTP request-line. Since the request-line consists of the + HTTP method, URI, and protocol version, the + <code class="directive">LimitRequestLine</code> directive places a + restriction on the length of a request-URI allowed for a request + on the server. A server needs this value to be large enough to + hold any of its resource names, including any information that + might be passed in the query part of a <code>GET</code> request.</p> + + <p>This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks.</p> + + <p>For example:</p> + + <pre class="prettyprint lang-config">LimitRequestLine 4094</pre> + + + <div class="note">Under normal conditions, the value should not be changed from + the default.</div> + + <div class="warning"><h3>Warning</h3> + <p> When name-based virtual hosting is used, the value for this + directive is taken from the default (first-listed) virtual host best + matching the current IP address and port combination.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of an XML-based request body</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Limit (in bytes) on the maximum size of an XML-based request + body. A value of <code>0</code> will apply a hard limit (depending on + 32bit vs 64bit system) allowing for XML escaping within the bounds of + the system addressable memory, but it exists for compatibility only + and is not recommended since it does not account for memory consumed + elsewhere or concurrent requests, which might result in an overall + system out-of-memory. + </p> + <p>Example:</p> + + <pre class="prettyprint lang-config"># Limit of 1 MiB +LimitXMLRequestBody 1073741824</pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Location" id="Location"><Location></a> <a name="location" id="location">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching +URLs</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Location + <var>URL-path</var>|<var>URL</var>> ... </Location></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><Location></code> directive + limits the scope of the enclosed directives by URL. It is similar to the + <code class="directive"><a href="#directory"><Directory></a></code> + directive, and starts a subsection which is terminated with a + <code></Location></code> directive. <code class="directive"><Location></code> sections are processed in the + order they appear in the configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and + <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files"><Files></a></code> sections.</p> + + <p><code class="directive"><Location></code> sections operate + completely outside the filesystem. This has several consequences. + Most importantly, <code class="directive"><Location></code> + directives should not be used to control access to filesystem + locations. Since several different URLs may map to the same + filesystem location, such access controls may by circumvented.</p> + + <p>The enclosed directives will be applied to the request if the path component + of the URL meets <em>any</em> of the following criteria: + </p> + <ul> + <li>The specified location matches exactly the path component of the URL. + </li> + <li>The specified location, which ends in a forward slash, is a prefix + of the path component of the URL (treated as a context root). + </li> + <li>The specified location, with the addition of a trailing slash, is a + prefix of the path component of the URL (also treated as a context root). + </li> + </ul> + <p> + In the example below, where no trailing slash is used, requests to + /private1, /private1/ and /private1/file.txt will have the enclosed + directives applied, but /private1other would not. + </p> + <pre class="prettyprint lang-config"><Location "/private1"> + # ... +</Location></pre> + + <p> + In the example below, where a trailing slash is used, requests to + /private2/ and /private2/file.txt will have the enclosed + directives applied, but /private2 and /private2other would not. + </p> + <pre class="prettyprint lang-config"><Location "/private2<em>/</em>"> + # ... +</Location></pre> + + + <div class="note"><h3>When to use <code class="directive"><Location></code></h3> + + <p>Use <code class="directive"><Location></code> to apply + directives to content that lives outside the filesystem. For + content that lives in the filesystem, use <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#files"><Files></a></code>. An exception is + <code><Location "/"></code>, which is an easy way to + apply a configuration to the entire server.</p> + </div> + + <p>For all origin (non-proxy) requests, the URL to be matched is a + URL-path of the form <code>/path/</code>. <em>No scheme, hostname, + port, or query string may be included.</em> For proxy requests, the + URL to be matched is of the form + <code>scheme://servername/path</code>, and you must include the + prefix.</p> + + <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches + any single character, and <code>*</code> matches any sequences of + characters. Neither wildcard character matches a / in the URL-path.</p> + + <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a> + can also be used, with the addition of the <code>~</code> + character. For example:</p> + + <pre class="prettyprint lang-config"><Location ~ "/(extra|special)/data"> + #... +</Location></pre> + + + <p>would match URLs that contained the substring <code>/extra/data</code> + or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> behaves + identical to the regex version of <code class="directive"><Location></code>, and is preferred, for the + simple reason that <code>~</code> is hard to distinguish from + <code>-</code> in many fonts.</p> + + <p>The <code class="directive"><Location></code> + functionality is especially useful when combined with the + <code class="directive"><a href="#sethandler">SetHandler</a></code> + directive. For example, to enable status requests but allow them + only from browsers at <code>example.com</code>, you might use:</p> + + <pre class="prettyprint lang-config"><Location "/status"> + SetHandler server-status + Require host example.com +</Location></pre> + + + <div class="note"><h3>Note about / (slash)</h3> + <p>The slash character has special meaning depending on where in a + URL it appears. People may be used to its behavior in the filesystem + where multiple adjacent slashes are frequently collapsed to a single + slash (<em>i.e.</em>, <code>/home///foo</code> is the same as + <code>/home/foo</code>). In URL-space this is not necessarily true if + directive <code class="directive"><a href="#mergeslashes">MergeSlashes</a></code> has been set + to "OFF". + The <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> + directive and the regex version of <code class="directive"><Location></code> require you to explicitly specify multiple + slashes if the slashes are not being merged.</p> + + <p>For example, <code><LocationMatch "^/abc"></code> would match + the request URL <code>/abc</code> but not the request URL <code> + //abc</code>. The (non-regex) <code class="directive"><Location></code> directive behaves similarly when used for + proxy requests. But when (non-regex) <code class="directive"><Location></code> is used for non-proxy requests it will + implicitly match multiple slashes with a single slash. For example, + if you specify <code><Location "/abc/def"></code> and the + request is to <code>/abc//def</code> then it will match.</p> + </div> + +<h3>See also</h3> +<ul> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received.</li> +<li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression +matching URLs</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LocationMatch + <var>regex</var>> ... </LocationMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><LocationMatch></code> directive + limits the scope of the enclosed directives by URL, in an identical manner + to <code class="directive"><a href="#location"><Location></a></code>. However, + it takes a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a> + as an argument instead of a simple string. For example:</p> + + <pre class="prettyprint lang-config"><LocationMatch "/(extra|special)/data"> + # ... +</LocationMatch></pre> + + + <p>would match URLs that contained the substring <code>/extra/data</code> + or <code>/special/data</code>.</p> + + <div class="note"><p>If the intent is that a URL <strong>starts with</strong> + <code>/extra/data</code>, rather than merely + <strong>contains</strong> <code>/extra/data</code>, prefix the + regular expression with a <code>^</code> to require this.</p> + + <pre class="prettyprint lang-config"><LocationMatch "^/(extra|special)/data"></pre> + + </div> + + <p>From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of URLs to be referenced + from within <a href="../expr.html">expressions</a> and modules like + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.</p> + + <pre class="prettyprint lang-config"><LocationMatch "^/combined/(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</LocationMatch></pre> + + + <div class="note"><h3>Note about / (slash)</h3> + <p>The slash character has special meaning depending on where in a + URL it appears. People may be used to its behavior in the filesystem + where multiple adjacent slashes are frequently collapsed to a single + slash (<em>i.e.</em>, <code>/home///foo</code> is the same as + <code>/home/foo</code>). In URL-space this is not necessarily true if + directive <code class="directive"><a href="#mergeslashes">MergeSlashes</a></code> has been set + to "OFF". + The <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> + directive and the regex version of <code class="directive"><Location></code> require you to explicitly specify multiple + slashes if the slashes are not being merged.</p> + + <p>For example, <code><LocationMatch "^/abc"></code> would match + the request URL <code>/abc</code> but not the request URL <code> + //abc</code>. The (non-regex) <code class="directive"><Location></code> directive behaves similarly when used for + proxy requests. But when (non-regex) <code class="directive"><Location></code> is used for non-proxy requests it will + implicitly match multiple slashes with a single slash. For example, + if you specify <code><Location "/abc/def"></code> and the + request is to <code>/abc//def</code> then it will match.</p> + </div> + +<h3>See also</h3> +<ul> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls the verbosity of the ErrorLog</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel [<var>module</var>:]<var>level</var> + [<var>module</var>:<var>level</var>] ... +</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LogLevel warn</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Per-module and per-directory configuration is available in + Apache HTTP Server 2.3.6 and later</td></tr> +</table> + <p><code class="directive">LogLevel</code> adjusts the verbosity of the + messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following + <var>level</var>s are available, in order of decreasing + significance:</p> + + <table class="bordered"> + + <tr> + <th><strong>Level</strong> </th> + + <th><strong>Description</strong> </th> + + <th><strong>Example</strong> </th> + </tr> + + <tr> + <td><code>emerg</code> </td> + + <td>Emergencies - system is unusable.</td> + + <td>"Child cannot open lock file. Exiting"</td> + </tr> + + <tr> + <td><code>alert</code> </td> + + <td>Action must be taken immediately.</td> + + <td>"getpwuid: couldn't determine user name from uid"</td> + </tr> + + <tr> + <td><code>crit</code> </td> + + <td>Critical Conditions.</td> + + <td>"socket: Failed to get a socket, exiting child"</td> + </tr> + + <tr> + <td><code>error</code> </td> + + <td>Error conditions.</td> + + <td>"Premature end of script headers"</td> + </tr> + + <tr> + <td><code>warn</code> </td> + + <td>Warning conditions.</td> + + <td>"child process 1234 did not exit, sending another + SIGHUP"</td> + </tr> + + <tr> + <td><code>notice</code> </td> + + <td>Normal but significant condition.</td> + + <td>"httpd: caught SIGBUS, attempting to dump core in + ..."</td> + </tr> + + <tr> + <td><code>info</code> </td> + + <td>Informational.</td> + + <td>"Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..."</td> + </tr> + + <tr> + <td><code>debug</code> </td> + + <td>Debug-level messages</td> + + <td>"Opening config file ..."</td> + </tr> + <tr> + <td><code>trace1</code> </td> + + <td>Trace messages</td> + + <td>"proxy: FTP: control connection complete"</td> + </tr> + <tr> + <td><code>trace2</code> </td> + + <td>Trace messages</td> + + <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td> + </tr> + <tr> + <td><code>trace3</code> </td> + + <td>Trace messages</td> + + <td>"openssl: Handshake: start"</td> + </tr> + <tr> + <td><code>trace4</code> </td> + + <td>Trace messages</td> + + <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td> + </tr> + <tr> + <td><code>trace5</code> </td> + + <td>Trace messages</td> + + <td>"map lookup FAILED: map=rewritemap key=keyname"</td> + </tr> + <tr> + <td><code>trace6</code> </td> + + <td>Trace messages</td> + + <td>"cache lookup FAILED, forcing new map lookup"</td> + </tr> + <tr> + <td><code>trace7</code> </td> + + <td>Trace messages, dumping large amounts of data</td> + + <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td> + </tr> + <tr> + <td><code>trace8</code> </td> + + <td>Trace messages, dumping large amounts of data</td> + + <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td> + </tr> + </table> + + <p>When a particular level is specified, messages from all + other levels of higher significance will be reported as well. + <em>E.g.</em>, when <code>LogLevel info</code> is specified, + then messages with log levels of <code>notice</code> and + <code>warn</code> will also be posted.</p> + + <p>Using a level of at least <code>crit</code> is + recommended.</p> + + <p>For example:</p> + + <pre class="prettyprint lang-config">LogLevel notice</pre> + + + <div class="note"><h3>Note</h3> + <p>When logging to a regular file, messages of the level + <code>notice</code> cannot be suppressed and thus are always + logged. However, this doesn't apply when logging is done + using <code>syslog</code>.</p> + </div> + + <p>Specifying a level without a module name will reset the level + for all modules to that level. Specifying a level with a module + name will set the level for that module only. It is possible to + use the module source file name, the module identifier, or the + module identifier with the trailing <code>_module</code> omitted + as module specification. This means the following three specifications + are equivalent:</p> + + <pre class="prettyprint lang-config">LogLevel info ssl:warn +LogLevel info mod_ssl.c:warn +LogLevel info ssl_module:warn</pre> + + + <p>It is also possible to change the level per directory:</p> + + <pre class="prettyprint lang-config">LogLevel info +<Directory "/usr/local/apache/htdocs/app"> + LogLevel debug +</Directory></pre> + + + <div class="note"> + Per directory loglevel configuration only affects messages that are + logged after the request has been parsed and that are associated with + the request. Log messages which are associated with the connection or + the server are not affected. + </div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#errorlogformat">ErrorLogFormat</a></code></li> +<li><a href="../logs.html">Apache HTTP Server Log Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent +connection</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">MaxKeepAliveRequests</code> directive + limits the number of requests allowed per connection when + <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is + set to <code>0</code>, unlimited requests will be allowed. We + recommend that this setting be kept to a high value for maximum + server performance.</p> + + <p>For example:</p> + + <pre class="prettyprint lang-config">MaxKeepAliveRequests 500</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of overlapping ranges (eg: <code>100-200,150-300</code>) allowed before returning the complete + resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table> + <p>The <code class="directive">MaxRangeOverlaps</code> directive + limits the number of overlapping HTTP ranges the server is willing to + return to the client. If more overlapping ranges than permitted are requested, + the complete resource is returned instead.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>Limits the number of overlapping ranges to a compile-time default of 20.</dd> + + <dt><strong>none</strong></dt> + <dd>No overlapping Range headers are allowed.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>The server does not limit the number of overlapping ranges it is + willing to satisfy.</dd> + + <dt><var>number-of-ranges</var></dt> + <dd>A positive number representing the maximum number of overlapping ranges the + server is willing to satisfy.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of range reversals (eg: <code>100-200,50-70</code>) allowed before returning the complete + resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeReversals default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeReversals 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table> + <p>The <code class="directive">MaxRangeReversals</code> directive + limits the number of HTTP Range reversals the server is willing to + return to the client. If more ranges reversals than permitted are requested, + the complete resource is returned instead.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>Limits the number of range reversals to a compile-time default of 20.</dd> + + <dt><strong>none</strong></dt> + <dd>No Range reversals headers are allowed.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>The server does not limit the number of range reversals it is + willing to satisfy.</dd> + + <dt><var>number-of-ranges</var></dt> + <dd>A positive number representing the maximum number of range reversals the + server is willing to satisfy.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of ranges allowed before returning the complete +resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRanges default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRanges 200</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table> + <p>The <code class="directive">MaxRanges</code> directive + limits the number of HTTP ranges the server is willing to + return to the client. If more ranges than permitted are requested, + the complete resource is returned instead.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>Limits the number of ranges to a compile-time default of 200.</dd> + + <dt><strong>none</strong></dt> + <dd>Range headers are ignored.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>The server does not limit the number of ranges it is + willing to satisfy.</dd> + + <dt><var>number-of-ranges</var></dt> + <dd>A positive number representing the maximum number of ranges the + server is willing to satisfy.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MergeSlashes" id="MergeSlashes">MergeSlashes</a> <a name="mergeslashes" id="mergeslashes">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether the server merges consecutive slashes in URLs. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MergeSlashes ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MergeSlashes ON</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Added in 2.4.39</td></tr> +</table> + <p>By default, the server merges (or collapses) multiple consecutive slash + ('/') characters in the path component of the request URL.</p> + + <p>When mapping URL's to the filesystem, these multiple slashes are not + significant. However, URL's handled other ways, such as by CGI or proxy, + might prefer to retain the significance of multiple consecutive slashes. + In these cases <code class="directive">MergeSlashes</code> can be set to + <em>OFF</em> to retain the multiple consecutive slashes, which is the legacy behavior.</p> + <p> + When set to "OFF", regular expressions used in the configuration file that match + the path component of the URL (<code class="directive">LocationMatch</code>, + <code class="directive">RewriteRule</code>, ...) need to take into account multiple + consecutive slashes. Non regular expression based <code class="directive">Location</code> always + operate against a URL with merged slashes and cannot differentiate between multiple slashes.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a> <a name="mergetrailers" id="mergetrailers">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether trailers are merged into headers</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MergeTrailers [on|off]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MergeTrailers off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.11 and later</td></tr> +</table> + <p>This directive controls whether HTTP trailers are copied into the + internal representation of HTTP headers. This merging occurs when the + request body has been completely consumed, long after most header + processing would have a chance to examine or modify request headers.</p> + <p>This option is provided for compatibility with releases prior to 2.4.11, + where trailers were always merged.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures mutex mechanism and lock file directory for all +or specified mutexes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Mutex default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr> +</table> + <p>The <code class="directive">Mutex</code> directive sets the mechanism, + and optionally the lock file location, that httpd and modules use + to serialize access to resources. Specify <code>default</code> as + the second argument to change the settings for all mutexes; specify + a mutex name (see table below) as the second argument to override + defaults only for that mutex.</p> + + <p>The <code class="directive">Mutex</code> directive is typically used in + the following exceptional situations:</p> + + <ul> + <li>change the mutex mechanism when the default mechanism selected + by <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> has a functional or performance + problem</li> + + <li>change the directory used by file-based mutexes when the + default directory does not support locking</li> + </ul> + + <div class="note"><h3>Supported modules</h3> + <p>This directive only configures mutexes which have been registered + with the core server using the <code>ap_mutex_register()</code> API. + All modules bundled with httpd support the <code class="directive">Mutex</code> + directive, but third-party modules may not. Consult the documentation + of the third-party module, which must indicate the mutex name(s) which + can be configured if this directive is supported.</p> + </div> + + <p>The following mutex <em>mechanisms</em> are available:</p> + <ul> + <li><code>default | yes</code> + <p>This selects the default locking implementation, as determined by + <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a>. The default locking implementation can + be displayed by running <code class="program"><a href="../programs/httpd.html">httpd</a></code> with the + <code>-V</code> option.</p></li> + + <li><code>none | no</code> + <p>This effectively disables the mutex, and is only allowed for a + mutex if the module indicates that it is a valid choice. Consult the + module documentation for more information.</p></li> + + <li><code>posixsem</code> + <p>This is a mutex variant based on a Posix semaphore.</p> + + <div class="warning"><h3>Warning</h3> + <p>The semaphore ownership is not recovered if a thread in the process + holding the mutex segfaults, resulting in a hang of the web server.</p> + </div> + </li> + + <li><code>sysvsem</code> + <p>This is a mutex variant based on a SystemV IPC semaphore.</p> + + <div class="warning"><h3>Warning</h3> + <p>It is possible to "leak" SysV semaphores if processes crash + before the semaphore is removed.</p> + </div> + + <div class="warning"><h3>Security</h3> + <p>The semaphore API allows for a denial of service attack by any + CGIs running under the same uid as the webserver (<em>i.e.</em>, + all CGIs, unless you use something like <code class="program"><a href="../programs/suexec.html">suexec</a></code> + or <code>cgiwrapper</code>).</p> + </div> + </li> + + <li><code>sem</code> + <p>This selects the "best" available semaphore implementation, choosing + between Posix and SystemV IPC semaphores, in that order.</p></li> + + <li><code>pthread</code> + <p>This is a mutex variant based on cross-process Posix thread + mutexes.</p> + + <div class="warning"><h3>Warning</h3> + <p>On most systems, if a child process terminates abnormally while + holding a mutex that uses this implementation, the server will deadlock + and stop responding to requests. When this occurs, the server will + require a manual restart to recover.</p> + <p>Solaris and Linux are notable exceptions as they provide a mechanism which + usually allows the mutex to be recovered after a child process + terminates abnormally while holding a mutex.</p> + <p>If your system is POSIX compliant or if it implements the + <code>pthread_mutexattr_setrobust_np()</code> function, you may be able + to use the <code>pthread</code> option safely.</p> + </div> + </li> + + <li><code>fcntl:/path/to/mutex</code> + <p>This is a mutex variant where a physical (lock-)file and the + <code>fcntl()</code> function are used as the mutex.</p> + + <div class="warning"><h3>Warning</h3> + <p>When multiple mutexes based on this mechanism are used within + multi-threaded, multi-process environments, deadlock errors (EDEADLK) + can be reported for valid mutex operations if <code>fcntl()</code> + is not thread-aware, such as on Solaris.</p> + </div> + </li> + + <li><code>flock:/path/to/mutex</code> + <p>This is similar to the <code>fcntl:/path/to/mutex</code> method + with the exception that the <code>flock()</code> function is used to + provide file locking.</p></li> + + <li><code>file:/path/to/mutex</code> + <p>This selects the "best" available file locking implementation, + choosing between <code>fcntl</code> and <code>flock</code>, in that + order.</p></li> + </ul> + + <p>Most mechanisms are only available on selected platforms, where the + underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> support it. Mechanisms + which aren't available on all platforms are <em>posixsem</em>, + <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>, + <em>flock</em>, and <em>file</em>.</p> + + <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>, + the path, if provided, is a directory where the lock file will be created. + The default directory is httpd's run-time file directory relative to + <code class="directive"><a href="#serverroot">ServerRoot</a></code>. Always use a local disk + filesystem for <code>/path/to/mutex</code> and never a directory residing + on a NFS- or AFS-filesystem. The basename of the file will be the mutex + type, an optional instance string provided by the module, and unless the + <code>OmitPID</code> keyword is specified, the process id of the httpd + parent process will be appended to make the file name unique, avoiding + conflicts when multiple httpd instances share a lock file directory. For + example, if the mutex name is <code>mpm-accept</code> and the lock file + directory is <code>/var/httpd/locks</code>, the lock file name for the + httpd instance with parent process id 12345 would be + <code>/var/httpd/locks/mpm-accept.12345</code>.</p> + + <div class="warning"><h3>Security</h3> + <p>It is best to <em>avoid</em> putting mutex files in a world-writable + directory such as <code>/var/tmp</code> because someone could create + a denial of service attack and prevent the server from starting by + creating a lockfile with the same name as the one the server will try + to create.</p> + </div> + + <p>The following table documents the names of mutexes used by httpd + and bundled modules.</p> + + <table class="bordered"><tr class="header"> + <th>Mutex name</th> + <th>Module(s)</th> + <th>Protected resource</th> + </tr> +<tr> + <td><code>mpm-accept</code></td> + <td><code class="module"><a href="../mod/prefork.html">prefork</a></code> and <code class="module"><a href="../mod/worker.html">worker</a></code> MPMs</td> + <td>incoming connections, to avoid the thundering herd problem; + for more information, refer to the + <a href="../misc/perf-tuning.html">performance tuning</a> + documentation</td> + </tr> +<tr class="odd"> + <td><code>authdigest-client</code></td> + <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td> + <td>client list in shared memory</td> + </tr> +<tr> + <td><code>authdigest-opaque</code></td> + <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td> + <td>counter in shared memory</td> + </tr> +<tr class="odd"> + <td><code>ldap-cache</code></td> + <td><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code></td> + <td>LDAP result cache</td> + </tr> +<tr> + <td><code>rewrite-map</code></td> + <td><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></td> + <td>communication with external mapping programs, to avoid + intermixed I/O from multiple requests</td> + </tr> +<tr class="odd"> + <td><code>ssl-cache</code></td> + <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td> + <td>SSL session cache</td> + </tr> +<tr> + <td><code>ssl-stapling</code></td> + <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td> + <td>OCSP stapling response cache</td> + </tr> +<tr class="odd"> + <td><code>watchdog-callback</code></td> + <td><code class="module"><a href="../mod/mod_watchdog.html">mod_watchdog</a></code></td> + <td>callback function of a particular client module</td> + </tr> +</table> + + <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd + parent process id from the lock file name.</p> + + <p>In the following example, the mutex mechanism for the MPM accept + mutex will be changed from the compiled-in default to <code>fcntl</code>, + with the associated lock file created in directory + <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes + will be changed from the compiled-in default to <code>sysvsem</code>.</p> + + <pre class="prettyprint lang-config">Mutex sysvsem default +Mutex fcntl:/var/httpd/locks mpm-accept</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>DEPRECATED: Designates an IP address for name-virtual +hosting</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + +<p>Prior to 2.3.11, <code class="directive">NameVirtualHost</code> was required +to instruct the server that a particular IP address and port combination +was usable as a name-based virtual host. In 2.3.11 and later, +any time an IP address and port combination is used in multiple virtual +hosts, name-based virtual hosting is automatically enabled for that address.</p> + +<p>This directive currently has no effect.</p> + +<h3>See also</h3> +<ul> +<li><a href="../vhosts/">Virtual Hosts +documentation</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular +directory</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options + [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options FollowSymlinks</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The default was changed from All to FollowSymlinks in 2.3.11</td></tr> +</table> + <p>The <code class="directive">Options</code> directive controls which + server features are available in a particular directory.</p> + + <p><var>option</var> can be set to <code>None</code>, in which + case none of the extra features are enabled, or one or more of + the following:</p> + + <dl> + <dt><code>All</code></dt> + + <dd>All options except for <code>MultiViews</code>.</dd> + + <dt><code>ExecCGI</code></dt> + + <dd> + Execution of CGI scripts using <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> + is permitted.</dd> + + <dt><code>FollowSymLinks</code></dt> + + <dd> + The server will follow symbolic links in this directory. This is + the default setting. + <div class="note"> + <p>Even though the server follows the symlink it does <em>not</em> + change the pathname used to match against <code class="directive"><a href="#directory"><Directory></a></code> sections.</p> + + <p>The <code>FollowSymLinks</code> and + <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory"><Directory></a></code> sections or + <code>.htaccess</code> files.</p> + + <p>Omitting this option should not be considered a security restriction, + since symlink testing is subject to race conditions that make it + circumventable.</p> + </div></dd> + + <dt><code>Includes</code></dt> + + <dd> + Server-side includes provided by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + are permitted.</dd> + + <dt><code>IncludesNOEXEC</code></dt> + + <dd> + + Server-side includes are permitted, but the <code>#exec + cmd</code> and <code>#exec cgi</code> are disabled. It is still + possible to <code>#include virtual</code> CGI scripts from + <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed + directories.</dd> + + <dt><code>Indexes</code></dt> + + <dd> + If a URL which maps to a directory is requested and there + is no <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> + (<em>e.g.</em>, <code>index.html</code>) in that directory, then + <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing + of the directory.</dd> + + <dt><code>MultiViews</code></dt> + + <dd> + <a href="../content-negotiation.html">Content negotiated</a> + "MultiViews" are allowed using + <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>. + <div class="note"><h3>Note</h3> <p>This option gets ignored if set + anywhere other than <code class="directive"><a href="#directory"><Directory></a></code>, as <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> + needs real resources to compare against and evaluate from.</p></div> + </dd> + + <dt><code>SymLinksIfOwnerMatch</code></dt> + + <dd>The server will only follow symbolic links for which the + target file or directory is owned by the same user id as the + link. + + <div class="note"><h3>Note</h3> + <p>The <code>FollowSymLinks</code> and + <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory"><Directory></a></code> sections or + <code>.htaccess</code> files.</p> + + <p>This option should not be considered a security restriction, + since symlink testing is subject to race conditions that make it + circumventable.</p> + </div> </dd> + </dl> + + <p>Normally, if multiple <code class="directive">Options</code> could + apply to a directory, then the most specific one is used and + others are ignored; the options are not merged. (See <a href="../sections.html#merging">how sections are merged</a>.) + However if <em>all</em> the options on the + <code class="directive">Options</code> directive are preceded by a + <code>+</code> or <code>-</code> symbol, the options are + merged. Any options preceded by a <code>+</code> are added to the + options currently in force, and any options preceded by a + <code>-</code> are removed from the options currently in + force. </p> + + <div class="note"><h3>Note</h3> + <p>Mixing <code class="directive">Options</code> with a <code>+</code> or + <code>-</code> with those without is not valid syntax and will be + rejected during server startup by the syntax check with an abort.</p> + </div> + + <p>For example, without any <code>+</code> and <code>-</code> symbols:</p> + + <pre class="prettyprint lang-config"><Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options Includes +</Directory></pre> + + + <p>then only <code>Includes</code> will be set for the + <code>/web/docs/spec</code> directory. However if the second + <code class="directive">Options</code> directive uses the <code>+</code> and + <code>-</code> symbols:</p> + + <pre class="prettyprint lang-config"><Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options +Includes -Indexes +</Directory></pre> + + + <p>then the options <code>FollowSymLinks</code> and + <code>Includes</code> are set for the <code>/web/docs/spec</code> + directory.</p> + + <div class="note"><h3>Note</h3> + <p>Using <code>-IncludesNOEXEC</code> or + <code>-Includes</code> disables server-side includes completely + regardless of the previous setting.</p> + </div> + + <p>The default in the absence of any other settings is + <code>FollowSymlinks</code>.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocol for a listening socket</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocol <var>protocol</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1.5 and later. +On Windows, from Apache 2.3.3 and later.</td></tr> +</table> + <p>This directive specifies the protocol used for a specific listening socket. + The protocol is used to determine which module should handle a request and + to apply protocol specific optimizations with the <code class="directive">AcceptFilter</code> + directive.</p> + + <p>This directive not required for most + configurations. If not specified, <code>https</code> is the default for + port 443 and <code>http</code> the default for all other ports. The + protocol is used to determine which module should handle a request, and + to apply protocol specific optimizations with the + <code class="directive"><a href="#acceptfilter">AcceptFilter</a></code> directive.</p> + + <p>For example, if you are running <code>https</code> on a non-standard port, + specify the protocol explicitly:</p> + + <pre class="prettyprint lang-config">Protocol https</pre> + + + <p>You can also specify the protocol using the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Protocols" id="Protocols">Protocols</a> <a name="protocols" id="protocols">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocols available for a server/virtual host</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocols <var>protocol</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Protocols http/1.1</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr> +</table> + <p>This directive specifies the list of protocols supported for a + server/virtual host. The list determines the allowed protocols + a client may negotiate for this server/host.</p> + + <p>You need to set protocols if you want to extend the available + protocols for a server/host. By default, only the http/1.1 protocol + (which includes the compatibility with 1.0 and 0.9 clients) is + allowed.</p> + + <p>For example, if you want to support HTTP/2 for a server with TLS, + specify:</p> + + <pre class="prettyprint lang-config">Protocols h2 http/1.1</pre> + + + <p>Valid protocols are <code>http/1.1</code> for http and https connections, + <code>h2</code> on https connections and <code>h2c</code> for http + connections. Modules may enable more protocols.</p> + + <p>It is safe to specify protocols that are unavailable/disabled. Such + protocol names will simply be ignored.</p> + + <p>Protocols specified in base servers are inherited for virtual hosts + only if the virtual host has no own Protocols directive. Or, the other + way around, Protocols directives in virtual hosts replace any + such directive in the base server. + </p> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#protocolshonororder">ProtocolsHonorOrder</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ProtocolsHonorOrder" id="ProtocolsHonorOrder">ProtocolsHonorOrder</a> <a name="protocolshonororder" id="protocolshonororder">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines if order of Protocols determines precedence during negotiation</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProtocolsHonorOrder On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProtocolsHonorOrder On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr> +</table> + <p>This directive specifies if the server should honor the order in which + the <code class="directive">Protocols</code> directive lists protocols.</p> + + <p>If configured Off, the client supplied list order of protocols has + precedence over the order in the server configuration.</p> + + <p>With <code class="directive">ProtocolsHonorOrder</code> set to <code>on</code> + (default), the client ordering does not matter and only the ordering + in the server settings influences the outcome of the protocol + negotiation.</p> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#protocols">Protocols</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="QualifyRedirectURL" id="QualifyRedirectURL">QualifyRedirectURL</a> <a name="qualifyredirecturl" id="qualifyredirecturl">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether the REDIRECT_URL environment variable is + fully qualified</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>QualifyRedirectURL On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>QualifyRedirectURL Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL On' was configured.</td></tr> +</table> + <p>This directive controls whether the server will ensure that the + REDIRECT_URL environment variable is fully qualified. By default, + the variable contains the verbatim URL requested by the client, + such as "/index.html". With <code class="directive">QualifyRedirectURL On</code>, the same request would result in a + value such as "http://www.example.com/index.html".</p> + <p>Even without this directive set, when a request is issued against a + fully qualified URL, REDIRECT_URL will remain fully qualified. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ReadBufferSize" id="ReadBufferSize">ReadBufferSize</a> <a name="readbuffersize" id="readbuffersize">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Size of the buffers used to read data</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ReadBufferSize <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ReadBufferSize 8192</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.27 and later</td></tr> +</table> + <p>This directive allows to configure the size (in bytes) of the memory + buffer used to read data from the network or files.</p> + + <p>A larger buffer can increase peformances with larger data, but consumes + more memory per connection. The minimum configurable size is + <var>1024</var>.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RegexDefaultOptions" id="RegexDefaultOptions">RegexDefaultOptions</a> <a name="regexdefaultoptions" id="regexdefaultoptions">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Allow to configure global/default options for regexes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RegexDefaultOptions [none] [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>RegexDefaultOptions DOTALL DOLLAR_ENDONLY</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only available from Apache 2.4.30 and later.</td></tr> +</table> + <p>This directive adds some default behavior to ANY regular expression + used afterwards.</p> + + <p>Any option preceded by a '+' is added to the already set options.<br /> + Any option preceded by a '-' is removed from the already set options.<br /> + Any option without a '+' or a '-' will be set, removing any other + already set option.<br /> + The <code>none</code> keyword resets any already set options.</p> + + <p><var>option</var> can be:</p> + <dl> + <dt><code>ICASE</code></dt> + <dd>Use a case-insensitive match.</dd> + + <dt><code>EXTENDED</code></dt> + <dd>Perl's /x flag, ignore (unescaped-)spaces and comments in the pattern.</dd> + + <dt><code>DOTALL</code></dt> + <dd>Perl's /s flag, '.' matches newline characters.</dd> + + <dt><code>DOLLAR_ENDONLY</code></dt> + <dd>'$' matches at end of subject string only.</dd> + </dl> + <pre class="prettyprint lang-config"># Add the ICASE option for all regexes by default +RegexDefaultOptions +ICASE +... +# Remove the default DOLLAR_ENDONLY option, but keep any other one +RegexDefaultOptions -DOLLAR_ENDONLY +... +# Set the DOTALL option only, resetting any other one +RegexDefaultOptions DOTALL +... +# Reset all defined options +RegexDefaultOptions none +...</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a> <a name="registerhttpmethod" id="registerhttpmethod">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Register non-standard HTTP methods</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.4.24 and later</td></tr> +</table> +<p>This directive may be used to register additional HTTP methods. This is +necessary if non-standard methods need to be used with directives that accept +method names as parameters, or to allow particular non-standard methods to be +used via proxy or CGI script when the server has been configured to only pass +recognized methods to modules.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#httpprotocoloptions">HTTPProtocolOptions</a></code></li> +<li><code class="directive"><a href="../mod/mod_allowmethods.html#allowmethods">AllowMethods</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched +by Apache httpd children</td></tr> +<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> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or <code>max</code> to indicate to the server that the limit should + be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as <code>root</code> or in the initial startup + phase.</p> + + <p>This applies to processes forked from Apache httpd children + servicing requests, not the Apache httpd children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked from the Apache httpd parent, such as piped + logs.</p> + + <p>CPU resource limits are expressed in seconds per + process.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched +by Apache httpd children</td></tr> +<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> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or <code>max</code> to indicate to the server that the limit should + be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as <code>root</code> or in the initial startup + phase.</p> + + <p>This applies to processes forked from Apache httpd children + servicing requests, not the Apache httpd children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked from the Apache httpd parent, such as piped + logs.</p> + + <p>Memory resource limits are expressed in bytes per + process.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by +processes launched by Apache httpd children</td></tr> +<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> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes, and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or <code>max</code> to indicate to the server that the limit + should be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as <code>root</code> or in the initial startup + phase.</p> + + <p>This applies to processes forked from Apache httpd children + servicing requests, not the Apache httpd children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked from the Apache httpd parent, such as piped + logs.</p> + + <p>Process limits control the number of processes per user.</p> + + <div class="note"><h3>Note</h3> + <p>If CGI processes are <strong>not</strong> running + under user ids other than the web server user id, this directive + will limit the number of processes that the server itself can + create. Evidence of this situation will be indicated by + <strong><code>cannot fork</code></strong> messages in the + <code>error_log</code>.</p> + </div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI +scripts</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only.</td></tr> +</table> + <p>This directive is used to control how Apache httpd finds the + interpreter used to run CGI scripts. The default setting is + <code>Script</code>. This causes Apache httpd to use the interpreter pointed to + by the shebang line (first line, starting with <code>#!</code>) in the + script. On Win32 systems this line usually looks like:</p> + + <pre class="prettyprint lang-perl">#!C:/Perl/bin/perl.exe</pre> + + + <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p> + + <pre class="prettyprint lang-perl">#!perl</pre> + + + <p>Setting <code>ScriptInterpreterSource Registry</code> will + cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be + searched using the script file extension (e.g., <code>.pl</code>) as a + search key. The command defined by the registry subkey + <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey + <code>Shell\Open\Command</code> is used to open the script file. If the + registry keys cannot be found, Apache httpd falls back to the behavior of the + <code>Script</code> option.</p> + + <div class="warning"><h3>Security</h3> + <p>Be careful when using <code>ScriptInterpreterSource + Registry</code> with <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because + Apache httpd will try to execute <strong>every</strong> file within this + directory. The <code>Registry</code> setting may cause undesired + program calls on files which are typically not executed. For + example, the default open command on <code>.htm</code> files on + most Windows systems will execute Microsoft Internet Explorer, so + any HTTP request for an <code>.htm</code> file existing within the + script directory would start the browser in the background on the + server. This is a good way to crash your system within a minute or + so.</p> + </div> + + <p>The option <code>Registry-Strict</code> + does the same thing as <code>Registry</code> but uses only the + subkey <code>Shell\ExecCGI\Command</code>. The + <code>ExecCGI</code> key is not a common one. It must be + configured manually in the windows registry and hence prevents + accidental program calls on your system.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine if mod_status displays the first 63 characters +of a request or the last 63, assuming the request itself is greater than +63 chars.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SeeRequestTail On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SeeRequestTail Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.2.7 and later.</td></tr> +</table> + <p><code class="module"><a href="../mod/mod_status.html">mod_status</a></code> with <code>ExtendedStatus On</code> + displays the actual request being handled. + For historical purposes, only 63 characters of the request + are actually stored for display purposes. This directive + controls whether the first 63 characters are stored (the previous + behavior and the default) or if the last 63 characters are. This + is only applicable, of course, if the length of the request is + 64 characters or greater.</p> + + <p>If Apache httpd is handling <code>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</code> <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> displays as follows: + </p> + + <table class="bordered"> + <tr> + <th>Off (default)</th> + <td>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples</td> + </tr> + <tr> + <th>On</th> + <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</td> + </tr> + </table> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error +messages sent to the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerAdmin</code> sets the contact address + that the server includes in any error messages it returns to the + client. If the <code>httpd</code> doesn't recognize the supplied argument + as an URL, it + assumes, that it's an <var>email-address</var> and prepends it with + <code>mailto:</code> in hyperlink targets. However, it's recommended to + actually use an email address, since there are a lot of CGI scripts that + make that assumption. If you want to use an URL, it should point to another + server under your control. Otherwise users may not be able to contact you in + case of errors.</p> + + <p>It may be worth setting up a dedicated address for this, e.g.</p> + + <pre class="prettyprint lang-config">ServerAdmin www-admin@foo.example.com</pre> + + <p>as users do not always mention that they are talking about the + server!</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests +to name-virtual hosts</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerAlias</code> directive sets the + alternate names for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>. The + <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p> + + <pre class="prettyprint lang-config"><VirtualHost *:80> + ServerName server.example.com + ServerAlias server server2.example.com server2 + ServerAlias *.example.com + UseCanonicalName Off + # ... +</VirtualHost></pre> + + + <p>Name-based virtual hosts for the best-matching set of <code class="directive"><a href="#virtualhost"><virtualhost></a></code>s are processed + in the order they appear in the configuration. The first matching <code class="directive"><a href="#servername">ServerName</a></code> or <code class="directive"><a href="#serveralias">ServerAlias</a></code> is used, with no different precedence for wildcards + (nor for ServerName vs. ServerAlias). </p> + + <p>The complete list of names in the <code class="directive"><a href="#virtualhost"><VirtualHost></a></code> + directive are treated just like a (non wildcard) + <code class="directive">ServerAlias</code>.</p> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hostname and port that the server uses to identify +itself</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerName [<var>scheme</var>://]<var>domain-name</var>|<var>ip-address</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerName</code> directive sets the + request scheme, hostname and port that the server uses to identify itself. + </p> + + <p><code class="directive">ServerName</code> is used (possibly + in conjunction with <code class="directive"><a href="#serveralias">ServerAlias</a></code>) to uniquely + identify a virtual host, when using <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p> + + <p>Additionally, this is used when + creating self-referential redirection URLs when + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> is set to a non-default + value.</p> + + <p>For example, if the name of the + machine hosting the web server is <code>simple.example.com</code>, + but the machine also has the DNS alias <code>www.example.com</code> + and you wish the web server to be so identified, the following + directive should be used:</p> + + <pre class="prettyprint lang-config">ServerName www.example.com</pre> + + + <p>The <code class="directive">ServerName</code> directive + may appear anywhere within the definition of a server. However, + each appearance overrides the previous appearance (within that + server).</p> + + <p>If no <code class="directive">ServerName</code> is specified, the + server attempts to deduce the client visible hostname by first asking + the operating system for the system hostname, and if that fails, + performing a reverse lookup on an IP address present on the system.</p> + + <p>If no port is specified in the + <code class="directive">ServerName</code>, then the server will use the + port from the incoming request. For optimal reliability and + predictability, you should specify an explicit hostname and port + using the <code class="directive">ServerName</code> directive.</p> + + <p>If you are using <a href="../vhosts/name-based.html">name-based virtual hosts</a>, + the <code class="directive">ServerName</code> inside a + <code class="directive"><a href="#virtualhost"><VirtualHost></a></code> + section specifies what hostname must appear in the request's + <code>Host:</code> header to match this virtual host.</p> + + <p>Sometimes, the server runs behind a device that processes SSL, + such as a reverse proxy, load balancer or SSL offload + appliance. When this is the case, specify the + <code>https://</code> scheme and the port number to which the + clients connect in the <code class="directive">ServerName</code> directive + to make sure that the server generates the correct + self-referential URLs. + </p> + + <p>See the description of the + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and + <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for + settings which determine whether self-referential URLs (e.g., by the + <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> module) will refer to the + specified port, or to the port number given in the client's request. + </p> + + <div class="warning"> + <p>Failure to set <code class="directive">ServerName</code> to a name that + your server can resolve to an IP address will result in a startup + warning. <code>httpd</code> will then use whatever hostname it can + determine, using the system's <code>hostname</code> command. This + will almost never be the hostname you actually want.</p> + <div class="example"><p><code> + httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName + </code></p></div> + </div> + + +<h3>See also</h3> +<ul> +<li><a href="../dns-caveats.html">Issues Regarding DNS and + Apache HTTP Server</a></li> +<li><a href="../vhosts/">Apache HTTP Server virtual host + documentation</a></li> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Legacy URL pathname for a name-based virtual host that +is accessed by an incompatible browser</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerPath</code> directive sets the legacy + URL pathname for a host, for use with <a href="../vhosts/">name-based virtual hosts</a>.</p> + +<h3>See also</h3> +<ul> +<li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server installation</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerRoot</code> directive sets the + directory in which the server lives. Typically it will contain the + subdirectories <code>conf/</code> and <code>logs/</code>. Relative + paths in other configuration directives (such as <code class="directive"><a href="#include">Include</a></code> or <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>, for example) are taken as + relative to this directory.</p> + + <pre class="prettyprint lang-config">ServerRoot "/home/httpd"</pre> + + + <p>The default location of <code class="directive">ServerRoot</code> may be + modified by using the <code>--prefix</code> argument to + <a href="../programs/configure.html"><code>configure</code></a>, and + most third-party distributions of the server have a different + default location from the one listed above.</p> + + +<h3>See also</h3> +<ul> +<li><a href="../invoking.html">the <code>-d</code> + option to <code>httpd</code></a></li> +<li><a href="../misc/security_tips.html#serverroot">the + security tips</a> for information on how to properly set + permissions on the <code class="directive">ServerRoot</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the footer on server-generated documents</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerSignature Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerSignature</code> directive allows the + configuration of a trailing footer line under server-generated + documents (error messages, <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> ftp directory + listings, <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> output, ...). The reason why you + would want to enable such a footer line is that in a chain of proxies, + the user often has no possibility to tell which of the chained servers + actually produced a returned error message.</p> + + <p>The <code>Off</code> + setting, which is the default, suppresses the footer line. + The <code>On</code> setting simply adds a line with the + server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host, + and the <code>EMail</code> setting additionally creates a + "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced + document.</p> + + <p>The details of the server version number + presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the <code>Server</code> HTTP response +header</td></tr> +<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> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive controls whether <code>Server</code> response + header field which is sent back to clients includes a + description of the generic OS-type of the server as well as + information about compiled-in modules.</p> + + <dl> + <dt><code>ServerTokens Full</code> (or not specified)</dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2 + (Unix) PHP/4.2.2 MyMod/1.2</code></dd> + + <dt><code>ServerTokens Prod[uctOnly]</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache</code></dd> + + <dt><code>ServerTokens Major</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache/2</code></dd> + + <dt><code>ServerTokens Minor</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache/2.4</code></dd> + + <dt><code>ServerTokens Min[imal]</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache/2.4.2</code></dd> + + <dt><code>ServerTokens OS</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2 + (Unix)</code></dd> + + </dl> + + <p>This setting applies to the entire server, and cannot be + enabled or disabled on a virtualhost-by-virtualhost basis.</p> + + <p>This directive also controls the + information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p> + + <div class="note">Setting <code class="directive">ServerTokens</code> to less than + <code>minimal</code> is not recommended because it makes it more + difficult to debug interoperational problems. Also note that + disabling the Server: header does nothing at all to make your + server more secure. The idea of "security through obscurity" + is a myth and leads to a false sense of safety.</div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be processed by a +handler</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetHandler <var>handler-name</var>|none|<var>expression</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>expression argument 2.4.19 and later</td></tr> +</table> + <p>When placed into an <code>.htaccess</code> file or a + <code class="directive"><a href="#directory"><Directory></a></code> or + <code class="directive"><a href="#location"><Location></a></code> + section, this directive forces all matching files to be parsed + through the <a href="../handler.html">handler</a> given by + <var>handler-name</var>. For example, if you had a directory you + wanted to be parsed entirely as imagemap rule files, regardless + of extension, you might put the following into an + <code>.htaccess</code> file in that directory:</p> + + <pre class="prettyprint lang-config">SetHandler imap-file</pre> + + + <p>Another example: if you wanted to have the server display a + status report whenever a URL of + <code>http://servername/status</code> was called, you might put + the following into <code>httpd.conf</code>:</p> + + <pre class="prettyprint lang-config"><Location "/status"> + SetHandler server-status +</Location></pre> + + + <p>You could also use this directive to configure a particular + handler for files with a particular file extension. For example:</p> + + <pre class="prettyprint lang-config"><FilesMatch "\.php$"> + SetHandler application/x-httpd-php +</FilesMatch></pre> + + + <p>String-valued expressions can be used to reference per-request + variables, including backreferences to named regular expressions:</p> + + <pre class="prettyprint lang-config"><LocationMatch ^/app/(?<sub>[^/]+)/> + SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080" +</LocationMatch></pre> + + + <p>You can override an earlier defined <code class="directive">SetHandler</code> + directive by using the value <code>None</code>.</p> + + <div class="note"><h3>Note</h3> + <p>Because <code class="directive">SetHandler</code> overrides default handlers, + normal behavior such as handling of URLs ending in a slash (/) as + directories or index files is suppressed.</p></div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process client requests and POST +input</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">SetInputFilter</code> directive sets the + filter or filters which will process client requests and POST + input when they are received by the server. This is in addition to + any filters defined elsewhere, including the + <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code> + directive.</p> + + <p>If more than one filter is specified, they must be separated + by semicolons in the order in which they should process the + content.</p> + +<h3>See also</h3> +<ul> +<li><a href="../filter.html">Filters</a> documentation</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the +server</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">SetOutputFilter</code> directive sets the filters + which will process responses from the server before they are + sent to the client. This is in addition to any filters defined + elsewhere, including the + <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code> + directive.</p> + + <p>For example, the following configuration will process all files + in the <code>/www/data/</code> directory for server-side + includes.</p> + + <pre class="prettyprint lang-config"><Directory "/www/data/"> + SetOutputFilter INCLUDES +</Directory></pre> + + + <p>If more than one filter is specified, they must be separated + by semicolons in the order in which they should process the + content.</p> + +<h3>See also</h3> +<ul> +<li><a href="../filter.html">Filters</a> documentation</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="StrictHostCheck" id="StrictHostCheck">StrictHostCheck</a> <a name="stricthostcheck" id="stricthostcheck">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether the server requires the requested hostname be + listed enumerated in the virtual host handling the request + </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>StrictHostCheck ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>StrictHostCheck OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Added in 2.4.49</td></tr> +</table> + <p>By default, the server will respond to requests for any hostname, + including requests addressed to unexpected or unconfigured hostnames. + While this is convenient, it is sometimes desirable to limit what hostnames + a backend application handles since it will often generate self-referential + responses.</p> + + <p>By setting <code class="directive">StrictHostCheck</code> to <em>ON</em>, + the server will return an HTTP 400 error if the requested hostname + hasn't been explicitly listed by either <code class="directive"><a href="#servername">ServerName</a></code> or <code class="directive"><a href="#serveralias">ServerAlias</a></code> in the virtual host that best matches the + details of the incoming connection.</p> + + <p>This directive also allows matching of the requested hostname to hostnames + specified within the opening <code class="directive"><a href="#virtualhost">VirtualHost</a></code> + tag, which is a relatively obscure configuration mechanism that acts like + additional <code class="directive"><a href="#serveralias">ServerAlias</a></code> entries.</p> + + <p>This directive has no affect in non-default virtual hosts. The value + inherited from the global server configuration, or the default virtualhost + for the ip:port the underlying connection, determine the effective value.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for +certain events before failing a request</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 60</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">TimeOut</code> directive defines the length + of time Apache httpd will wait for I/O in various circumstances:</p> + + <ul> + <li><p>When reading data from the client, the length of time to + wait for a TCP packet to arrive if the read buffer is + empty.</p> + <p> For initial data on a new connection, this directive doesn't + take effect until after any configured <code class="directive"><a href="#acceptfilter"> + AcceptFilter</a></code> has passed the new connection to the server.</p> + </li> + + <li>When writing data to the client, the length of time to wait + for an acknowledgement of a packet if the send buffer is + full.</li> + + <li>In <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> and <code class="module"><a href="../mod/mod_cgid.html">mod_cgid</a></code>, + the length of time to wait for any individual block of output + from a CGI script.</li> + + <li>In <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to + wait for output from a filtering process.</li> + + <li>In <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if + <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not + configured.</li> + </ul> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behavior on <code>TRACE</code> requests</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>This directive overrides the behavior of <code>TRACE</code> for both + the core server and <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>. The default + <code>TraceEnable on</code> permits <code>TRACE</code> requests per + RFC 2616, which disallows any request body to accompany the request. + <code>TraceEnable off</code> causes the core server and + <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not + allowed) error to the client.</p> + + <p>Finally, for testing and diagnostic purposes only, request + bodies may be allowed using the non-compliant <code>TraceEnable + extended</code> directive. The core (as an origin server) will + restrict the request body to 64Kb (plus 8Kb for chunk headers if + <code>Transfer-Encoding: chunked</code> is used). The core will + reflect the full headers and all chunk headers with the response + body. As a proxy server, the request body is not restricted to 64Kb.</p> + + <div class="note"><h3>Note</h3> + + <p>Despite claims to the contrary, enabling the <code>TRACE</code> + method does not expose any security vulnerability in Apache httpd. + The <code>TRACE</code> method is defined by the HTTP/1.1 + specification and implementations are expected to support it.</p> + + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Undefine the existence of a variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Undoes the effect of a <code class="directive"><a href="#define">Define</a></code> or + of passing a <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p> + <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine"><IfDefine></a></code> sections without needing to alter + <code>-D</code> arguments in any startup scripts.</p> + + <p>Variable names may not contain colon ":" characters, to avoid clashes + with <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>'s syntax.</p> + + <div class="note"><h3>Virtual Host scope and pitfalls</h3> + <p>While this directive is supported in virtual host context, + the changes it makes are visible to any later configuration + directives, beyond any enclosing virtual host.</p> + </div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#define">Define</a></code></li> +<li><code class="directive"><a href="#ifdefine">IfDefine</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and +port</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>In many situations Apache httpd must construct a <em>self-referential</em> + URL -- that is, a URL that refers back to the same server. With + <code>UseCanonicalName On</code> Apache httpd will use the hostname and port + specified in the <code class="directive"><a href="#servername">ServerName</a></code> + directive to construct the canonical name for the server. This name + is used in all self-referential URLs, and for the values of + <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p> + + <p>With <code>UseCanonicalName Off</code> Apache httpd will form + self-referential URLs using the hostname and port supplied by + the client if any are supplied (otherwise it will use the + canonical name, as defined above). These values are the same + that are used to implement <a href="../vhosts/name-based.html">name-based virtual hosts</a> + and are available with the same clients. The CGI variables + <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be + constructed from the client supplied values as well.</p> + + <p>An example where this may be useful is on an intranet server + where you have users connecting to the machine using short + names such as <code>www</code>. You'll notice that if the users + type a shortname and a URL which is a directory, such as + <code>http://www/splat</code>, <em>without the trailing + slash</em>, then Apache httpd will redirect them to + <code>http://www.example.com/splat/</code>. If you have + authentication enabled, this will cause the user to have to + authenticate twice (once for <code>www</code> and once again + for <code>www.example.com</code> -- see <a href="http://wiki.apache.org/httpd/FAQ#Why_does_Apache_ask_for_my_password_twice_before_serving_a_file.3F"> + the FAQ on this subject for more information</a>). But if + <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then + Apache httpd will redirect to <code>http://www/splat/</code>.</p> + + <p>There is a third option, <code>UseCanonicalName DNS</code>, + which is intended for use with mass IP-based virtual hosting to + support ancient clients that do not provide a + <code>Host:</code> header. With this option, Apache httpd does a + reverse DNS lookup on the server IP address that the client + connected to in order to work out self-referential URLs.</p> + + <div class="warning"><h3>Warning</h3> + <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>, + they may be broken by this option. The client is essentially free + to give whatever value they want as a hostname. But if the CGI is + only using <code>SERVER_NAME</code> to construct self-referential URLs, + then it should be just fine.</p> + </div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own port</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>In many situations Apache httpd must construct a <em>self-referential</em> + URL -- that is, a URL that refers back to the same server. With + <code>UseCanonicalPhysicalPort On</code>, Apache httpd will, when + constructing the canonical port for the server to honor + the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive, + provide the actual physical port number being used by this request + as a potential port. With <code>UseCanonicalPhysicalPort Off</code>, + Apache httpd will not ever use the actual physical port number, instead + relying on all configured information to construct a valid port number.</p> + + <div class="note"><h3>Note</h3> + <p>The ordering of the lookup when the physical port is used is as + follows:</p> + <dl> + <dt><code>UseCanonicalName On</code></dt> + <dd> + <ol> + <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li> + <li>Physical port</li> + <li>Default port</li> + </ol> + </dd> + <dt><code>UseCanonicalName Off | DNS</code></dt> + <dd> + <ol> + <li>Parsed port from <code>Host:</code> header</li> + <li>Physical port</li> + <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li> + <li>Default port</li> + </ol> + </dd> + </dl> + + <p>With <code>UseCanonicalPhysicalPort Off</code>, the + physical ports are removed from the ordering.</p> + </div> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a> <a name="virtualhost" id="virtualhost">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific +hostname or IP address</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><VirtualHost + <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]] + ...> ... </VirtualHost></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><VirtualHost></code> and + <code></VirtualHost></code> are used to enclose a group of + directives that will apply only to a particular virtual host. Any + directive that is allowed in a virtual host context may be + used. When the server receives a request for a document on a + particular virtual host, it uses the configuration directives + enclosed in the <code class="directive"><VirtualHost></code> + section. <var>Addr</var> can be any of the following, optionally followed by + a colon and a port number (or *):</p> + + <ul> + <li>The IP address of the virtual host;</li> + + <li>A fully qualified domain name for the IP address of the + virtual host (not recommended);</li> + + <li>The character <code>*</code>, which acts as a wildcard and matches + any IP address.</li> + + <li>The string <code>_default_</code>, which is an alias for <code>*</code></li> + + </ul> + + <pre class="prettyprint lang-config"><VirtualHost 10.1.2.3:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost></pre> + + + + <p>IPv6 addresses must be specified in square brackets because + the optional port number could not be determined otherwise. An + IPv6 example is shown below:</p> + + <pre class="prettyprint lang-config"><VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost></pre> + + + <p>Each Virtual Host must correspond to a different IP address, + different port number, or a different host name for the server, + in the former case the server machine must be configured to + accept IP packets for multiple addresses. (If the machine does + not have multiple network interfaces, then this can be + accomplished with the <code>ifconfig alias</code> command -- if + your OS supports it).</p> + + <div class="note"><h3>Note</h3> + <p>The use of <code class="directive"><VirtualHost></code> does + <strong>not</strong> affect what addresses Apache httpd listens on. You + may need to ensure that Apache httpd is listening on the correct addresses + using <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p> + </div> + + <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be + specified inside each <code class="directive"><VirtualHost></code> block. If it is absent, the + <code class="directive"><a href="#servername">ServerName</a></code> from the "main" + server configuration will be inherited.</p> + + <p>When a request is received, the server first maps it to the best matching + <code class="directive"><VirtualHost></code> based on the local + IP address and port combination only. Non-wildcards have a higher + precedence. If no match based on IP and port occurs at all, the + "main" server configuration is used.</p> + + <p>If multiple virtual hosts contain the best matching IP address and port, + the server selects from these virtual hosts the best match based on the + requested hostname. If no matching name-based virtual host is found, + then the first listed virtual host that matched the IP address will be + used. As a consequence, the first listed virtual host for a given IP address + and port combination is the default virtual host for that IP and port + combination.</p> + + <div class="warning"><h3>Security</h3> + <p>See the <a href="../misc/security_tips.html">security tips</a> + document for details on why your security could be compromised if the + directory where log files are stored is writable by anyone other + than the user that starts the server.</p> + </div> + +<h3>See also</h3> +<ul> +<li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li> +<li><a href="../dns-caveats.html">Issues Regarding DNS and + Apache HTTP Server</a></li> +<li><a href="../bind.html">Setting + which addresses and ports Apache HTTP Server uses</a></li> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> 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"> de </a> | +<a href="../en/mod/core.html" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/core.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/mod/core.html.es b/docs/manual/mod/core.html.es new file mode 100644 index 0000000..584c38e --- /dev/null +++ b/docs/manual/mod/core.html.es @@ -0,0 +1,4602 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es"><head> +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>core - Servidor HTTP Apache Versión 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">Módulos</a> | <a href="../mod/directives.html">Directivas</a> | <a href="http://wiki.apache.org/httpd/FAQ">Preguntas Frecuentes</a> | <a href="../glossary.html">Glosario</a> | <a href="../sitemap.html">Mapa del sitio web</a></p> +<p class="apache">Versión 2.4 del Servidor HTTP Apache</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">Servidor HTTP</a> > <a href="http://httpd.apache.org/docs/">Documentación</a> > <a href="../">Versión 2.4</a> > <a href="./">Módulos</a></div> +<div id="page-content"> +<div id="preamble"><h1>Funcionalidad Básica de Apache</h1> +<div class="toplang"> +<p><span>Idiomas disponibles: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate">Esta traducción podría estar + obsoleta. Consulte la versión en inglés de la + documentación para comprobar si se han producido cambios + recientemente.</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Descripción:</a></th><td>Funcionalides básicas del Servidor HTTP Apache que siempre están presentes.</td></tr> +<tr><th><a href="module-dict.html#Status">Estado:</a></th><td>Core</td></tr></table> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">Directivas</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgivar">CGIVar</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxpipelined">FlushMaxPipelined</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxthreshold">FlushMaxThreshold</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#httpprotocoloptions">HttpProtocolOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#if"><If></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdirective"><IfDirective></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#iffile"><IfFile></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifsection"><IfSection></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergeslashes">MergeSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocols">Protocols</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocolshonororder">ProtocolsHonorOrder</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#qualifyredirecturl">QualifyRedirectURL</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#readbuffersize">ReadBufferSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#regexdefaultoptions">RegexDefaultOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#stricthostcheck">StrictHostCheck</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li> +</ul> +<h3>Lista de comprobación de errores corregidos</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd historial de cambios</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=core">Problemas Conocidos</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=core">Reportar un error</a></li></ul><h3>Consulte también</h3> +<ul class="seealso"> +<li><a href="#comments_section">Comentarios</a></li></ul></div> + +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="acceptfilter" id="acceptfilter">Directiva</a> <a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configura mejoras para un Protocolo de Escucha de Sockets</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Disponible en Apache httpd 2.1.5 y posteriores. +En Windows desde Apache httpd 2.3.3 y posteriores.</td></tr> +</table> + <p>Esta directiva hace posible mejoras específicas a nivel de sistema operativo + y a través del tipo de Protocolo para un socket que escucha. + La premisa básica es que el kernel no envíe un socket al servidor + hasta que o bien los datos se hayan recibido o bien se haya almacenado + en el buffer una Respuesta HTTP completa. + Actualmente sólo están soportados + <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9"> + Accept Filters</a> sobre FreeBSD, <code>TCP_DEFER_ACCEPT</code> sobre Linux, + y AcceptEx() sobre Windows.</p> + + <p>El uso de <code>none</code> para un argumento desactiva cualquier filtro + aceptado para ese protocolo. Esto es útil para protocolos que requieren que un + servidor envíe datos primeros, tales como <code>ftp:</code> o <code>nntp</code>:</p> + <div class="example"><p><code>AcceptFilter nntp none</code></p></div> + + <p>Los nombres de protocolo por defecto son <code>https</code> para el puerto 443 + y <code>http</code> para todos los demás puertos. Para especificar que se está + utilizando otro protocolo con un puerto escuchando, añade el argumento <var>protocol</var> + a la directiva <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p> + + <p>Sobre FreeBDS los valores por defecto:</p> + <div class="example"><p><code> + AcceptFilter http httpready <br /> + AcceptFilter https dataready + </code></p></div> + + <p>El filtro <code>httpready</code> almacena en el buffer peticiones HTTP completas + a nivel de kernel. Una vez que la petición es recibida, el kernel la envía al servidor. + Consulta la página man de + <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9"> + accf_http(9)</a> para más detalles. Puesto que las peticiones HTTPS + están encriptadas, sólo se utiliza el filtro + <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">accf_data(9)</a>.</p> + + <p>Sobre Linux los valores por defecto son:</p> + <div class="example"><p><code> + AcceptFilter http data <br /> + AcceptFilter https data + </code></p></div> + + <p>En Linux, <code>TCP_DEFER_ACCEPT</code> no soporta el buffering en peticiones http. + Cualquier valor además de <code>none</code> habilitará + <code>TCP_DEFER_ACCEPT</code> en ese socket. Para más detalles + ver la página man de Linux + <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html"> + tcp(7)</a>.</p> + + <p>Sobre Windows los valores por defecto son:</p> + <div class="example"><p><code> + AcceptFilter http data <br /> + AcceptFilter https data + </code></p></div> + + <p>Sobre Windows mpm_winnt interpreta el argumento AcceptFilter para conmutar la API + AcceptEx(), y no soporta el buffering sobre el protocolo http. Hay dos valores + que utilizan la API Windows AcceptEx() y que recuperan sockets de red + entre conexciones. <code>data</code> espera hasta que los datos han sido + transmitidos como se comentaba anteriormente, y el buffer inicial de datos y las + direcciones de red son recuperadas a partir de una única llamada AcceptEx(). + <code>connect</code> utiliza la API AcceptEx() API, y recupera también + las direcciones de red, pero a diferencia de <code>none</code> + la opción <code>connect</code> no espera a la transmisión inicial de los datos.</p> + + <p>Sobre Windows, <code>none</code> prefiere accept() antes que AcceptEx() + y no recuperará sockets entre las conexiones. Lo que es útil para los adaptadores de + red con un soporte precario de drivers, así como para algunos proveedores de red + tales como drivers vpn, o filtros de spam, de virus o de spyware.</p> + + +<h3>Consulte también</h3> +<ul> +<li><code class="directive">Protocol</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="acceptpathinfo" id="acceptpathinfo">Directiva</a> <a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Los recursos aceptan información sobre su ruta</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AcceptPathInfo Default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Disponible en Apache httpd 2.0.30 y posteriores</td></tr> +</table> + + <p>Esta directiva controla si las peticiones que contienen información sobre la ruta + que sigue un fichero que existe (o un fichero que no existe pero en un directorio que + sí existe) serán aceptadas o denegadas. La información de ruta puede estar disponible + para los scripts en la variable de entorno <code>PATH_INFO</code>.</p> + + <p>Por ejemplo, asumamos que la ubicación <code>/test/</code> apunta a + un directorio que contiene únicamente el fichero + <code>here.html</code>. Entonces, las peticiones tanto para + <code>/test/here.html/more</code> como para + <code>/test/nothere.html/more</code> recogen + <code>/more</code> como <code>PATH_INFO</code>.</p> + + <p>Los tres posibles argumentos para la directiva + <code class="directive">AcceptPathInfo</code> son los siguientes:</p> + <dl> + <dt><code>Off</code></dt><dd>Una petición sólo será aceptada si + se corresponde con una ruta literal que existe. Por lo tanto, una petición + con una información de ruta después del nombre de fichero tal como + <code>/test/here.html/more</code> en el ejemplo anterior devolverá + un error 404 NOT FOUND.</dd> + + <dt><code>On</code></dt><dd>Una petición será aceptada si una + ruta principal de acceso se corresponde con un fichero que existe. El ejemplo + anterior <code>/test/here.html/more</code> será aceptado si + <code>/test/here.html</code> corresponde a un fichero válido.</dd> + + <dt><code>Default</code></dt><dd>La gestión de las peticiones + con información de ruta está determinada por el <a href="../handler.html">controlador</a> responsable de la petición. + El controlador principal para para ficheros normales rechaza por defecto + peticiones <code>PATH_INFO</code>. Los controladores que sirven scripts, tales como <a href="mod_cgi.html">cgi-script</a> e <a href="mod_isapi.html">isapi-handler</a>, normalmente aceptan + <code>PATH_INFO</code> por defecto.</dd> + </dl> + + <p>El objetivo principal de la directiva <code>AcceptPathInfo</code> + es permitirte sobreescribir la opción del controlador + de aceptar or rechazar <code>PATH_INFO</code>. Este tipo de sobreescritura se necesita, + por ejemplo, cuando utilizas un <a href="../filter.html">filtro</a>, tal como + <a href="mod_include.html">INCLUDES</a>, para generar contenido + basado en <code>PATH_INFO</code>. El controlador principal normalmente rechazaría + la petición, de modo que puedes utilizar la siguiente configuración para habilitarla + como script:</p> + + <div class="example"><p><code> + <Files "mypaths.shtml"><br /> + <span class="indent"> + Options +Includes<br /> + SetOutputFilter INCLUDES<br /> + AcceptPathInfo On<br /> + </span> + </Files> + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="accessfilename" id="accessfilename">Directiva</a> <a name="AccessFileName" id="AccessFileName">AccessFileName</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Nombre del fichero distribuido de configuración</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AccessFileName .htaccess</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>Mientras que procesa una petición el servidor busca + el primer fichero de configuración existente dentro de un listado de nombres en + cada directorio de la ruta del documento, si los ficheros distribuidos + de configuración están <a href="#allowoverride">habilitados para ese + directorio</a>. Por ejemplo:</p> + + <div class="example"><p><code> + AccessFileName .acl + </code></p></div> + + <p>antes de servir el documento + <code>/usr/local/web/index.html</code>, el servidor leerá + <code>/.acl</code>, <code>/usr/.acl</code>, + <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code> + para las directivas, salvo que estén deshabilitadas with</p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + AllowOverride None<br /> + </span> + </Directory> + </code></p></div> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Configuration Files</a></li> +<li><a href="../howto/htaccess.html">.htaccess Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="adddefaultcharset" id="adddefaultcharset">Directiva</a> <a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Default charset parameter to be added when a response +content-type is <code>text/plain</code> or <code>text/html</code></td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AddDefaultCharset Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive specifies a default value for the media type + charset parameter (the name of a character encoding) to be added + to a response if and only if the response's content-type is either + <code>text/plain</code> or <code>text/html</code>. This should override + any charset specified in the body of the response via a <code>META</code> + element, though the exact behavior is often dependent on the user's client + configuration. A setting of <code>AddDefaultCharset Off</code> + disables this functionality. <code>AddDefaultCharset On</code> enables + a default charset of <code>iso-8859-1</code>. Any other value is assumed + to be the <var>charset</var> to be used, which should be one of the + <a href="http://www.iana.org/assignments/character-sets">IANA registered + charset values</a> for use in Internet media types (MIME types). + For example:</p> + + <div class="example"><p><code> + AddDefaultCharset utf-8 + </code></p></div> + + <p><code class="directive">AddDefaultCharset</code> should only be used when all + of the text resources to which it applies are known to be in that + character encoding and it is too inconvenient to label their charset + individually. One such example is to add the charset parameter + to resources containing generated content, such as legacy CGI + scripts, that might be vulnerable to cross-site scripting attacks + due to user-provided data being included in the output. Note, however, + that a better solution is to just fix (or delete) those scripts, since + setting a default charset does not protect users that have enabled + the "auto-detect character encoding" feature on their browser.</p> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="allowencodedslashes" id="allowencodedslashes">Directiva</a> <a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determines whether encoded path separators in URLs are allowed to +be passed through</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.0.46 and later</td></tr> +</table> + <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs + which contain encoded path separators (<code>%2F</code> for <code>/</code> + and additionally <code>%5C</code> for <code>\</code> on according systems) + to be used. Normally such URLs are refused with a 404 (Not found) error.</p> + + <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is + mostly useful when used in conjunction with <code>PATH_INFO</code>.</p> + + <div class="note"><h3>Note</h3> + <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>. + Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on + according systems) will be left as such in the otherwise decoded URL + string.</p> + </div> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="allowoverride" id="allowoverride">Directiva</a> <a name="AllowOverride" id="AllowOverride">AllowOverride</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Types of directives that are allowed in +<code>.htaccess</code> files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowOverride All|None|<var>directive-type</var> +[<var>directive-type</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>When the server finds an <code>.htaccess</code> file (as + specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>) + it needs to know which directives declared in that file can override + earlier configuration directives.</p> + + <div class="note"><h3>Only available in <Directory> sections</h3> + <code class="directive">AllowOverride</code> is valid only in + <code class="directive"><a href="#directory"><Directory></a></code> + sections specified without regular expressions, not in <code class="directive"><a href="#location"><Location></a></code>, <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> or + <code class="directive"><a href="#files"><Files></a></code> sections. + </div> + + <p>When this directive is set to <code>None</code>, then + <a href="#accessfilename">.htaccess</a> files are completely ignored. + In this case, the server will not even attempt to read + <code>.htaccess</code> files in the filesystem.</p> + + <p>When this directive is set to <code>All</code>, then any + directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in + <code>.htaccess</code> files.</p> + + <p>The <var>directive-type</var> can be one of the following + groupings of directives.</p> + + <dl> + <dt>AuthConfig</dt> + + <dd> + + Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>, + <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>, + <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> + + <dt>FileInfo</dt> + + <dd> + Allow use of the directives controlling document types + (<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>, + <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 + <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives), + document meta data (<code class="directive"><a href="../mod/mod_headers.html#header">Header</a></code>, <code class="directive"><a href="../mod/mod_headers.html#requestheader">RequestHeader</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvif">SetEnvIf</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookieexpires">CookieExpires</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiedomain">CookieDomain</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiestyle">CookieStyle</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookietracking">CookieTracking</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiename">CookieName</a></code>), + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> directives <code class="directive"><a href="../mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>) and + <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> from + <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>. + </dd> + + <dt>Indexes</dt> + + <dd> + Allow use of the directives controlling directory indexing + (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#fancyindexing">FancyIndexing</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code>, + <em>etc.</em>).</dd> + + <dt>Limit</dt> + + <dd> + Allow use of the directives controlling host access (<code class="directive"><a href="../mod/mod_authz_host.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_authz_host.html#deny">Deny</a></code> and <code class="directive"><a href="../mod/mod_authz_host.html#order">Order</a></code>).</dd> + + <dt>Options[=<var>Option</var>,...]</dt> + + <dd> + Allow use of the directives controlling specific directory + features (<code class="directive"><a href="#options">Options</a></code> and + <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>). + An equal sign may be given followed by a comma (but no spaces) + separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.</dd> + </dl> + + <p>Example:</p> + + <div class="example"><p><code> + AllowOverride AuthConfig Indexes + </code></p></div> + + <p>In the example above all directives that are neither in the group + <code>AuthConfig</code> nor <code>Indexes</code> cause an internal + server error.</p> + + <div class="note"><p>For security and performance reasons, do not set + <code>AllowOverride</code> to anything other than <code>None</code> + in your <code><Directory /></code> block. Instead, find (or + create) the <code><Directory></code> block that refers to the + directory where you're actually planning to place a + <code>.htaccess</code> file.</p> + </div> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><a href="../configuring.html">Configuration Files</a></li> +<li><a href="../howto/htaccess.html">.htaccess Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="allowoverridelist" id="allowoverridelist">Directiva</a> <a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Individual directives that are allowed in +<code>.htaccess</code> files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowOverrideList None|<var>directive</var> +[<var>directive-type</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AllowOverrideList None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Configuration Files</a></li> +<li><a href="../howto/htaccess.html">.htaccess Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="cgimapextension" id="cgimapextension">Directiva</a> <a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Technique for locating the interpreter for CGI +scripts</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>NetWare only</td></tr> +</table> + <p>This directive is used to control how Apache httpd finds the + interpreter used to run CGI scripts. For example, setting + <code>CGIMapExtension sys:\foo.nlm .foo</code> will + cause all CGI script files with a <code>.foo</code> extension to + be passed to the FOO interpreter.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="cgipassauth" id="cgipassauth">Directiva</a> <a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables passing HTTP authorization headers to scripts as CGI +variables</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>CGIPassAuth On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>CGIPassAuth Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>AuthConfig</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.4.13 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="cgivar" id="cgivar">Directiva</a> <a name="CGIVar" id="CGIVar">CGIVar</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Controls how some CGI variables are set</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>CGIVar <var>variable</var> <var>rule</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.4.21 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="contentdigest" id="contentdigest">Directiva</a> <a name="ContentDigest" id="ContentDigest">ContentDigest</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response +headers</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ContentDigest On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ContentDigest Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive enables the generation of + <code>Content-MD5</code> headers as defined in RFC1864 + respectively RFC2616.</p> + + <p>MD5 is an algorithm for computing a "message digest" + (sometimes called "fingerprint") of arbitrary-length data, with + a high degree of confidence that any alterations in the data + will be reflected in alterations in the message digest.</p> + + <p>The <code>Content-MD5</code> header provides an end-to-end + message integrity check (MIC) of the entity-body. A proxy or + client may check this header for detecting accidental + modification of the entity-body in transit. Example header:</p> + + <div class="example"><p><code> + Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== + </code></p></div> + + <p>Note that this can cause performance problems on your server + since the message digest is computed on every request (the + values are not cached).</p> + + <p><code>Content-MD5</code> is only sent for documents served + by the <code class="module"><a href="../mod/core.html">core</a></code>, and not by any module. For example, + SSI documents, output from CGI scripts, and byte range responses + do not have this header.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="defaultruntimedir" id="defaultruntimedir">Directiva</a> <a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Base directory for the server run-time files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache 2.4.2 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><a href="../misc/security_tips.html#serverroot">the + security tips</a> for information on how to properly set + permissions on the <code class="directive">ServerRoot</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="defaulttype" id="defaulttype">Directiva</a> <a name="DefaultType" id="DefaultType">DefaultType</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>This directive has no effect other than to emit warnings +if the value is not <code>none</code>. In prior versions, DefaultType +would specify a default media type to assign to response content for +which no other media type configuration could be found. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>DefaultType none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>The argument <code>none</code> is available in Apache httpd 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.</td></tr> +</table> + <p>This directive has been disabled. For backwards compatibility + of configuration files, it may be specified with the value + <code>none</code>, meaning no default media type. For example:</p> + + <div class="example"><p><code> + DefaultType None + </code></p></div> + + <p><code>DefaultType None</code> is only available in + httpd-2.2.7 and later.</p> + + <p>Use the mime.types configuration file and the + <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> to configure media + type assignments via file extensions, or the + <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure + the media type for specific resources. Otherwise, the server will + send the response without a Content-Type header field and the + recipient may attempt to guess the media type.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="define" id="define">Directiva</a> <a name="Define" id="Define">Define</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Define the existence of a variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Define <var>parameter-name</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>Equivalent to passing the <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p> + <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine"><IfDefine></a></code> sections without needing to alter + <code>-D</code> arguments in any startup scripts.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="directory" id="directory">Directiva</a> <a name="Directory" id="Directory"><Directory></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enclose a group of directives that apply only to the +named file-system directory, sub-directories, and their contents.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Directory <var>directory-path</var>> +... </Directory></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><Directory></code> and + <code></Directory></code> are used to enclose a group of + directives that will apply only to the named directory, + sub-directories of that directory, and the files within the respective + directories. Any directive that is allowed + in a directory context may be used. <var>Directory-path</var> is + either the full path to a directory, or a wild-card string using + Unix shell-style matching. In a wild-card string, <code>?</code> matches + any single character, and <code>*</code> matches any sequences of + characters. You may also use <code>[]</code> character ranges. None + of the wildcards match a `/' character, so <code><Directory + /*/public_html></code> will not match + <code>/home/user/public_html</code>, but <code><Directory + /home/*/public_html></code> will match. Example:</p> + + <div class="example"><p><code> + <Directory /usr/local/httpd/htdocs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory> + </code></p></div> + + <div class="note"> + <p>Be careful with the <var>directory-path</var> arguments: + They have to literally match the filesystem path which Apache httpd uses + to access the files. Directives applied to a particular + <code><Directory></code> will not apply to files accessed from + that same directory via a different path, such as via different symbolic + links.</p> + </div> + + <p><a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular + expressions</a> can also be used, with the addition of the + <code>~</code> character. For example:</p> + + <div class="example"><p><code> + <Directory ~ "^/www/.*/[0-9]{3}"> + </code></p></div> + + <p>would match directories in <code>/www/</code> that consisted of + three numbers.</p> + + <p>If multiple (non-regular expression) <code class="directive"><Directory></code> sections + match the directory (or one of its parents) containing a document, + then the directives are applied in the order of shortest match + first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example, + with</p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + AllowOverride None<br /> + </span> + </Directory><br /> + <br /> + <Directory /home/><br /> + <span class="indent"> + AllowOverride FileInfo<br /> + </span> + </Directory> + </code></p></div> + + <p>for access to the document <code>/home/web/dir/doc.html</code> + the steps are:</p> + + <ul> + <li>Apply directive <code>AllowOverride None</code> + (disabling <code>.htaccess</code> files).</li> + + <li>Apply directive <code>AllowOverride FileInfo</code> (for + directory <code>/home</code>).</li> + + <li>Apply any <code>FileInfo</code> directives in + <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and + <code>/home/web/dir/.htaccess</code> in that order.</li> + </ul> + + <p>Regular expressions are not considered until after all of the + normal sections have been applied. Then all of the regular + expressions are tested in the order they appeared in the + configuration file. For example, with</p> + + <div class="example"><p><code> + <Directory ~ abc$><br /> + <span class="indent"> + # ... directives here ...<br /> + </span> + </Directory> + </code></p></div> + + <p>the regular expression section won't be considered until after + all normal <code class="directive"><Directory></code>s and + <code>.htaccess</code> files have been applied. Then the regular + expression will match on <code>/home/abc/public_html/abc</code> and + the corresponding <code class="directive"><Directory></code> will + be applied.</p> + + <p><strong>Note that the default access for + <code><Directory /></code> is <code>Allow from All</code>. + This means that Apache httpd will serve any file mapped from an URL. It is + recommended that you change this with a block such + as</strong></p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + Order Deny,Allow<br /> + Deny from All<br /> + </span> + </Directory> + </code></p></div> + + <p><strong>and then override this for directories you + <em>want</em> accessible. See the <a href="../misc/security_tips.html">Security Tips</a> page for more + details.</strong></p> + + <p>The directory sections occur in the <code>httpd.conf</code> file. + <code class="directive"><Directory></code> directives + cannot nest, and cannot appear in a <code class="directive"><a href="#limit"><Limit></a></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section.</p> + +<h3>Consulte también</h3> +<ul> +<li><a href="../sections.html">How <Directory>, + <Location> and <Files> sections work</a> for an + explanation of how these different sections are combined when a + request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="directorymatch" id="directorymatch">Directiva</a> <a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enclose directives that apply to +the contents of file-system directories matching a regular expression.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><DirectoryMatch <var>regex</var>> +... </DirectoryMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><DirectoryMatch></code> and + <code></DirectoryMatch></code> are used to enclose a group + of directives which will apply only to the named directory (and the files within), + the same as <code class="directive"><a href="#directory"><Directory></a></code>. + However, it takes as an argument a + <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular expression</a>. For example:</p> + + <div class="example"><p><code> + <DirectoryMatch "^/www/(.+/)?[0-9]{3}"> + </code></p></div> + + <p>would match directories in <code>/www/</code> that consisted of three + numbers.</p> + + <div class="note"><h3>Compatability</h3> + Prior to 2.3.9, this directive implicitly applied to sub-directories + (like <code class="directive"><a href="#directory"><Directory></a></code>) and + could not match the end of line symbol ($). In 2.3.9 and later, + only directories that match the expression are affected by the enclosed + directives. + </div> + + <div class="note"><h3>Trailing Slash</h3> + This directive applies to requests for directories that may or may + not end in a trailing slash, so expressions that are anchored to the + end of line ($) must be written with care. + </div> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#directory"><Directory></a></code> for +a description of how regular expressions are mixed in with normal +<code class="directive"><Directory></code>s</li> +<li><a href="../sections.html">How <Directory>, <Location> and +<Files> sections work</a> for an explanation of how these different +sections are combined when a request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="documentroot" id="documentroot">Directiva</a> <a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Directory that forms the main document tree visible +from the web</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive sets the directory from which <code class="program"><a href="../programs/httpd.html">httpd</a></code> + 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 + path from the requested URL to the document root to make the + path to the document. Example:</p> + + <div class="example"><p><code> + DocumentRoot /usr/web + </code></p></div> + + <p>then an access to + <code>http://www.my.host.com/index.html</code> refers to + <code>/usr/web/index.html</code>. If the <var>directory-path</var> is + not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p> + + <p>The <code class="directive">DocumentRoot</code> should be specified without + a trailing slash.</p> + +<h3>Consulte también</h3> +<ul> +<li><a href="../urlmapping.html#documentroot">Mapping URLs to Filesystem +Locations</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="else" id="else">Directiva</a> <a name="Else" id="Else"><Else></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if the condition of a +previous <code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><a href="#elseif"><ElseIf></a></code> section is not +satisfied by a request at runtime</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Else> ... </Else></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="elseif" id="elseif">Directiva</a> <a name="ElseIf" id="ElseIf"><ElseIf></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if a condition is satisfied +by a request at runtime while the condition of a previous +<code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><ElseIf></code> section is not +satisfied</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><a href="../expr.html">Expressions in Apache HTTP Server</a>, +for a complete reference and more examples.</li> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="enablemmap" id="enablemmap">Directiva</a> <a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Use memory-mapping to read files during delivery</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>EnableMMAP On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>EnableMMAP On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive controls whether the <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use + memory-mapping if it needs to read the contents of a file during + delivery. By default, when the handling of a request requires + access to the data within a file -- for example, when delivering a + server-parsed file using <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache httpd + memory-maps the file if the OS supports it.</p> + + <p>This memory-mapping sometimes yields a performance improvement. + But in some environments, it is better to disable the memory-mapping + to prevent operational problems:</p> + + <ul> + <li>On some multiprocessor systems, memory-mapping can reduce the + performance of the <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</li> + <li>Deleting or truncating a file while <code class="program"><a href="../programs/httpd.html">httpd</a></code> + has it memory-mapped can cause <code class="program"><a href="../programs/httpd.html">httpd</a></code> to + crash with a segmentation fault. + </li> + </ul> + + <p>For server configurations that are vulnerable to these problems, + you should disable memory-mapping of delivered files by specifying:</p> + + <div class="example"><p><code> + EnableMMAP Off + </code></p></div> + + <p>For NFS mounted files, this feature may be disabled explicitly for + the offending files by specifying:</p> + + <div class="example"><p><code> + <Directory "/path-to-nfs-files"> + <span class="indent"> + EnableMMAP Off + </span> + </Directory> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="enablesendfile" id="enablesendfile">Directiva</a> <a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Use the kernel sendfile support to deliver files to the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>EnableSendfile On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>EnableSendfile Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in version 2.0.44 and later. Default changed to Off in +version 2.3.9.</td></tr> +</table> + <p>This directive controls whether <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use the + sendfile support from the kernel to transmit file contents to the client. + By default, when the handling of a request requires no access + to the data within a file -- for example, when delivering a + static file -- Apache httpd uses sendfile to deliver the file contents + without ever reading the file if the OS supports it.</p> + + <p>This sendfile mechanism avoids separate read and send operations, + and buffer allocations. But on some platforms or within some + filesystems, it is better to disable this feature to avoid + operational problems:</p> + + <ul> + <li>Some platforms may have broken sendfile support that the build + system did not detect, especially if the binaries were built on + another box and moved to such a machine with broken sendfile + support.</li> + <li>On Linux the use of sendfile triggers TCP-checksum + offloading bugs on certain networking cards when using IPv6.</li> + <li>On Linux on Itanium, sendfile may be unable to handle files + over 2GB in size.</li> + <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS, SMB, CIFS, FUSE), + the kernel may be unable to serve the network file through + its own cache.</li> + </ul> + + <p>For server configurations that are not vulnerable to these problems, + you may enable this feature by specifying:</p> + + <div class="example"><p><code> + EnableSendfile On + </code></p></div> + + <p>For network mounted files, this feature may be disabled explicitly + for the offending files by specifying:</p> + + <div class="example"><p><code> + <Directory "/path-to-nfs-files"> + <span class="indent"> + EnableSendfile Off + </span> + </Directory> + </code></p></div> + <p>Please note that the per-directory and .htaccess configuration + of <code class="directive">EnableSendfile</code> is not supported by + <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code>. + Only global definition of <code class="directive">EnableSendfile</code> + is taken into account by the module. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="error" id="error">Directiva</a> <a name="Error" id="Error">Error</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Abort configuration parsing with a custom error message</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Error <var>message</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.3.9 and later</td></tr> +</table> + <p>If an error can be detected within the configuration, this + directive can be used to generate a custom error message, and halt + configuration parsing. The typical use is for reporting required + modules which are missing from the configuration.</p> + + <div class="example"><h3>Example</h3><p><code> + # ensure that mod_include is loaded<br /> + <IfModule !include_module><br /> + Error mod_include is required by mod_foo. Load it with LoadModule.<br /> + </IfModule><br /> + <br /> + # ensure that exactly one of SSL,NOSSL is defined<br /> + <IfDefine SSL><br /> + <IfDefine NOSSL><br /> + Error Both SSL and NOSSL are defined. Define only one of them.<br /> + </IfDefine><br /> + </IfDefine><br /> + <IfDefine !SSL><br /> + <IfDefine !NOSSL><br /> + Error Either SSL or NOSSL must be defined.<br /> + </IfDefine><br /> + </IfDefine><br /> + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="errordocument" id="errordocument">Directiva</a> <a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>What the server will return to the client +in case of an error</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>In the event of a problem or error, Apache httpd can be configured + to do one of four things,</p> + + <ol> + <li>output a simple hardcoded error message</li> + + <li>output a customized message</li> + + <li>redirect to a local <var>URL-path</var> to handle the + problem/error</li> + + <li>redirect to an external <var>URL</var> to handle the + problem/error</li> + </ol> + + <p>The first option is the default, while options 2-4 are + configured using the <code class="directive">ErrorDocument</code> + directive, which is followed by the HTTP response code and a URL + or a message. Apache httpd will sometimes offer additional information + regarding the problem/error.</p> + + <p>URLs can begin with a slash (/) for local web-paths (relative + to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a + full URL which the client can resolve. Alternatively, a message + can be provided to be displayed by the browser. Examples:</p> + + <div class="example"><p><code> + ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br /> + ErrorDocument 404 /cgi-bin/bad_urls.pl<br /> + ErrorDocument 401 /subscription_info.html<br /> + ErrorDocument 403 "Sorry can't allow you access today" + </code></p></div> + + <p>Additionally, the special value <code>default</code> can be used + to specify Apache httpd's simple hardcoded message. While not required + under normal circumstances, <code>default</code> will restore + Apache httpd's simple hardcoded message for configurations that would + otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p> + + <div class="example"><p><code> + ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br /> + <Directory /web/docs><br /> + <span class="indent"> + ErrorDocument 404 default<br /> + </span> + </Directory> + </code></p></div> + + <p>Note that when you specify an <code class="directive">ErrorDocument</code> + that points to a remote URL (ie. anything with a method such as + <code>http</code> in front of it), Apache HTTP Server will send a redirect to the + client to tell it where to find the document, even if the + document ends up being on the same server. This has several + implications, the most important being that the client will not + receive the original error status code, but instead will + receive a redirect status code. This in turn can confuse web + robots and other clients which try to determine if a URL is + valid using the status code. In addition, if you use a remote + URL in an <code>ErrorDocument 401</code>, the client will not + know to prompt the user for a password since it will not + receive the 401 status code. Therefore, <strong>if you use an + <code>ErrorDocument 401</code> directive then it must refer to a local + document.</strong></p> + + <p>Microsoft Internet Explorer (MSIE) will by default ignore + server-generated error messages when they are "too small" and substitute + its own "friendly" error messages. The size threshold varies depending on + the type of error, but in general, if you make your error document + greater than 512 bytes, then MSIE will show the server-generated + error rather than masking it. More information is available in + Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p> + + <p>Although most error messages can be overriden, there are certain + circumstances where the internal messages are used regardless of the + setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. In + particular, if a malformed request is detected, normal request processing + will be immediately halted and the internal error message returned. + This is necessary to guard against security problems caused by + bad requests.</p> + + <p>If you are using mod_proxy, you may wish to enable + <code class="directive"><a href="../mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide + custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride, + Apache httpd will not generate custom error documents for proxied content.</p> + +<h3>Consulte también</h3> +<ul> +<li><a href="../custom-error.html">documentation of + customizable responses</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="errorlog" id="errorlog">Directiva</a> <a name="ErrorLog" id="ErrorLog">ErrorLog</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Location where the server will log errors</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ErrorLog</code> directive sets the name of + the file to which the server will log any errors it encounters. If + the <var>file-path</var> is not absolute then it is assumed to be + relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p> + + <div class="example"><h3>Example</h3><p><code> + ErrorLog /var/log/httpd/error_log + </code></p></div> + + <p>If the <var>file-path</var> + begins with a pipe character "<code>|</code>" then it is assumed to be a + command to spawn to handle the error log.</p> + + <div class="example"><h3>Example</h3><p><code> + ErrorLog "|/usr/local/bin/httpd_errors" + </code></p></div> + + <p>See the notes on <a href="../logs.html#piped">piped logs</a> for + more information.</p> + + <p>Using <code>syslog</code> instead of a filename enables logging + via syslogd(8) if the system supports it. The default is to use + syslog facility <code>local7</code>, but you can override this by + using the <code>syslog:<var>facility</var></code> syntax where + <var>facility</var> can be one of the names usually documented in + syslog(1). The facility is effectively global, and if it is changed + in individual virtual hosts, the final facility specified affects the + entire server.</p> + + <div class="example"><h3>Example</h3><p><code> + ErrorLog syslog:user + </code></p></div> + + <p>SECURITY: See the <a href="../misc/security_tips.html#serverroot">security tips</a> + document for details on why your security could be compromised + if the directory where log files are stored is writable by + anyone other than the user that starts the server.</p> + <div class="warning"><h3>Note</h3> + <p>When entering a file path on non-Unix platforms, care should be taken + to make sure that only forward slashed are used even though the platform + may allow the use of back slashes. In general it is a good idea to always + use forward slashes throughout the configuration files.</p> + </div> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache HTTP Server Log Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="errorlogformat" id="errorlogformat">Directiva</a> <a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Format specification for error log entries</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code> ErrorLog [connection|request] <var>format</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.3.9 and later</td></tr> +</table> + <p><code class="directive">ErrorLogFormat</code> allows to specify what + supplementary information is logged in the error log in addition to the + actual log message.</p> + + <div class="example"><h3>Simple example</h3><p><code> + ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" + </code></p></div> + + <p>Specifying <code>connection</code> or <code>request</code> as first + paramter allows to specify additional formats, causing additional + information to be logged when the first message is logged for a specific + connection or request, respectivly. This additional information is only + logged once per connection/request. If a connection or request is processed + without causing any log message, the additional information is not logged + either.</p> + + <p>It can happen that some format string items do not produce output. For + example, the Referer header is only present if the log message is + associated to a request and the log message happens at a time when the + Referer header has already been read from the client. If no output is + produced, the default behaviour is to delete everything from the preceeding + space character to the next space character. This means the log line is + implicitly divided into fields on non-whitespace to whitespace transitions. + If a format string item does not produce output, the whole field is + ommitted. For example, if the remote address <code>%a</code> in the log + format <code>[%t] [%l] [%a] %M </code> is not available, the surrounding + brackets are not logged either. Space characters can be escaped with a + backslash to prevent them from delimiting a field. The combination '% ' + (percent space) is a zero-witdh field delimiter that does not produce any + output.</p> + + <p>The above behaviour can be changed by adding modifiers to the format + string item. A <code>-</code> (minus) modifier causes a minus to be logged if the + respective item does not produce any output. In once-per-connection/request + formats, it is also possible to use the <code>+</code> (plus) modifier. If an + item with the plus modifier does not produce any output, the whole line is + ommitted.</p> + + <p>A number as modifier can be used to assign a log severity level to a + format item. The item will only be logged if the severity of the log + message is not higher than the specified log severity level. The number can + range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p> + + <p>Some format string items accept additional parameters in braces.</p> + + <table class="bordered"><tr class="header"><th>Format String</th> <th>Description</th></tr> +<tr><td><code>%%</code></td> + <td>The percent sign</td></tr> +<tr class="odd"><td><code>%...a</code></td> + <td>Remote IP-address and port</td></tr> +<tr><td><code>%...A</code></td> + <td>Local IP-address and port</td></tr> +<tr class="odd"><td><code>%...{name}e</code></td> + <td>Request environment variable <code>name</code></td></tr> +<tr><td><code>%...E</code></td> + <td>APR/OS error status code and string</td></tr> +<tr class="odd"><td><code>%...F</code></td> + <td>Source file name and line number of the log call</td></tr> +<tr><td><code>%...{name}i</code></td> + <td>Request header <code>name</code></td></tr> +<tr class="odd"><td><code>%...k</code></td> + <td>Number of keep-alive requests on this connection</td></tr> +<tr><td><code>%...l</code></td> + <td>Loglevel of the message</td></tr> +<tr class="odd"><td><code>%...L</code></td> + <td>Log ID of the request</td></tr> +<tr><td><code>%...{c}L</code></td> + <td>Log ID of the connection</td></tr> +<tr class="odd"><td><code>%...{C}L</code></td> + <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr> +<tr><td><code>%...m</code></td> + <td>Name of the module logging the message</td></tr> +<tr class="odd"><td><code>%M</code></td> + <td>The actual log message</td></tr> +<tr><td><code>%...{name}n</code></td> + <td>Request note <code>name</code></td></tr> +<tr class="odd"><td><code>%...P</code></td> + <td>Process ID of current process</td></tr> +<tr><td><code>%...T</code></td> + <td>Thread ID of current thread</td></tr> +<tr class="odd"><td><code>%...t</code></td> + <td>The current time</td></tr> +<tr><td><code>%...{u}t</code></td> + <td>The current time including micro-seconds</td></tr> +<tr class="odd"><td><code>%...{cu}t</code></td> + <td>The current time in compact ISO 8601 format, including + micro-seconds</td></tr> +<tr><td><code>%...v</code></td> + <td>The canonical <code class="directive"><a href="#servername">ServerName</a></code> + of the current server.</td></tr> +<tr class="odd"><td><code>%...V</code></td> + <td>The server name of the server serving the request according to the + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> + setting.</td></tr> +<tr><td><code>\ </code> (backslash space)</td> + <td>Non-field delimiting space</td></tr> +<tr class="odd"><td><code>% </code> (percent space)</td> + <td>Field delimiter (no output)</td></tr> +</table> + + <p>The log ID format <code>%L</code> produces a unique id for a connection + or request. This can be used to correlate which log lines belong to the + same connection or request, which request happens on which connection. + A <code>%L</code> format string is also available in + <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code>, to allow to correlate access log entries + with error log lines. If <code class="module"><a href="../mod/mod_unique_id.html">mod_unique_id</a></code> is loaded, its + unique id will be used as log ID for requests.</p> + + <div class="example"><h3>Example (somewhat similar to default format)</h3><p><code> + ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P] %7F: %E: [client\ %a] + %M% ,\ referer\ %{Referer}i" + </code></p></div> + + <div class="example"><h3>Example (similar to the 2.2.x format)</h3><p><code> + ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] + %M% ,\ referer\ %{Referer}i" + </code></p></div> + + <div class="example"><h3>Advanced example with request/connection log IDs</h3><p><code> + ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"<br /> + ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"<br /> + ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"<br /> + ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"<br /> + ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"<br /> + </code></p></div> + + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache HTTP Server Log Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="extendedstatus" id="extendedstatus">Directiva</a> <a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Keep track of extended status information for each +request</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ExtendedStatus On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This option tracks additional data per worker about the + currently executing request, and a utilization summary; you + can see these variables during runtime by configuring + <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>. Note that other modules may + rely on this scoreboard.</p> + + <p>This setting applies to the entire server, and cannot be + enabled or disabled on a virtualhost-by-virtualhost basis. + The collection of extended status information can slow down + the server. Also note that this setting cannot be changed + during a graceful restart.</p> + + <div class="note"> + <p>Note that loading <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> will change + the default behavior to ExtendedStatus On, while other + third party modules may do the same. Such modules rely on + collecting detailed information about the state of all workers. + The default is changed by <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> beginning + with version 2.3.6; the previous default was always Off.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="fileetag" id="fileetag">Directiva</a> <a name="FileETag" id="FileETag">FileETag</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>File attributes used to create the ETag +HTTP response header for static files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>FileETag INode MTime Size</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p> + The <code class="directive">FileETag</code> directive configures the file + attributes that are used to create the <code>ETag</code> (entity + tag) response header field when the document is based on a static file. + (The <code>ETag</code> value is used in cache management to save + network bandwidth.) The + <code class="directive">FileETag</code> directive allows you to choose + which of these -- if any -- should be used. The recognized keywords are: + </p> + + <dl> + <dt><strong>INode</strong></dt> + <dd>The file's i-node number will be included in the calculation</dd> + <dt><strong>MTime</strong></dt> + <dd>The date and time the file was last modified will be included</dd> + <dt><strong>Size</strong></dt> + <dd>The number of bytes in the file will be included</dd> + <dt><strong>All</strong></dt> + <dd>All available fields will be used. This is equivalent to: + <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd> + <dt><strong>None</strong></dt> + <dd>If a document is file-based, no <code>ETag</code> field will be + included in the response</dd> + </dl> + + <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code> + keywords may be prefixed with either <code>+</code> or <code>-</code>, + which allow changes to be made to the default setting inherited + from a broader scope. Any keyword appearing without such a prefix + immediately and completely cancels the inherited setting.</p> + + <p>If a directory's configuration includes + <code>FileETag INode MTime Size</code>, and a + subdirectory's includes <code>FileETag -INode</code>, + the setting for that subdirectory (which will be inherited by + any sub-subdirectories that don't override it) will be equivalent to + <code>FileETag MTime Size</code>.</p> + <div class="warning"><h3>Warning</h3> + Do not change the default for directories or locations that have WebDAV + enabled and use <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider. + <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>INode MTime Size</code> + as a fixed format for <code>ETag</code> comparisons on conditional requests. + These conditional requests will break if the <code>ETag</code> format is + changed via <code class="directive">FileETag</code>. + </div> + <div class="note"><h3>Server Side Includes</h3> + An ETag is not generated for responses parsed by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>, + since the response entity can change without a change of the INode, MTime, or Size + of the static file with embedded SSI directives. + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="files" id="files">Directiva</a> <a name="Files" id="Files"><Files></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply to matched +filenames</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Files <var>filename</var>> ... </Files></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><Files></code> directive + limits the scope of the enclosed directives by filename. It is comparable + to the <code class="directive"><a href="#directory"><Directory></a></code> + and <code class="directive"><a href="#location"><Location></a></code> + directives. It should be matched with a <code></Files></code> + directive. The directives given within this section will be applied to + any object with a basename (last component of filename) matching the + specified filename. <code class="directive"><Files></code> + sections are processed in the order they appear in the + configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and + <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location"><Location></a></code> sections. Note + that <code class="directive"><Files></code> can be nested + inside <code class="directive"><a href="#directory"><Directory></a></code> sections to restrict the + portion of the filesystem they apply to.</p> + + <p>The <var>filename</var> argument should include a filename, or + a wild-card string, where <code>?</code> matches any single character, + and <code>*</code> matches any sequences of characters. + <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular expressions</a> + can also be used, with the addition of the + <code>~</code> character. For example:</p> + + <div class="example"><p><code> + <Files ~ "\.(gif|jpe?g|png)$"> + </code></p></div> + + <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> is preferred, + however.</p> + + <p>Note that unlike <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#location"><Location></a></code> sections, <code class="directive"><Files></code> sections can be used inside + <code>.htaccess</code> files. This allows users to control access to + their own files, at a file-by-file level.</p> + + +<h3>Consulte también</h3> +<ul> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="filesmatch" id="filesmatch">Directiva</a> <a name="FilesMatch" id="FilesMatch"><FilesMatch></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply to regular-expression matched +filenames</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><FilesMatch></code> directive + limits the scope of the enclosed directives by filename, just as the + <code class="directive"><a href="#files"><Files></a></code> directive + does. However, it accepts a <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular + expression</a>. For example:</p> + + <div class="example"><p><code> + <FilesMatch "\.(gif|jpe?g|png)$"> + </code></p></div> + + <p>would match most common Internet graphics formats.</p> + +<h3>Consulte también</h3> +<ul> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="flushmaxpipelined" id="flushmaxpipelined">Directiva</a> <a name="FlushMaxPipelined" id="FlushMaxPipelined">FlushMaxPipelined</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Maximum number of pipelined responses above which they are flushed +to the network</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>FlushMaxPipelined <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>FlushMaxPipelined 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.4.47 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="flushmaxthreshold" id="flushmaxthreshold">Directiva</a> <a name="FlushMaxThreshold" id="FlushMaxThreshold">FlushMaxThreshold</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Threshold above which pending data are flushed to the +network</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>FlushMaxThreshold <var>number-of-bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>FlushMaxThreshold 65536</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.4.47 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="forcetype" id="forcetype">Directiva</a> <a name="ForceType" id="ForceType">ForceType</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Forces all matching files to be served with the specified +media type in the HTTP Content-Type header field</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Moved to the core in Apache httpd 2.0</td></tr> +</table> + <p>When placed into an <code>.htaccess</code> file or a + <code class="directive"><a href="#directory"><Directory></a></code>, or + <code class="directive"><a href="#location"><Location></a></code> or + <code class="directive"><a href="#files"><Files></a></code> + section, this directive forces all matching files to be served + with the content type identification given by + <var>media-type</var>. For example, if you had a directory full of + GIF files, but did not want to label them all with <code>.gif</code>, + you might want to use:</p> + + <div class="example"><p><code> + ForceType image/gif + </code></p></div> + + <p>Note that this directive overrides other indirect media type + associations defined in mime.types or via the + <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code>.</p> + + <p>You can also override more general + <code class="directive">ForceType</code> settings + by using the value of <code>None</code>:</p> + + <div class="example"><p><code> + # force all files to be image/gif:<br /> + <Location /images><br /> + <span class="indent"> + ForceType image/gif<br /> + </span> + </Location><br /> + <br /> + # but normal mime-type associations here:<br /> + <Location /images/mixed><br /> + <span class="indent"> + ForceType None<br /> + </span> + </Location> + </code></p></div> + + <p>This directive primarily overrides the content types generated for + static files served out of the filesystem. For resources other than + static files, where the generator of the response typically specifies + a Content-Type, this directive has no effect.</p> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="gprofdir" id="gprofdir">Directiva</a> <a name="GprofDir" id="GprofDir">GprofDir</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Directory to write gmon.out profiling data to. </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>When the server has been compiled with gprof profiling support, + <code class="directive">GprofDir</code> causes <code>gmon.out</code> files to + be written to the specified directory when the process exits. If the + argument ends with a percent symbol ('%'), subdirectories are created + for each process id.</p> + + <p>This directive currently only works with the <code class="module"><a href="../mod/prefork.html">prefork</a></code> + MPM.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="hostnamelookups" id="hostnamelookups">Directiva</a> <a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables DNS lookups on client IP addresses</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>HostnameLookups Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive enables DNS lookups so that host names can be + logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>). + The value <code>Double</code> refers to doing double-reverse + DNS lookup. That is, after a reverse lookup is performed, a forward + lookup is then performed on that result. At least one of the IP + addresses in the forward lookup must match the original + address. (In "tcpwrappers" terminology this is called + <code>PARANOID</code>.)</p> + + <p>Regardless of the setting, when <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> is + used for controlling access by hostname, a double reverse lookup + will be performed. This is necessary for security. Note that the + result of this double-reverse isn't generally available unless you + set <code>HostnameLookups Double</code>. For example, if only + <code>HostnameLookups On</code> and a request is made to an object + that is protected by hostname restrictions, regardless of whether + the double-reverse fails or not, CGIs will still be passed the + single-reverse result in <code>REMOTE_HOST</code>.</p> + + <p>The default is <code>Off</code> in order to save the network + traffic for those sites that don't truly need the reverse + lookups done. It is also better for the end users because they + don't have to suffer the extra latency that a lookup entails. + Heavily loaded sites should leave this directive + <code>Off</code>, since DNS lookups can take considerable + amounts of time. The utility <code class="program"><a href="../programs/logresolve.html">logresolve</a></code>, compiled by + default to the <code>bin</code> subdirectory of your installation + directory, can be used to look up host names from logged IP addresses + offline.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="httpprotocoloptions" id="httpprotocoloptions">Directiva</a> <a name="HttpProtocolOptions" id="HttpProtocolOptions">HttpProtocolOptions</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Modify restrictions on HTTP Request Messages</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>HttpProtocolOptions Strict LenientMethods Allow0.9</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.2.32 or 2.4.24 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="if" id="if">Directiva</a> <a name="If" id="If"><If></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if a condition is +satisfied by a request at runtime</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><If></code> directive + evaluates an expression at runtime, and applies the enclosed + directives if and only if the expression evaluates to true. + For example:</p> + + <div class="example"><p><code> + <If "$req{Host} = ''"> + </code></p></div> + + <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p> + + <p>You may compare the value of any variable in the request headers + ($req), response headers ($resp) or environment ($env) in your + expression.</p> + + <p>Apart from <code>=</code>, <code>If</code> can use the <code>IN</code> + operator to compare if the expression is in a given range:</p> + + <div class="example"><p><code> + <If %{REQUEST_METHOD} IN GET,HEAD,OPTIONS> + </code></p></div> + + +<h3>Consulte también</h3> +<ul> +<li><a href="../expr.html">Expressions in Apache HTTP Server</a>, +for a complete reference and more examples.</li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code> has the same precedence + and usage as <code class="directive"><Files></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ifdefine" id="ifdefine">Directiva</a> <a name="IfDefine" id="IfDefine"><IfDefine></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that will be processed only +if a test is true at startup</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ... + </IfDefine></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code><IfDefine <var>test</var>>...</IfDefine> + </code> section is used to mark directives that are conditional. The + directives within an <code class="directive"><IfDefine></code> + section are only processed if the <var>test</var> is true. If <var> + test</var> is false, everything between the start and end markers is + ignored.</p> + + <p>The <var>test</var> in the <code class="directive"><IfDefine></code> section directive can be one of two forms:</p> + + <ul> + <li><var>parameter-name</var></li> + + <li><code>!</code><var>parameter-name</var></li> + </ul> + + <p>In the former case, the directives between the start and end + markers are only processed if the parameter named + <var>parameter-name</var> is defined. The second format reverses + the test, and only processes the directives if + <var>parameter-name</var> is <strong>not</strong> defined.</p> + + <p>The <var>parameter-name</var> argument is a define as given on the + <code class="program"><a href="../programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var> + </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p> + + <p><code class="directive"><IfDefine></code> sections are + nest-able, which can be used to implement simple + multiple-parameter tests. Example:</p> + + <div class="example"><p><code> + httpd -DReverseProxy -DUseCache -DMemCache ...<br /> + <br /> + # httpd.conf<br /> + <IfDefine ReverseProxy><br /> + <span class="indent"> + LoadModule proxy_module modules/mod_proxy.so<br /> + LoadModule proxy_http_module modules/mod_proxy_http.so<br /> + <IfDefine UseCache><br /> + <span class="indent"> + LoadModule cache_module modules/mod_cache.so<br /> + <IfDefine MemCache><br /> + <span class="indent"> + LoadModule mem_cache_module modules/mod_mem_cache.so<br /> + </span> + </IfDefine><br /> + <IfDefine !MemCache><br /> + <span class="indent"> + LoadModule cache_disk_module modules/mod_cache_disk.so<br /> + </span> + </IfDefine> + </span> + </IfDefine> + </span> + </IfDefine> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ifdirective" id="ifdirective">Directiva</a> <a name="IfDirective" id="IfDirective"><IfDirective></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific directive</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><IfDirective [!]<var>directive-name</var>> ... + </IfDirective></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#ifsection"><IfSection></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="iffile" id="iffile">Directiva</a> <a name="IfFile" id="IfFile"><IfFile></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that will be processed only +if file exists at startup</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><IfFile [!]<var>filename</var>> ... + </IfFile></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ifmodule" id="ifmodule">Directiva</a> <a name="IfModule" id="IfModule"><IfModule></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific module</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ... + </IfModule></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Module identifiers are available in version 2.1 and +later.</td></tr> +</table> + <p>The <code><IfModule <var>test</var>>...</IfModule></code> + section is used to mark directives that are conditional on the presence of + a specific module. The directives within an <code class="directive"><IfModule></code> section are only processed if the <var>test</var> + is true. If <var>test</var> is false, everything between the start and + end markers is ignored.</p> + + <p>The <var>test</var> in the <code class="directive"><IfModule></code> section directive can be one of two forms:</p> + + <ul> + <li><var>module</var></li> + + <li>!<var>module</var></li> + </ul> + + <p>In the former case, the directives between the start and end + markers are only processed if the module named <var>module</var> + is included in Apache httpd -- either compiled in or + dynamically loaded using <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test, + and only processes the directives if <var>module</var> is + <strong>not</strong> included.</p> + + <p>The <var>module</var> argument can be either the module identifier or + the file name of the module, at the time it was compiled. For example, + <code>rewrite_module</code> is the identifier and + <code>mod_rewrite.c</code> is the file name. If a module consists of + several source files, use the name of the file containing the string + <code>STANDARD20_MODULE_STUFF</code>.</p> + + <p><code class="directive"><IfModule></code> sections are + nest-able, which can be used to implement simple multiple-module + tests.</p> + + <div class="note">This section should only be used if you need to have one + configuration file that works whether or not a specific module + is available. In normal operation, directives need not be + placed in <code class="directive"><IfModule></code> + sections.</div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ifsection" id="ifsection">Directiva</a> <a name="IfSection" id="IfSection"><IfSection></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific section directive</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><IfSection [!]<var>section-name</var>> ... + </IfSection></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#ifdirective"><IfDirective></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="include" id="include">Directiva</a> <a name="Include" id="Include">Include</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Includes other configuration files from within +the server configuration files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Include [<var>optional</var>|<var>strict</var>] <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Wildcard matching available in 2.0.41 and later, directory +wildcard matching available in 2.3.6 and later</td></tr> +</table> + <p>This directive allows inclusion of other configuration files + from within the server configuration files.</p> + + <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used + in the filename or directory parts of the path to include several files + at once, in alphabetical order. In addition, if + <code class="directive">Include</code> points to a directory, rather than a file, + Apache httpd will read all files in that directory and any subdirectory. + However, including entire directories is not recommended, because it is + easy to accidentally leave temporary files in a directory that can cause + <code class="program"><a href="../programs/httpd.html">httpd</a></code> to fail. Instead, we encourage you to use the + wildcard syntax shown below, to include files that match a particular + pattern, such as *.conf, for example.</p> + + <p>When a wildcard is specified for a <strong>file</strong> component of + the path, and no file matches the wildcard, the + <code class="directive"><a href="#include">Include</a></code> + directive will be <strong>silently ignored</strong>. When a wildcard is + specified for a <strong>directory</strong> component of the path, and + no directory matches the wildcard, the + <code class="directive"><a href="#include">Include</a></code> directive will + <strong>fail with an error</strong> saying the directory cannot be found. + </p> + + <p>For further control over the behaviour of the server when no files or + directories match, prefix the path with the modifiers <var>optional</var> + or <var>strict</var>. If <var>optional</var> is specified, any wildcard + file or directory that does not match will be silently ignored. If + <var>strict</var> is specified, any wildcard file or directory that does + not match at least one file will cause server startup to fail.</p> + + <p>When a directory or file component of the path is + specified exactly, and that directory or file does not exist, + <code class="directive"><a href="#include">Include</a></code> directive will fail with an + error saying the file or directory cannot be found.</p> + + <p>The file path specified may be an absolute path, or may be relative + to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p> + + <p>Examples:</p> + + <div class="example"><p><code> + Include /usr/local/apache2/conf/ssl.conf<br /> + Include /usr/local/apache2/conf/vhosts/*.conf + </code></p></div> + + <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p> + + <div class="example"><p><code> + Include conf/ssl.conf<br /> + Include conf/vhosts/*.conf + </code></p></div> + + <p>Wildcards may be included in the directory or file portion of the + path. In the following example, the server will fail to load if no + directories match conf/vhosts/*, but will load successfully if no + files match *.conf.</p> + + <div class="example"><p><code> + Include conf/vhosts/*/vhost.conf<br /> + Include conf/vhosts/*/*.conf + </code></p></div> + + <p>In this example, the server will fail to load if either + conf/vhosts/* matches no directories, or if *.conf matches no files:</p> + + <div class="example"><p><code> + Include strict conf/vhosts/*/*.conf + </code></p></div> + + <p>In this example, the server load successfully if either conf/vhosts/* + matches no directories, or if *.conf matches no files:</p> + + <div class="example"><p><code> + Include optional conf/vhosts/*/*.conf + </code></p></div> + + +<h3>Consulte también</h3> +<ul> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="includeoptional" id="includeoptional">Directiva</a> <a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Includes other configuration files from within +the server configuration files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in 2.3.6 and later. Not existent file paths without wildcards + do not cause SyntaxError after 2.4.30</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#include">Include</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="keepalive" id="keepalive">Directiva</a> <a name="KeepAlive" id="KeepAlive">KeepAlive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables HTTP persistent connections</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>KeepAlive On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>KeepAlive On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The Keep-Alive extension to HTTP/1.0 and the persistent + connection feature of HTTP/1.1 provide long-lived HTTP sessions + which allow multiple requests to be sent over the same TCP + connection. In some cases this has been shown to result in an + almost 50% speedup in latency times for HTML documents with + many images. To enable Keep-Alive connections, set + <code>KeepAlive On</code>.</p> + + <p>For HTTP/1.0 clients, Keep-Alive connections will only be + used if they are specifically requested by a client. In + addition, a Keep-Alive connection with an HTTP/1.0 client can + only be used when the length of the content is known in + advance. This implies that dynamic content such as CGI output, + SSI pages, and server-generated directory listings will + generally not use Keep-Alive connections to HTTP/1.0 clients. + For HTTP/1.1 clients, persistent connections are the default + unless otherwise specified. If the client requests it, chunked + encoding will be used in order to send content of unknown + length over persistent connections.</p> + + <p>When a client uses a Keep-Alive connection it will be counted + as a single "request" for the <code class="directive"><a href="../mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code> directive, regardless + of how many requests are sent using the connection.</p> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="keepalivetimeout" id="keepalivetimeout">Directiva</a> <a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Amount of time the server will wait for subsequent +requests on a persistent connection</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>KeepAliveTimeout 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Specifying a value in milliseconds is available in +Apache httpd 2.3.2 and later</td></tr> +</table> + <p>The number of seconds Apache httpd will wait for a subsequent + request before closing the connection. By adding a postfix of ms the + timeout can be also set in milliseconds. Once a request has been + received, the timeout value specified by the + <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p> + + <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value + may cause performance problems in heavily loaded servers. The + higher the timeout, the more server processes will be kept + occupied waiting on connections with idle clients.</p> + + <p>In a name-based virtual host context, the value of the first + defined virtual host (the default host) in a set of <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> will be used. + The other values will be ignored.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limit" id="limit">Directiva</a> <a name="Limit" id="Limit"><Limit></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restrict enclosed access controls to only certain HTTP +methods</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ... + </Limit></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>AuthConfig, Limit</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>Access controls are normally effective for + <strong>all</strong> access methods, and this is the usual + desired behavior. <strong>In the general case, access control + directives should not be placed within a + <code class="directive"><Limit></code> section.</strong></p> + + <p>The purpose of the <code class="directive"><Limit></code> + directive is to restrict the effect of the access controls to the + nominated HTTP methods. For all other methods, the access + restrictions that are enclosed in the <code class="directive"><Limit></code> bracket <strong>will have no + effect</strong>. The following example applies the access control + only to the methods <code>POST</code>, <code>PUT</code>, and + <code>DELETE</code>, leaving all other methods unprotected:</p> + + <div class="example"><p><code> + <Limit POST PUT DELETE><br /> + <span class="indent"> + Require valid-user<br /> + </span> + </Limit> + </code></p></div> + + <p>The method names listed can be one or more of: <code>GET</code>, + <code>POST</code>, <code>PUT</code>, <code>DELETE</code>, + <code>CONNECT</code>, <code>OPTIONS</code>, + <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>, + <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>, + <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is + case-sensitive.</strong> If <code>GET</code> is used it will also + restrict <code>HEAD</code> requests. The <code>TRACE</code> method + cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p> + + <div class="warning">A <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section should always be + used in preference to a <code class="directive"><Limit></code> + section when restricting access, since a <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section provides protection + against arbitrary methods.</div> + + <p>The <code class="directive"><Limit></code> and + <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> + directives may be nested. In this case, each successive level of + <code class="directive"><Limit></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> directives must + further restrict the set of methods to which access controls apply.</p> + + <div class="warning">When using + <code class="directive"><Limit></code> or + <code class="directive"><LimitExcept></code> directives with + the <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive, + note that the first <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> + to succeed authorizes the request, regardless of the presence of other + <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directives.</div> + + <p>For example, given the following configuration, all users will + be authorized for <code>POST</code> requests, and the + <code>Require group editors</code> directive will be ignored + in all cases:</p> + + <div class="example"><p><code> + <LimitExcept GET> + <span class="indent"> + Require valid-user + </span> + </LimitExcept><br /> + <Limit POST> + <span class="indent"> + Require group editors + </span> + </Limit> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitexcept" id="limitexcept">Directiva</a> <a name="LimitExcept" id="LimitExcept"><LimitExcept></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restrict access controls to all HTTP methods +except the named ones</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ... + </LimitExcept></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>AuthConfig, Limit</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><LimitExcept></code> and + <code></LimitExcept></code> are used to enclose + a group of access control directives which will then apply to any + HTTP access method <strong>not</strong> listed in the arguments; + i.e., it is the opposite of a <code class="directive"><a href="#limit"><Limit></a></code> section and can be used to control + both standard and nonstandard/unrecognized methods. See the + documentation for <code class="directive"><a href="#limit"><Limit></a></code> for more details.</p> + + <p>For example:</p> + + <div class="example"><p><code> + <LimitExcept POST GET><br /> + <span class="indent"> + Require valid-user<br /> + </span> + </LimitExcept> + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitinternalrecursion" id="limitinternalrecursion">Directiva</a> <a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determine maximum number of internal redirects and nested +subrequests</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitInternalRecursion 10</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.0.47 and later</td></tr> +</table> + <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 + redirects the original request to a CGI script. A subrequest is Apache httpd's + mechanism to find out what would happen for some URI if it were requested. + For example, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the + files listed in the <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> + directive.</p> + + <p><code class="directive">LimitInternalRecursion</code> prevents the server + from crashing when entering an infinite loop of internal redirects or + subrequests. Such loops are usually caused by misconfigurations.</p> + + <p>The directive stores two different limits, which are evaluated on + per-request basis. The first <var>number</var> is the maximum number of + internal redirects, that may follow each other. The second <var>number</var> + determines, how deep subrequests may be nested. If you specify only one + <var>number</var>, it will be assigned to both limits.</p> + + <div class="example"><h3>Example</h3><p><code> + LimitInternalRecursion 5 + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitrequestbody" id="limitrequestbody">Directiva</a> <a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restricts the total size of the HTTP request body sent +from the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestBody 0</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive specifies the number of <var>bytes</var> from 0 + (meaning unlimited) to 2147483647 (2GB) that are allowed in a + request body. See the note below for the limited applicability + to proxy requests.</p> + + <p>The <code class="directive">LimitRequestBody</code> directive allows + the user to set a limit on the allowed size of an HTTP request + message body within the context in which the directive is given + (server, per-directory, per-file or per-location). If the client + request exceeds that limit, the server will return an error + response instead of servicing the request. The size of a normal + request message body will vary greatly depending on the nature of + the resource and the methods allowed on that resource. CGI scripts + typically use the message body for retrieving form information. + Implementations of the <code>PUT</code> method will require + a value at least as large as any representation that the server + wishes to accept for that resource.</p> + + <p>This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service + attacks.</p> + + <p>If, for example, you are permitting file upload to a particular + location, and wish to limit the size of the uploaded file to 100K, + you might use the following directive:</p> + + <div class="example"><p><code> + LimitRequestBody 102400 + </code></p></div> + + <div class="note"><p>For a full description of how this directive is interpreted by + proxy requests, see the <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> documentation.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitrequestfields" id="limitrequestfields">Directiva</a> <a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the number of HTTP request header fields that +will be accepted from the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestFields 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p><var>Number</var> is an integer from 0 (meaning unlimited) to + 32767. The default value is defined by the compile-time + constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as + distributed).</p> + + <p>The <code class="directive">LimitRequestFields</code> directive allows + the server administrator to modify the limit on the number of + request header fields allowed in an HTTP request. A server needs + this value to be larger than the number of fields that a normal + client request might include. The number of request header fields + used by a client rarely exceeds 20, but this may vary among + different client implementations, often depending upon the extent + to which a user has configured their browser to support detailed + content negotiation. Optional HTTP extensions are often expressed + using request header fields.</p> + + <p>This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks. + The value should be increased if normal clients see an error + response from the server that indicates too many fields were + sent in the request.</p> + + <p>For example:</p> + + <div class="example"><p><code> + LimitRequestFields 50 + </code></p></div> + + <div class="warning"><h3>Warning</h3> + <p> When name-based virtual hosting is used, the value for this + directive is taken from the default (first-listed) virtual host for the + <code class="directive">NameVirtualHost</code> the connection was mapped to.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitrequestfieldsize" id="limitrequestfieldsize">Directiva</a> <a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the size of the HTTP request header allowed from the +client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive specifies the number of <var>bytes</var> + that will be allowed in an HTTP request header.</p> + + <p>The <code class="directive">LimitRequestFieldSize</code> directive + allows the server administrator to reduce or increase the limit + on the allowed size of an HTTP request header field. A server + needs this value to be large enough to hold any one header field + from a normal client request. The size of a normal request header + field will vary greatly among different client implementations, + often depending upon the extent to which a user has configured + their browser to support detailed content negotiation. SPNEGO + authentication headers can be up to 12392 bytes.</p> + + <p>This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks.</p> + + <p>For example:</p> + + <div class="example"><p><code> + LimitRequestFieldSize 4094 + </code></p></div> + + <div class="note">Under normal conditions, the value should not be changed from + the default.</div> + + <div class="warning"><h3>Warning</h3> + <p> When name-based virtual hosting is used, the value for this + directive is taken from the default (first-listed) virtual host for the + <code class="directive">NameVirtualHost</code> the connection was mapped to.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitrequestline" id="limitrequestline">Directiva</a> <a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limit the size of the HTTP request line that will be accepted +from the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestLine 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive sets the number of <var>bytes</var> that will be + allowed on the HTTP request-line.</p> + + <p>The <code class="directive">LimitRequestLine</code> directive allows + the server administrator to reduce or increase the limit on the allowed size + of a client's HTTP request-line. Since the request-line consists of the + HTTP method, URI, and protocol version, the + <code class="directive">LimitRequestLine</code> directive places a + restriction on the length of a request-URI allowed for a request + on the server. A server needs this value to be large enough to + hold any of its resource names, including any information that + might be passed in the query part of a <code>GET</code> request.</p> + + <p>This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks.</p> + + <p>For example:</p> + + <div class="example"><p><code> + LimitRequestLine 4094 + </code></p></div> + + <div class="note">Under normal conditions, the value should not be changed from + the default.</div> + + <div class="warning"><h3>Warning</h3> + <p> When name-based virtual hosting is used, the value for this + directive is taken from the default (first-listed) virtual host for the + <code class="directive">NameVirtualHost</code> the connection was mapped to.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitxmlrequestbody" id="limitxmlrequestbody">Directiva</a> <a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the size of an XML-based request body</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>Limit (in bytes) on maximum size of an XML-based request + body. A value of <code>0</code> will disable any checking.</p> + + <p>Example:</p> + + <div class="example"><p><code> + LimitXMLRequestBody 0 + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="location" id="location">Directiva</a> <a name="Location" id="Location"><Location></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Applies the enclosed directives only to matching +URLs</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Location + <var>URL-path</var>|<var>URL</var>> ... </Location></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><Location></code> directive + limits the scope of the enclosed directives by URL. It is similar to the + <code class="directive"><a href="#directory"><Directory></a></code> + directive, and starts a subsection which is terminated with a + <code></Location></code> directive. <code class="directive"><Location></code> sections are processed in the + order they appear in the configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and + <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files"><Files></a></code> sections.</p> + + <p><code class="directive"><Location></code> sections operate + completely outside the filesystem. This has several consequences. + Most importantly, <code class="directive"><Location></code> + directives should not be used to control access to filesystem + locations. Since several different URLs may map to the same + filesystem location, such access controls may by circumvented.</p> + + <p>The enclosed directives will be applied to the request if the path component + of the URL meets <em>any</em> of the following criteria: + </p> + <ul> + <li>The specified location matches exactly the path component of the URL. + </li> + <li>The specified location, which ends in a forward slash, is a prefix + of the path component of the URL (treated as a context root). + </li> + <li>The specified location, with the addition of a trailing slash, is a + prefix of the path component of the URL (also treated as a context root). + </li> + </ul> + <p> + In the example below, where no trailing slash is used, requests to + /private1, /private1/ and /private1/file.txt will have the enclosed + directives applied, but /private1other would not. + </p> + <div class="example"><p><code> + <Location /private1> + ... + </code></p></div> + <p> + In the example below, where a trailing slash is used, requests to + /private2/ and /private2/file.txt will have the enclosed + directives applied, but /private2 and /private2other would not. + </p> + <div class="example"><p><code> + <Location /private2<em>/</em>> + ... + </code></p></div> + + <div class="note"><h3>When to use <code class="directive"><Location></code></h3> + + <p>Use <code class="directive"><Location></code> to apply + directives to content that lives outside the filesystem. For + content that lives in the filesystem, use <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#files"><Files></a></code>. An exception is + <code><Location /></code>, which is an easy way to + apply a configuration to the entire server.</p> + </div> + + <p>For all origin (non-proxy) requests, the URL to be matched is a + URL-path of the form <code>/path/</code>. <em>No scheme, hostname, + port, or query string may be included.</em> For proxy requests, the + URL to be matched is of the form + <code>scheme://servername/path</code>, and you must include the + prefix.</p> + + <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches + any single character, and <code>*</code> matches any sequences of + characters. Neither wildcard character matches a / in the URL-path.</p> + + <p><a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular expressions</a> + can also be used, with the addition of the <code>~</code> + character. For example:</p> + + <div class="example"><p><code> + <Location ~ "/(extra|special)/data"> + </code></p></div> + + <p>would match URLs that contained the substring <code>/extra/data</code> + or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> behaves + identical to the regex version of <code class="directive"><Location></code>, and is preferred, for the + simple reason that <code>~</code> is hard to distinguish from + <code>-</code> in many fonts.</p> + + <p>The <code class="directive"><Location></code> + functionality is especially useful when combined with the + <code class="directive"><a href="#sethandler">SetHandler</a></code> + directive. For example, to enable status requests, but allow them + only from browsers at <code>example.com</code>, you might use:</p> + + <div class="example"><p><code> + <Location /status><br /> + <span class="indent"> + SetHandler server-status<br /> + Require host example.com<br /> + </span> + </Location> + </code></p></div> + + <div class="note"><h3>Note about / (slash)</h3> + <p>The slash character has special meaning depending on where in a + URL it appears. People may be used to its behavior in the filesystem + where multiple adjacent slashes are frequently collapsed to a single + slash (<em>i.e.</em>, <code>/home///foo</code> is the same as + <code>/home/foo</code>). In URL-space this is not necessarily true. + The <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> + directive and the regex version of <code class="directive"><Location></code> require you to explicitly specify multiple + slashes if that is your intention.</p> + + <p>For example, <code><LocationMatch ^/abc></code> would match + the request URL <code>/abc</code> but not the request URL <code> + //abc</code>. The (non-regex) <code class="directive"><Location></code> directive behaves similarly when used for + proxy requests. But when (non-regex) <code class="directive"><Location></code> is used for non-proxy requests it will + implicitly match multiple slashes with a single slash. For example, + if you specify <code><Location /abc/def></code> and the + request is to <code>/abc//def</code> then it will match.</p> + </div> + +<h3>Consulte también</h3> +<ul> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received.</li> +<li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="locationmatch" id="locationmatch">Directiva</a> <a name="LocationMatch" id="LocationMatch"><LocationMatch></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Applies the enclosed directives only to regular-expression +matching URLs</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><LocationMatch + <var>regex</var>> ... </LocationMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><LocationMatch></code> directive + limits the scope of the enclosed directives by URL, in an identical manner + to <code class="directive"><a href="#location"><Location></a></code>. However, + it takes a <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular expression</a> + as an argument instead of a simple string. For example:</p> + + <div class="example"><p><code> + <LocationMatch "/(extra|special)/data"> + </code></p></div> + + <p>would match URLs that contained the substring <code>/extra/data</code> + or <code>/special/data</code>.</p> + +<h3>Consulte también</h3> +<ul> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="loglevel" id="loglevel">Directiva</a> <a name="LogLevel" id="LogLevel">LogLevel</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Controls the verbosity of the ErrorLog</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LogLevel [<var>module</var>:]<var>level</var> + [<var>module</var>:<var>level</var>] ... +</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LogLevel warn</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Per-module and per-directory configuration is available in + Apache HTTP Server 2.3.6 and later</td></tr> +</table> + <p><code class="directive">LogLevel</code> adjusts the verbosity of the + messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following + <var>level</var>s are available, in order of decreasing + significance:</p> + + <table class="bordered"> + + <tr> + <th><strong>Level</strong> </th> + + <th><strong>Description</strong> </th> + + <th><strong>Example</strong> </th> + </tr> + + <tr> + <td><code>emerg</code> </td> + + <td>Emergencies - system is unusable.</td> + + <td>"Child cannot open lock file. Exiting"</td> + </tr> + + <tr> + <td><code>alert</code> </td> + + <td>Action must be taken immediately.</td> + + <td>"getpwuid: couldn't determine user name from uid"</td> + </tr> + + <tr> + <td><code>crit</code> </td> + + <td>Critical Conditions.</td> + + <td>"socket: Failed to get a socket, exiting child"</td> + </tr> + + <tr> + <td><code>error</code> </td> + + <td>Error conditions.</td> + + <td>"Premature end of script headers"</td> + </tr> + + <tr> + <td><code>warn</code> </td> + + <td>Warning conditions.</td> + + <td>"child process 1234 did not exit, sending another + SIGHUP"</td> + </tr> + + <tr> + <td><code>notice</code> </td> + + <td>Normal but significant condition.</td> + + <td>"httpd: caught SIGBUS, attempting to dump core in + ..."</td> + </tr> + + <tr> + <td><code>info</code> </td> + + <td>Informational.</td> + + <td>"Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..."</td> + </tr> + + <tr> + <td><code>debug</code> </td> + + <td>Debug-level messages</td> + + <td>"Opening config file ..."</td> + </tr> + <tr> + <td><code>trace1</code> </td> + + <td>Trace messages</td> + + <td>"proxy: FTP: control connection complete"</td> + </tr> + <tr> + <td><code>trace2</code> </td> + + <td>Trace messages</td> + + <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td> + </tr> + <tr> + <td><code>trace3</code> </td> + + <td>Trace messages</td> + + <td>"openssl: Handshake: start"</td> + </tr> + <tr> + <td><code>trace4</code> </td> + + <td>Trace messages</td> + + <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td> + </tr> + <tr> + <td><code>trace5</code> </td> + + <td>Trace messages</td> + + <td>"map lookup FAILED: map=rewritemap key=keyname"</td> + </tr> + <tr> + <td><code>trace6</code> </td> + + <td>Trace messages</td> + + <td>"cache lookup FAILED, forcing new map lookup"</td> + </tr> + <tr> + <td><code>trace7</code> </td> + + <td>Trace messages, dumping large amounts of data</td> + + <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td> + </tr> + <tr> + <td><code>trace8</code> </td> + + <td>Trace messages, dumping large amounts of data</td> + + <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td> + </tr> + </table> + + <p>When a particular level is specified, messages from all + other levels of higher significance will be reported as well. + <em>E.g.</em>, when <code>LogLevel info</code> is specified, + then messages with log levels of <code>notice</code> and + <code>warn</code> will also be posted.</p> + + <p>Using a level of at least <code>crit</code> is + recommended.</p> + + <p>For example:</p> + + <div class="example"><p><code> + LogLevel notice + </code></p></div> + + <div class="note"><h3>Note</h3> + <p>When logging to a regular file messages of the level + <code>notice</code> cannot be suppressed and thus are always + logged. However, this doesn't apply when logging is done + using <code>syslog</code>.</p> + </div> + + <p>Specifying a level without a module name will reset the level + for all modules to that level. Specifying a level with a module + name will set the level for that module only. It is possible to + use the module source file name, the module identifier, or the + module identifier with the trailing <code>_module</code> omitted + as module specification. This means the following three specifications + are equivalent:</p> + + <div class="example"><p><code> + LogLevel info ssl:warn<br /> + LogLevel info mod_ssl.c:warn<br /> + LogLevel info ssl_module:warn<br /> + </code></p></div> + + <p>It is also possible to change the level per directory:</p> + + <div class="example"><p><code> + LogLevel info<br /> + <Directory /usr/local/apache/htdocs/app><br /> + LogLevel debug<br /> + </Files> + </code></p></div> + + <div class="note"> + Per directory loglevel configuration only affects messages that are + logged after the request has been parsed and that are associated with + the request. Log messages which are associated with the connection or + the server are not affected. + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="maxkeepaliverequests" id="maxkeepaliverequests">Directiva</a> <a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Number of requests allowed on a persistent +connection</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">MaxKeepAliveRequests</code> directive + limits the number of requests allowed per connection when + <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is + set to <code>0</code>, unlimited requests will be allowed. We + recommend that this setting be kept to a high value for maximum + server performance.</p> + + <p>For example:</p> + + <div class="example"><p><code> + MaxKeepAliveRequests 500 + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="maxrangeoverlaps" id="maxrangeoverlaps">Directiva</a> <a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Number of overlapping ranges (eg: <code>100-200,150-300</code>) allowed before returning the complete + resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="maxrangereversals" id="maxrangereversals">Directiva</a> <a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Number of range reversals (eg: <code>100-200,50-70</code>) allowed before returning the complete + resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MaxRangeReversals default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRangeReversals 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="maxranges" id="maxranges">Directiva</a> <a name="MaxRanges" id="MaxRanges">MaxRanges</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Number of ranges allowed before returning the complete +resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MaxRanges default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRanges 200</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="mergeslashes" id="mergeslashes">Directiva</a> <a name="MergeSlashes" id="MergeSlashes">MergeSlashes</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Controls whether the server merges consecutive slashes in URLs. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MergeSlashes ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MergeSlashes ON</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Added in 2.4.39</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="mergetrailers" id="mergetrailers">Directiva</a> <a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determines whether trailers are merged into headers</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MergeTrailers [on|off]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MergeTrailers off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.4.11 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="mutex" id="mutex">Directiva</a> <a name="Mutex" id="Mutex">Mutex</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures mutex mechanism and lock file directory for all +or specified mutexes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Mutex default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr> +</table> + <p>The <code class="directive">Mutex</code> directive sets the mechanism, + and optionally the lock file location, that httpd and modules use + to serialize access to resources. Specify <code>default</code> as + the first argument to change the settings for all mutexes; specify + a mutex name (see table below) as the first argument to override + defaults only for that mutex.</p> + + <p>The <code class="directive">Mutex</code> directive is typically used in + the following exceptional situations:</p> + + <ul> + <li>change the mutex mechanism when the default mechanism selected + by <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a> has a functional or performance + problem</li> + + <li>change the directory used by file-based mutexes when the + default directory does not support locking</li> + </ul> + + <div class="note"><h3>Supported modules</h3> + <p>This directive only configures mutexes which have been registered + with the core server using the <code>ap_mutex_register()</code> API. + All modules bundled with httpd support the <code class="directive">Mutex</code> + directive, but third-party modules may not. Consult the documentation + of the third-party module, which must indicate the mutex name(s) which + can be configured if this directive is supported.</p> + </div> + + <p>The following mutex <em>mechanisms</em> are available:</p> + <ul> + <li><code>default | yes</code> + <p>This selects the default locking implementation, as determined by + <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a>. The default locking implementation can + be displayed by running <code class="program"><a href="../programs/httpd.html">httpd</a></code> with the + <code>-V</code> option.</p></li> + + <li><code>none | no</code> + <p>This effectively disables the mutex, and is only allowed for a + mutex if the module indicates that it is a valid choice. Consult the + module documentation for more information.</p></li> + + <li><code>posixsem</code> + <p>This is a mutex variant based on a Posix semaphore.</p> + + <div class="warning"><h3>Warning</h3> + <p>The semaphore ownership is not recovered if a thread in the process + holding the mutex segfaults, resulting in a hang of the web server.</p> + </div> + </li> + + <li><code>sysvsem</code> + <p>This is a mutex variant based on a SystemV IPC semaphore.</p> + + <div class="warning"><h3>Warning</h3> + <p>It is possible to "leak" SysV semaphores if processes crash + before the semaphore is removed.</p> + </div> + + <div class="warning"><h3>Security</h3> + <p>The semaphore API allows for a denial of service attack by any + CGIs running under the same uid as the webserver (<em>i.e.</em>, + all CGIs, unless you use something like <code class="program"><a href="../programs/suexec.html">suexec</a></code> + or <code>cgiwrapper</code>).</p> + </div> + </li> + + <li><code>sem</code> + <p>This selects the "best" available semaphore implementation, choosing + between Posix and SystemV IPC semaphores, in that order.</p></li> + + <li><code>pthread</code> + <p>This is a mutex variant based on cross-process Posix thread + mutexes.</p> + + <div class="warning"><h3>Warning</h3> + <p>On most systems, if a child process terminates abnormally while + holding a mutex that uses this implementation, the server will deadlock + and stop responding to requests. When this occurs, the server will + require a manual restart to recover.</p> + <p>Solaris is a notable exception as it provides a mechanism which + usually allows the mutex to be recovered after a child process + terminates abnormally while holding a mutex.</p> + <p>If your system implements the + <code>pthread_mutexattr_setrobust_np()</code> function, you may be able + to use the <code>pthread</code> option safely.</p> + </div> + </li> + + <li><code>fcntl:/path/to/mutex</code> + <p>This is a mutex variant where a physical (lock-)file and the + <code>fcntl()</code> function are used as the mutex.</p> + + <div class="warning"><h3>Warning</h3> + <p>When multiple mutexes based on this mechanism are used within + multi-threaded, multi-process environments, deadlock errors (EDEADLK) + can be reported for valid mutex operations if <code>fcntl()</code> + is not thread-aware, such as on Solaris.</p> + </div> + </li> + + <li><code>flock:/path/to/mutex</code> + <p>This is similar to the <code>fcntl:/path/to/mutex</code> method + with the exception that the <code>flock()</code> function is used to + provide file locking.</p></li> + + <li><code>file:/path/to/mutex</code> + <p>This selects the "best" available file locking implementation, + choosing between <code>fcntl</code> and <code>flock</code>, in that + order.</p></li> + </ul> + + <p>Most mechanisms are only available on selected platforms, where the + underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a> support it. Mechanisms + which aren't available on all platforms are <em>posixsem</em>, + <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>, + <em>flock</em>, and <em>file</em>.</p> + + <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>, + the path, if provided, is a directory where the lock file will be created. + The default directory is httpd's run-time file directory relative to + <code class="directive"><a href="#serverroot">ServerRoot</a></code>. Always use a local disk + filesystem for <code>/path/to/mutex</code> and never a directory residing + on a NFS- or AFS-filesystem. The basename of the file will be the mutex + type, an optional instance string provided by the module, and unless the + <code>OmitPID</code> keyword is specified, the process id of the httpd + parent process will be appended to to make the file name unique, avoiding + conflicts when multiple httpd instances share a lock file directory. For + example, if the mutex name is <code>mpm-accept</code> and the lock file + directory is <code>/var/httpd/locks</code>, the lock file name for the + httpd instance with parent process id 12345 would be + <code>/var/httpd/locks/mpm-accept.12345</code>.</p> + + <div class="warning"><h3>Security</h3> + <p>It is best to <em>avoid</em> putting mutex files in a world-writable + directory such as <code>/var/tmp</code> because someone could create + a denial of service attack and prevent the server from starting by + creating a lockfile with the same name as the one the server will try + to create.</p> + </div> + + <p>The following table documents the names of mutexes used by httpd + and bundled modules.</p> + + <table class="bordered"><tr class="header"> + <th>Mutex name</th> + <th>Module(s)</th> + <th>Protected resource</th> + </tr> +<tr> + <td><code>mpm-accept</code></td> + <td><code class="module"><a href="../mod/prefork.html">prefork</a></code> and <code class="module"><a href="../mod/worker.html">worker</a></code> MPMs</td> + <td>incoming connections, to avoid the thundering herd problem; + for more information, refer to the + <a href="../misc/perf-tuning.html">performance tuning</a> + documentation</td> + </tr> +<tr class="odd"> + <td><code>authdigest-client</code></td> + <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td> + <td>client list in shared memory</td> + </tr> +<tr> + <td><code>authdigest-opaque</code></td> + <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td> + <td>counter in shared memory</td> + </tr> +<tr class="odd"> + <td><code>ldap-cache</code></td> + <td><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code></td> + <td>LDAP result cache</td> + </tr> +<tr> + <td><code>rewrite-map</code></td> + <td><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></td> + <td>communication with external mapping programs, to avoid + intermixed I/O from multiple requests</td> + </tr> +<tr class="odd"> + <td><code>ssl-cache</code></td> + <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td> + <td>SSL session cache</td> + </tr> +<tr> + <td><code>ssl-stapling</code></td> + <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td> + <td>OCSP stapling response cache</td> + </tr> +<tr class="odd"> + <td><code>watchdog-callback</code></td> + <td><code class="module"><a href="../mod/mod_watchdog.html">mod_watchdog</a></code></td> + <td>callback function of a particular client module</td> + </tr> +</table> + + <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd + parent process id from the lock file name.</p> + + <p>In the following example, the mutex mechanism for the MPM accept + mutex will be changed from the compiled-in default to <code>fcntl</code>, + with the associated lock file created in directory + <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes + will be changed from the compiled-in default to <code>sysvsem</code>.</p> + + <div class="example"><p><code> + Mutex default sysvsem<br /> + Mutex mpm-accept fcntl:/var/httpd/locks + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="namevirtualhost" id="namevirtualhost">Directiva</a> <a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Designates an IP address for name-virtual +hosting</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + +<p>A single <code class="directive">NameVirtualHost</code> directive +identifies a set of identical virtual hosts on which the server will +further select from on the basis of the <em>hostname</em> +requested by the client. The <code class="directive">NameVirtualHost</code> +directive is a required directive if you want to configure +<a href="../vhosts/">name-based virtual hosts</a>.</p> + +<p>This directive, and the corresponding <code class="directive">VirtualHost</code>, +<em>must</em> be qualified with a port number if the server supports both HTTP +and HTTPS connections.</p> + +<p>Although <var>addr</var> can be a hostname, it is recommended +that you always use an IP address or a wildcard. A wildcard +NameVirtualHost matches only virtualhosts that also have a literal wildcard +as their argument.</p> + +<p>In cases where a firewall or other proxy receives the requests and +forwards them on a different IP address to the server, you must specify the +IP address of the physical interface on the machine which will be +servicing the requests. </p> + +<p> In the example below, requests received on interface 192.0.2.1 and port 80 +will only select among the first two virtual hosts. Requests received on +port 80 on any other interface will only select among the third and fourth +virtual hosts. In the common case where the interface isn't important +to the mapping, only the "*:80" NameVirtualHost and VirtualHost directives +are necessary.</p> + + <div class="example"><p><code> + NameVirtualHost 192.0.2.1:80<br /> + NameVirtualHost *:80<br /><br /> + + <VirtualHost 192.0.2.1:80><br /> + ServerName namebased-a.example.com<br /> + </VirtualHost><br /> + <br /> + <VirtualHost 192.0.2.1:80><br /> + Servername namebased-b.example.com<br /> + </VirtualHost><br /> + <br /> + <VirtualHost *:80><br /> + ServerName namebased-c.example.com <br /> + </VirtualHost><br /> + <br /> + <VirtualHost *:80><br /> + ServerName namebased-d.example.com <br /> + </VirtualHost><br /> + <br /> + + </code></p></div> + + <p>If no matching virtual host is found, then the first listed + virtual host that matches the IP address and port will be used.</p> + + + <p>IPv6 addresses must be enclosed in square brackets, as shown + in the following example:</p> + + <div class="example"><p><code> + NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080 + </code></p></div> + + <div class="note"><h3>Argument to <code class="directive"><VirtualHost></code> + directive</h3> + <p>Note that the argument to the <code class="directive"><VirtualHost></code> directive must + exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p> + + <div class="example"><p><code> + NameVirtualHost 192.0.2.2:80<br /> + <VirtualHost 192.0.2.2:80><br /> + # ...<br /> + </VirtualHost><br /> + </code></p></div> + </div> + +<h3>Consulte también</h3> +<ul> +<li><a href="../vhosts/">Virtual Hosts +documentation</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="options" id="options">Directiva</a> <a name="Options" id="Options">Options</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures what features are available in a particular +directory</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Options + [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Options All</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">Options</code> directive controls which + server features are available in a particular directory.</p> + + <p><var>option</var> can be set to <code>None</code>, in which + case none of the extra features are enabled, or one or more of + the following:</p> + + <dl> + <dt><code>All</code></dt> + + <dd>All options except for <code>MultiViews</code>. This is the default + setting.</dd> + + <dt><code>ExecCGI</code></dt> + + <dd> + Execution of CGI scripts using <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> + is permitted.</dd> + + <dt><code>FollowSymLinks</code></dt> + + <dd> + + The server will follow symbolic links in this directory. + <div class="note"> + <p>Even though the server follows the symlink it does <em>not</em> + change the pathname used to match against <code class="directive"><a href="#directory"><Directory></a></code> sections.</p> + <p>Note also, that this option <strong>gets ignored</strong> if set + inside a <code class="directive"><a href="#location"><Location></a></code> + section.</p> + <p>Omitting this option should not be considered a security restriction, + since symlink testing is subject to race conditions that make it + circumventable.</p> + </div></dd> + + <dt><code>Includes</code></dt> + + <dd> + Server-side includes provided by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + are permitted.</dd> + + <dt><code>IncludesNOEXEC</code></dt> + + <dd> + + Server-side includes are permitted, but the <code>#exec + cmd</code> and <code>#exec cgi</code> are disabled. It is still + possible to <code>#include virtual</code> CGI scripts from + <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed + directories.</dd> + + <dt><code>Indexes</code></dt> + + <dd> + If a URL which maps to a directory is requested, and there + is no <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> + (<em>e.g.</em>, <code>index.html</code>) in that directory, then + <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing + of the directory.</dd> + + <dt><code>MultiViews</code></dt> + + <dd> + <a href="../content-negotiation.html">Content negotiated</a> + "MultiViews" are allowed using + <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>. + <div class="note"><h3>Note</h3> <p>This option gets ignored if set + anywhere other than <code class="directive"><a href="#directory"><Directory></a></code>, as <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> + needs real resources to compare against and evaluate from.</p></div> + </dd> + + <dt><code>SymLinksIfOwnerMatch</code></dt> + + <dd>The server will only follow symbolic links for which the + target file or directory is owned by the same user id as the + link. + + <div class="note"><h3>Note</h3> <p>This option gets ignored if + set inside a <code class="directive"><a href="#location"><Location></a></code> section.</p> + <p>This option should not be considered a security restriction, + since symlink testing is subject to race conditions that make it + circumventable.</p></div> + </dd> + </dl> + + <p>Normally, if multiple <code class="directive">Options</code> could + apply to a directory, then the most specific one is used and + others are ignored; the options are not merged. (See <a href="../sections.html#mergin">how sections are merged</a>.) + However if <em>all</em> the options on the + <code class="directive">Options</code> directive are preceded by a + <code>+</code> or <code>-</code> symbol, the options are + merged. Any options preceded by a <code>+</code> are added to the + options currently in force, and any options preceded by a + <code>-</code> are removed from the options currently in + force. </p> + + <div class="warning"><h3>Warning</h3> + <p>Mixing <code class="directive">Options</code> with a <code>+</code> or + <code>-</code> with those without is not valid syntax, and is likely + to cause unexpected results.</p> + </div> + + <p>For example, without any <code>+</code> and <code>-</code> symbols:</p> + + <div class="example"><p><code> + <Directory /web/docs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory><br /> + <br /> + <Directory /web/docs/spec><br /> + <span class="indent"> + Options Includes<br /> + </span> + </Directory> + </code></p></div> + + <p>then only <code>Includes</code> will be set for the + <code>/web/docs/spec</code> directory. However if the second + <code class="directive">Options</code> directive uses the <code>+</code> and + <code>-</code> symbols:</p> + + <div class="example"><p><code> + <Directory /web/docs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory><br /> + <br /> + <Directory /web/docs/spec><br /> + <span class="indent"> + Options +Includes -Indexes<br /> + </span> + </Directory> + </code></p></div> + + <p>then the options <code>FollowSymLinks</code> and + <code>Includes</code> are set for the <code>/web/docs/spec</code> + directory.</p> + + <div class="note"><h3>Note</h3> + <p>Using <code>-IncludesNOEXEC</code> or + <code>-Includes</code> disables server-side includes completely + regardless of the previous setting.</p> + </div> + + <p>The default in the absence of any other settings is + <code>All</code>.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="protocol" id="protocol">Directiva</a> <a name="Protocol" id="Protocol">Protocol</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Protocol for a listening socket</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Protocol <var>protocol</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache 2.1.5 and later. +On Windows from Apache 2.3.3 and later.</td></tr> +</table> + <p>This directive specifies the protocol used for a specific listening socket. + The protocol is used to determine which module should handle a request, and + to apply protocol specific optimizations with the <code class="directive">AcceptFilter</code> + directive.</p> + + <p>You only need to set the protocol if you are running on non-standard ports, otherwise <code>http</code> is assumed for port 80 and <code>https</code> for port 443.</p> + + <p>For example, if you are running <code>https</code> on a non-standard port, specify the protocol explicitly:</p> + + <div class="example"><p><code> + Protocol https + </code></p></div> + + <p>You can also specify the protocol using the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive.</p> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive">AcceptFilter</code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="protocols" id="protocols">Directiva</a> <a name="Protocols" id="Protocols">Protocols</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Protocols available for a server/virtual host</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Protocols <var>protocol</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Protocols http/1.1</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#protocolshonororder">ProtocolsHonorOrder</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="protocolshonororder" id="protocolshonororder">Directiva</a> <a name="ProtocolsHonorOrder" id="ProtocolsHonorOrder">ProtocolsHonorOrder</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determines if order of Protocols determines precedence during negotiation</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ProtocolsHonorOrder On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ProtocolsHonorOrder On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#protocols">Protocols</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="qualifyredirecturl" id="qualifyredirecturl">Directiva</a> <a name="QualifyRedirectURL" id="QualifyRedirectURL">QualifyRedirectURL</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Controls whether the REDIRECT_URL environment variable is + fully qualified</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>QualifyRedirectURL On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>QualifyRedirectURL Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL On' was configured.</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="readbuffersize" id="readbuffersize">Directiva</a> <a name="ReadBufferSize" id="ReadBufferSize">ReadBufferSize</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Size of the buffers used to read data</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ReadBufferSize <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ReadBufferSize 8192</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.4.27 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="regexdefaultoptions" id="regexdefaultoptions">Directiva</a> <a name="RegexDefaultOptions" id="RegexDefaultOptions">RegexDefaultOptions</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Allow to configure global/default options for regexes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>RegexDefaultOptions [none] [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>RegexDefaultOptions DOTALL DOLLAR_ENDONLY</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Only available from Apache 2.4.30 and later.</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="registerhttpmethod" id="registerhttpmethod">Directiva</a> <a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Register non-standard HTTP methods</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.4.24 and later</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p><h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#httpprotocoloptions">HTTPProtocolOptions</a></code></li> +<li><code class="directive"><a href="../mod/mod_allowmethods.html#allowmethods">AllowMethods</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="rlimitcpu" id="rlimitcpu">Directiva</a> <a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the CPU consumption of processes launched +by Apache httpd children</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or <code>max</code> to indicate to the server that the limit should + be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as <code>root</code>, or in the initial startup + phase.</p> + + <p>This applies to processes forked off from Apache httpd children + servicing requests, not the Apache httpd children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked off from the Apache httpd parent such as piped + logs.</p> + + <p>CPU resource limits are expressed in seconds per + process.</p> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="rlimitmem" id="rlimitmem">Directiva</a> <a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the memory consumption of processes launched +by Apache httpd children</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or <code>max</code> to indicate to the server that the limit should + be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as <code>root</code>, or in the initial startup + phase.</p> + + <p>This applies to processes forked off from Apache httpd children + servicing requests, not the Apache httpd children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked off from the Apache httpd parent such as piped + logs.</p> + + <p>Memory resource limits are expressed in bytes per + process.</p> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="rlimitnproc" id="rlimitnproc">Directiva</a> <a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the number of processes that can be launched by +processes launched by Apache httpd children</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or <code>max</code> to indicate to the server that the limit + should be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as <code>root</code>, or in the initial startup + phase.</p> + + <p>This applies to processes forked off from Apache httpd children + servicing requests, not the Apache httpd children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked off from the Apache httpd parent such as piped + logs.</p> + + <p>Process limits control the number of processes per user.</p> + + <div class="note"><h3>Note</h3> + <p>If CGI processes are <strong>not</strong> running + under user ids other than the web server user id, this directive + will limit the number of processes that the server itself can + create. Evidence of this situation will be indicated by + <strong><code>cannot fork</code></strong> messages in the + <code>error_log</code>.</p> + </div> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="scriptinterpretersource" id="scriptinterpretersource">Directiva</a> <a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Technique for locating the interpreter for CGI +scripts</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Win32 only; +option <code>Registry-Strict</code> is available in Apache HTTP Server 2.0 and +later</td></tr> +</table> + <p>This directive is used to control how Apache httpd finds the + interpreter used to run CGI scripts. The default setting is + <code>Script</code>. This causes Apache httpd to use the interpreter pointed to + by the shebang line (first line, starting with <code>#!</code>) in the + script. On Win32 systems this line usually looks like:</p> + + <div class="example"><p><code> + #!C:/Perl/bin/perl.exe + </code></p></div> + + <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p> + + <div class="example"><p><code> + #!perl + </code></p></div> + + <p>Setting <code>ScriptInterpreterSource Registry</code> will + cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be + searched using the script file extension (e.g., <code>.pl</code>) as a + search key. The command defined by the registry subkey + <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey + <code>Shell\Open\Command</code> is used to open the script file. If the + registry keys cannot be found, Apache httpd falls back to the behavior of the + <code>Script</code> option.</p> + + <div class="warning"><h3>Security</h3> + <p>Be careful when using <code>ScriptInterpreterSource + Registry</code> with <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because + Apache httpd will try to execute <strong>every</strong> file within this + directory. The <code>Registry</code> setting may cause undesired + program calls on files which are typically not executed. For + example, the default open command on <code>.htm</code> files on + most Windows systems will execute Microsoft Internet Explorer, so + any HTTP request for an <code>.htm</code> file existing within the + script directory would start the browser in the background on the + server. This is a good way to crash your system within a minute or + so.</p> + </div> + + <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server + 2.0 does the same thing as <code>Registry</code> but uses only the + subkey <code>Shell\ExecCGI\Command</code>. The + <code>ExecCGI</code> key is not a common one. It must be + configured manually in the windows registry and hence prevents + accidental program calls on your system.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="seerequesttail" id="seerequesttail">Directiva</a> <a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determine if mod_status displays the first 63 characters +of a request or the last 63, assuming the request itself is greater than +63 chars.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SeeRequestTail On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>SeeRequestTail Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.2.7 and later.</td></tr> +</table> + <p>mod_status with <code>ExtendedStatus On</code> + displays the actual request being handled. + For historical purposes, only 63 characters of the request + are actually stored for display purposes. This directive + controls whether the 1st 63 characters are stored (the previous + behavior and the default) or if the last 63 characters are. This + is only applicable, of course, if the length of the request is + 64 characters or greater.</p> + + <p>If Apache httpd is handling <code>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</code> mod_status displays as follows: + </p> + + <table class="bordered"> + <tr> + <th>Off (default)</th> + <td>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples</td> + </tr> + <tr> + <th>On</th> + <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</td> + </tr> + </table> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serveradmin" id="serveradmin">Directiva</a> <a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Email address that the server includes in error +messages sent to the client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerAdmin</code> sets the contact address + that the server includes in any error messages it returns to the + client. If the <code>httpd</code> doesn't recognize the supplied argument + as an URL, it + assumes, that it's an <var>email-address</var> and prepends it with + <code>mailto:</code> in hyperlink targets. However, it's recommended to + actually use an email address, since there are a lot of CGI scripts that + make that assumption. If you want to use an URL, it should point to another + server under your control. Otherwise users may not be able to contact you in + case of errors.</p> + + <p>It may be worth setting up a dedicated address for this, e.g.</p> + + <div class="example"><p><code> + ServerAdmin www-admin@foo.example.com + </code></p></div> + <p>as users do not always mention that they are talking about the + server!</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serveralias" id="serveralias">Directiva</a> <a name="ServerAlias" id="ServerAlias">ServerAlias</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Alternate names for a host used when matching requests +to name-virtual hosts</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerAlias</code> directive sets the + alternate names for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>. The + <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p> + + <div class="example"><p><code> + <VirtualHost *:80><br /> + ServerName server.domain.com<br /> + ServerAlias server server2.domain.com server2<br /> + ServerAlias *.example.com<br /> + UseCanonicalName Off<br /> + # ...<br /> + </VirtualHost> + </code></p></div> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="servername" id="servername">Directiva</a> <a name="ServerName" id="ServerName">ServerName</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Hostname and port that the server uses to identify +itself</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerName</code> directive sets the + request scheme, hostname and + port that the server uses to identify itself. This is used when + creating redirection URLs.</p> + + <p>Additionally, <code class="directive">ServerName</code> is used (possibly + in conjunction with <code class="directive">ServerAlias</code>) to uniquely + identify a virtual host, when using <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p> + + <p>For example, if the name of the + machine hosting the web server is <code>simple.example.com</code>, + but the machine also has the DNS alias <code>www.example.com</code> + and you wish the web server to be so identified, the following + directive should be used:</p> + + <div class="example"><p><code> + ServerName www.example.com:80 + </code></p></div> + + <p>The <code class="directive">ServerName</code> directive + may appear anywhere within the definition of a server. However, + each appearance overrides the previous appearance (within that + server).</p> + + <p>If no <code class="directive">ServerName</code> is specified, then the + server attempts to deduce the hostname by performing a reverse + lookup on the IP address. If no port is specified in the + <code class="directive">ServerName</code>, then the server will use the + port from the incoming request. For optimal reliability and + predictability, you should specify an explicit hostname and port + using the <code class="directive">ServerName</code> directive.</p> + + <p>If you are using <a href="../vhosts/name-based.html">name-based virtual hosts</a>, + the <code class="directive">ServerName</code> inside a + <code class="directive"><a href="#virtualhost"><VirtualHost></a></code> + section specifies what hostname must appear in the request's + <code>Host:</code> header to match this virtual host.</p> + + <p>Sometimes, the server runs behind a device that processes SSL, + such as a reverse proxy, load balancer or SSL offload + appliance. When this is the case, specify the + <code>https://</code> scheme and the port number to which the + clients connect in the <code class="directive">ServerName</code> directive + to make sure that the server generates the correct + self-referential URLs. + </p> + + <p>See the description of the + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and + <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for + settings which determine whether self-referential URLs (e.g., by the + <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> module) will refer to the + specified port, or to the port number given in the client's request. + </p> + + <div class="warning"> + <p>Failure to set <code class="directive">ServerName</code> to a name that + your server can resolve to an IP address will result in a startup + warning. <code>httpd</code> will then use whatever hostname it can + determine, using the system's <code>hostname</code> command. This + will almost never be the hostname you actually want.</p> + <div class="example"><p><code> + httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName + </code></p></div> + </div> + + +<h3>Consulte también</h3> +<ul> +<li><a href="../dns-caveats.html">Issues Regarding DNS and + Apache HTTP Server</a></li> +<li><a href="../vhosts/">Apache HTTP Server virtual host + documentation</a></li> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li> +<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serverpath" id="serverpath">Directiva</a> <a name="ServerPath" id="ServerPath">ServerPath</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Legacy URL pathname for a name-based virtual host that +is accessed by an incompatible browser</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerPath</code> directive sets the legacy + URL pathname for a host, for use with <a href="../vhosts/">name-based virtual hosts</a>.</p> + +<h3>Consulte también</h3> +<ul> +<li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serverroot" id="serverroot">Directiva</a> <a name="ServerRoot" id="ServerRoot">ServerRoot</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Base directory for the server installation</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerRoot</code> directive sets the + directory in which the server lives. Typically it will contain the + subdirectories <code>conf/</code> and <code>logs/</code>. Relative + paths in other configuration directives (such as <code class="directive"><a href="#include">Include</a></code> or <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>, for example) are taken as + relative to this directory.</p> + + <div class="example"><h3>Example</h3><p><code> + ServerRoot /home/httpd + </code></p></div> + + +<h3>Consulte también</h3> +<ul> +<li><a href="../invoking.html">the <code>-d</code> + option to <code>httpd</code></a></li> +<li><a href="../misc/security_tips.html#serverroot">the + security tips</a> for information on how to properly set + permissions on the <code class="directive">ServerRoot</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serversignature" id="serversignature">Directiva</a> <a name="ServerSignature" id="ServerSignature">ServerSignature</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures the footer on server-generated documents</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerSignature Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">ServerSignature</code> directive allows the + configuration of a trailing footer line under server-generated + documents (error messages, <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> ftp directory + listings, <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> output, ...). The reason why you + would want to enable such a footer line is that in a chain of proxies, + the user often has no possibility to tell which of the chained servers + actually produced a returned error message.</p> + + <p>The <code>Off</code> + setting, which is the default, suppresses the footer line (and is + therefore compatible with the behavior of Apache-1.2 and + below). The <code>On</code> setting simply adds a line with the + server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host, + and the <code>EMail</code> setting additionally creates a + "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced + document.</p> + + <p>After version 2.0.44, the details of the server version number + presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="servertokens" id="servertokens">Directiva</a> <a name="ServerTokens" id="ServerTokens">ServerTokens</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures the <code>Server</code> HTTP response +header</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerTokens Full</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>This directive controls whether <code>Server</code> response + header field which is sent back to clients includes a + description of the generic OS-type of the server as well as + information about compiled-in modules.</p> + + <dl> + <dt><code>ServerTokens Full</code> (or not specified)</dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1 + (Unix) PHP/4.2.2 MyMod/1.2</code></dd> + + <dt><code>ServerTokens Prod[uctOnly]</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache</code></dd> + + <dt><code>ServerTokens Major</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache/2</code></dd> + + <dt><code>ServerTokens Minor</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache/2.4</code></dd> + + <dt><code>ServerTokens Min[imal]</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache/2.4.1</code></dd> + + <dt><code>ServerTokens OS</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1 + (Unix)</code></dd> + + </dl> + + <p>This setting applies to the entire server, and cannot be + enabled or disabled on a virtualhost-by-virtualhost basis.</p> + + <p>After version 2.0.44, this directive also controls the + information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p> + + <div class="note">Setting <code class="directive">ServerTokens</code> to less than + <code>minimal</code> is not recommended because it makes it more + difficult to debug interoperational problems. Also note that + disabling the Server: header does nothing at all to make your + server more secure; the idea of "security through obscurity" + is a myth and leads to a false sense of safety.</div> + + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="sethandler" id="sethandler">Directiva</a> <a name="SetHandler" id="SetHandler">SetHandler</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Forces all matching files to be processed by a +handler</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Moved into the core in Apache httpd 2.0</td></tr> +</table> + <p>When placed into an <code>.htaccess</code> file or a + <code class="directive"><a href="#directory"><Directory></a></code> or + <code class="directive"><a href="#location"><Location></a></code> + section, this directive forces all matching files to be parsed + through the <a href="../handler.html">handler</a> given by + <var>handler-name</var>. For example, if you had a directory you + wanted to be parsed entirely as imagemap rule files, regardless + of extension, you might put the following into an + <code>.htaccess</code> file in that directory:</p> + + <div class="example"><p><code> + SetHandler imap-file + </code></p></div> + + <p>Another example: if you wanted to have the server display a + status report whenever a URL of + <code>http://servername/status</code> was called, you might put + the following into <code>httpd.conf</code>:</p> + + <div class="example"><p><code> + <Location /status><br /> + <span class="indent"> + SetHandler server-status<br /> + </span> + </Location> + </code></p></div> + + <p>You can override an earlier defined <code class="directive">SetHandler</code> + directive by using the value <code>None</code>.</p> + <p><strong>Note:</strong> because SetHandler overrides default handlers, + normal behaviour such as handling of URLs ending in a slash (/) as + directories or index files is suppressed.</p> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="setinputfilter" id="setinputfilter">Directiva</a> <a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Sets the filters that will process client requests and POST +input</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">SetInputFilter</code> directive sets the + filter or filters which will process client requests and POST + input when they are received by the server. This is in addition to + any filters defined elsewhere, including the + <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code> + directive.</p> + + <p>If more than one filter is specified, they must be separated + by semicolons in the order in which they should process the + content.</p> + +<h3>Consulte también</h3> +<ul> +<li><a href="../filter.html">Filters</a> documentation</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="setoutputfilter" id="setoutputfilter">Directiva</a> <a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Sets the filters that will process responses from the +server</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Anula:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">SetOutputFilter</code> directive sets the filters + which will process responses from the server before they are + sent to the client. This is in addition to any filters defined + elsewhere, including the + <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code> + directive.</p> + + <p>For example, the following configuration will process all files + in the <code>/www/data/</code> directory for server-side + includes.</p> + + <div class="example"><p><code> + <Directory /www/data/><br /> + <span class="indent"> + SetOutputFilter INCLUDES<br /> + </span> + </Directory> + </code></p></div> + + <p>If more than one filter is specified, they must be separated + by semicolons in the order in which they should process the + content.</p> + +<h3>Consulte también</h3> +<ul> +<li><a href="../filter.html">Filters</a> documentation</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="stricthostcheck" id="stricthostcheck">Directiva</a> <a name="StrictHostCheck" id="StrictHostCheck">StrictHostCheck</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Controls whether the server requires the requested hostname be + listed enumerated in the virtual host handling the request + </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>StrictHostCheck ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>StrictHostCheck OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Added in 2.4.49</td></tr> +</table><p>The documentation for this directive has + not been translated yet. Please have a look at the English + version.</p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="timeout" id="timeout">Directiva</a> <a name="TimeOut" id="TimeOut">TimeOut</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Amount of time the server will wait for +certain events before failing a request</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>TimeOut 60</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive">TimeOut</code> directive defines the length + of time Apache httpd will wait for I/O in various circumstances:</p> + + <ol> + <li>When reading data from the client, the length of time to + wait for a TCP packet to arrive if the read buffer is + empty.</li> + + <li>When writing data to the client, the length of time to wait + for an acknowledgement of a packet if the send buffer is + full.</li> + + <li>In <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, the length of time to wait for + output from a CGI script.</li> + + <li>In <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to + wait for output from a filtering process.</li> + + <li>In <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if + <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not + configured.</li> + </ol> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="traceenable" id="traceenable">Directiva</a> <a name="TraceEnable" id="TraceEnable">TraceEnable</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determines the behaviour on <code>TRACE</code> requests</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>TraceEnable on</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 1.3.34, 2.0.55 and later</td></tr> +</table> + <p>This directive overrides the behavior of <code>TRACE</code> for both + the core server and <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>. The default + <code>TraceEnable on</code> permits <code>TRACE</code> requests per + RFC 2616, which disallows any request body to accompany the request. + <code>TraceEnable off</code> causes the core server and + <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not + allowed) error to the client.</p> + + <p>Finally, for testing and diagnostic purposes only, request + bodies may be allowed using the non-compliant <code>TraceEnable + extended</code> directive. The core (as an origin server) will + restrict the request body to 64k (plus 8k for chunk headers if + <code>Transfer-Encoding: chunked</code> is used). The core will + reflect the full headers and all chunk headers with the response + body. As a proxy server, the request body is not restricted to 64k.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="undefine" id="undefine">Directiva</a> <a name="UnDefine" id="UnDefine">UnDefine</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Undefine the existence of a variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>Undoes the effect of a <code class="directive"><a href="#define">Define</a></code> or + of passing a <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p> + <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine"><IfDefine></a></code> sections without needing to alter + <code>-D</code> arguments in any startup scripts.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="usecanonicalname" id="usecanonicalname">Directiva</a> <a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures how the server determines its own name and +port</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>UseCanonicalName Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>In many situations Apache httpd must construct a <em>self-referential</em> + URL -- that is, a URL that refers back to the same server. With + <code>UseCanonicalName On</code> Apache httpd will use the hostname and port + specified in the <code class="directive"><a href="#servername">ServerName</a></code> + directive to construct the canonical name for the server. This name + is used in all self-referential URLs, and for the values of + <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p> + + <p>With <code>UseCanonicalName Off</code> Apache httpd will form + self-referential URLs using the hostname and port supplied by + the client if any are supplied (otherwise it will use the + canonical name, as defined above). These values are the same + that are used to implement <a href="../vhosts/name-based.html">name-based virtual hosts</a>, + and are available with the same clients. The CGI variables + <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be + constructed from the client supplied values as well.</p> + + <p>An example where this may be useful is on an intranet server + where you have users connecting to the machine using short + names such as <code>www</code>. You'll notice that if the users + type a shortname, and a URL which is a directory, such as + <code>http://www/splat</code>, <em>without the trailing + slash</em> then Apache httpd will redirect them to + <code>http://www.domain.com/splat/</code>. If you have + authentication enabled, this will cause the user to have to + authenticate twice (once for <code>www</code> and once again + for <code>www.domain.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the + FAQ on this subject for more information</a>). But if + <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then + Apache httpd will redirect to <code>http://www/splat/</code>.</p> + + <p>There is a third option, <code>UseCanonicalName DNS</code>, + which is intended for use with mass IP-based virtual hosting to + support ancient clients that do not provide a + <code>Host:</code> header. With this option Apache httpd does a + reverse DNS lookup on the server IP address that the client + connected to in order to work out self-referential URLs.</p> + + <div class="warning"><h3>Warning</h3> + <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code> + they may be broken by this option. The client is essentially free + to give whatever value they want as a hostname. But if the CGI is + only using <code>SERVER_NAME</code> to construct self-referential URLs + then it should be just fine.</p> + </div> + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directiva</a> <a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures how the server determines its own name and +port</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p>In many situations Apache httpd must construct a <em>self-referential</em> + URL -- that is, a URL that refers back to the same server. With + <code>UseCanonicalPhysicalPort On</code> Apache httpd will, when + constructing the canonical port for the server to honor + the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive, + provide the actual physical port number being used by this request + as a potential port. With <code>UseCanonicalPhysicalPort Off</code> + Apache httpd will not ever use the actual physical port number, instead + relying on all configured information to construct a valid port number.</p> + + <div class="note"><h3>Note</h3> + <p>The ordering of when the physical port is used is as follows:<br /><br /> + <code>UseCanonicalName On</code></p> + <ul> + <li>Port provided in <code>Servername</code></li> + <li>Physical port</li> + <li>Default port</li> + </ul> + <code>UseCanonicalName Off | DNS</code> + <ul> + <li>Parsed port from <code>Host:</code> header</li> + <li>Physical port</li> + <li>Port provided in <code>Servername</code></li> + <li>Default port</li> + </ul> + + <p>With <code>UseCanonicalPhysicalPort Off</code>, the + physical ports are removed from the ordering.</p> + </div> + + +<h3>Consulte también</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="virtualhost" id="virtualhost">Directiva</a> <a name="VirtualHost" id="VirtualHost"><VirtualHost></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only to a specific +hostname or IP address</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><VirtualHost + <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]] + ...> ... </VirtualHost></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr> +<tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><VirtualHost></code> and + <code></VirtualHost></code> are used to enclose a group of + directives that will apply only to a particular virtual host. Any + directive that is allowed in a virtual host context may be + used. When the server receives a request for a document on a + particular virtual host, it uses the configuration directives + enclosed in the <code class="directive"><VirtualHost></code> + section. <var>Addr</var> can be:</p> + + <ul> + <li>The IP address of the virtual host;</li> + + <li>A fully qualified domain name for the IP address of the + virtual host (not recommended);</li> + + <li>The character <code>*</code>, which is used only in combination with + <code>NameVirtualHost *</code> to match all IP addresses; or</li> + + <li>The string <code>_default_</code>, which is used only + with IP virtual hosting to catch unmatched IP addresses.</li> + </ul> + + <div class="example"><h3>Example</h3><p><code> + <VirtualHost 10.1.2.3><br /> + <span class="indent"> + ServerAdmin webmaster@host.example.com<br /> + DocumentRoot /www/docs/host.example.com<br /> + ServerName host.example.com<br /> + ErrorLog logs/host.example.com-error_log<br /> + TransferLog logs/host.example.com-access_log<br /> + </span> + </VirtualHost> + </code></p></div> + + + <p>IPv6 addresses must be specified in square brackets because + the optional port number could not be determined otherwise. An + IPv6 example is shown below:</p> + + <div class="example"><p><code> + <VirtualHost [2001:db8::a00:20ff:fea7:ccea]><br /> + <span class="indent"> + ServerAdmin webmaster@host.example.com<br /> + DocumentRoot /www/docs/host.example.com<br /> + ServerName host.example.com<br /> + ErrorLog logs/host.example.com-error_log<br /> + TransferLog logs/host.example.com-access_log<br /> + </span> + </VirtualHost> + </code></p></div> + + <p>Each Virtual Host must correspond to a different IP address, + different port number or a different host name for the server, + in the former case the server machine must be configured to + accept IP packets for multiple addresses. (If the machine does + not have multiple network interfaces, then this can be + accomplished with the <code>ifconfig alias</code> command -- if + your OS supports it).</p> + + <div class="note"><h3>Note</h3> + <p>The use of <code class="directive"><VirtualHost></code> does + <strong>not</strong> affect what addresses Apache httpd listens on. You + may need to ensure that Apache httpd is listening on the correct addresses + using <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p> + </div> + + <p>When using IP-based virtual hosting, the special name + <code>_default_</code> can be specified in + which case this virtual host will match any IP address that is + not explicitly listed in another virtual host. In the absence + of any <code>_default_</code> virtual host the "main" server config, + consisting of all those definitions outside any VirtualHost + section, is used when no IP-match occurs.</p> + + <p>You can specify a <code>:port</code> to change the port that is + matched. If unspecified then it defaults to the same port as the + most recent <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> + statement of the main server. You may also specify <code>:*</code> + to match all ports on that address. (This is recommended when used + with <code>_default_</code>.)</p> + + <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be + specified inside each <code class="directive"><VirtualHost></code> block. If it is absent, the + <code class="directive"><a href="#servername">ServerName</a></code> from the "main" + server configuration will be inherited.</p> + + <p>If no matching virtual host is found, then the first listed + virtual host that matches the IP address will be used. As a + consequence, the first listed virtual host is the default virtual + host.</p> + + <div class="warning"><h3>Security</h3> + <p>See the <a href="../misc/security_tips.html">security tips</a> + document for details on why your security could be compromised if the + directory where log files are stored is writable by anyone other + than the user that starts the server.</p> + </div> + +<h3>Consulte también</h3> +<ul> +<li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li> +<li><a href="../dns-caveats.html">Issues Regarding DNS and + Apache HTTP Server</a></li> +<li><a href="../bind.html">Setting + which addresses and ports Apache HTTP Server uses</a></li> +<li><a href="../sections.html">How <Directory>, <Location> + and <Files> 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>Idiomas disponibles: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comentarios</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/core.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Licencia bajo los términos de la <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/">Módulos</a> | <a href="../mod/directives.html">Directivas</a> | <a href="http://wiki.apache.org/httpd/FAQ">Preguntas Frecuentes</a> | <a href="../glossary.html">Glosario</a> | <a href="../sitemap.html">Mapa del sitio web</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/mod/core.html.fr.utf8 b/docs/manual/mod/core.html.fr.utf8 new file mode 100644 index 0000000..0e9abf2 --- /dev/null +++ b/docs/manual/mod/core.html.fr.utf8 @@ -0,0 +1,5669 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>core - Serveur HTTP Apache Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p> +<p class="apache">Serveur HTTP Apache Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">Serveur HTTP</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Modules</a></div> +<div id="page-content"> +<div id="preamble"><h1>Fonctionalités de Base Apache</h1> +<div class="toplang"> +<p><span>Langues Disponibles: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Fonctionnalités de base du serveur HTTP Apache toujours +disponibles</td></tr> +<tr><th><a href="module-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr></table> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">Directives</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgivar">CGIVar</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxpipelined">FlushMaxPipelined</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxthreshold">FlushMaxThreshold</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#httpprotocoloptions">HttpProtocolOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#if"><If></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdirective"><IfDirective></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#iffile"><IfFile></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifsection"><IfSection></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergeslashes">MergeSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocols">Protocols</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocolshonororder">ProtocolsHonorOrder</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#qualifyredirecturl">QualifyRedirectURL</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#readbuffersize">ReadBufferSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#regexdefaultoptions">RegexDefaultOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#stricthostcheck">StrictHostCheck</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li> +</ul> +<h3>Traitement des bugs</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">Journal des modifications de httpd</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=core">Problèmes connus</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=core">Signaler un bug</a></li></ul><h3>Voir aussi</h3> +<ul class="seealso"> +<li><a href="#comments_section">Commentaires</a></li></ul></div> + +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="acceptfilter" id="acceptfilter">Directive</a> <a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Permet d'optimiser la configuration d'une socket pour +l'écoute d'un protocole</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>AcceptFilter <var>protocole</var> <var>filtre +d'acceptation</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive permet d'effectuer une optimisation de la socket + d'écoute d'un type de protocole en fonction du système + d'exploitation. Le but premier est de faire en sorte que le noyau + n'envoie pas de socket au processus du serveur jusqu'à ce que + des données soient reçues, ou qu'une requête HTTP complète soit mise + en tampon. Seuls les <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter& sektion=9">Filtres d'acceptation de FreeBSD</a>, le filtre plus + primitif <code>TCP_DEFER_ACCEPT</code> sous Linux, et la version + optimisée d'AcceptEx() de Windows sont actuellement supportés.</p> + + <p>L'utilisation de l'argument <code>none</code> va désactiver tout + filtre d'acceptation pour ce protocole. Ceci s'avère utile pour les + protocoles qui nécessitent l'envoi de données par le serveur en + premier, comme <code>ftp:</code> ou <code>nntp</code>:</p> + <pre class="prettyprint lang-config">AcceptFilter nntp none</pre> + + + <p>Les noms de protocoles par défaut sont <code>https</code> pour le + port 443 et <code>http</code> pour tous les autres ports. Pour + spécifier un autre protocole à utiliser avec un port en écoute, + ajoutez l'argument <var>protocol</var> à la directive <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p> + + <p>Sous FreeBSD, les valeurs par défaut sont :</p> + <pre class="prettyprint lang-config">AcceptFilter http httpready +AcceptFilter https dataready</pre> + + + <p>Le filtre d'acceptation <code>httpready</code> met en tampon des + requêtes HTTP entières au niveau du noyau. Quand une requête + entière a été reçue, le noyau l'envoie au serveur. Voir la page de + manuel de <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http& sektion=9">accf_http(9)</a> pour plus de détails. Comme les requêtes + HTTPS sont chiffrées, celles-ci n'autorisent que le filtre <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data& sektion=9">accf_data(9)</a>.</p> + + <p>Sous Linux, les valeurs par défaut sont :</p> + <pre class="prettyprint lang-config">AcceptFilter http data +AcceptFilter https data</pre> + + + <p>Le filtre <code>TCP_DEFER_ACCEPT</code> de Linux ne supporte pas + la mise en tampon des requêtes http. Toute valeur autre que + <code>none</code> active le filtre <code>TCP_DEFER_ACCEPT</code> + pour ce protocole. Pour plus de détails, voir la page de + manuel Linux de <a href="http://man7.org/linux/man-pages/man7/tcp.7.html">tcp(7)</a>.</p> + + <p>Sous Windows, les valeurs par défaut sont :</p> + <pre class="prettyprint lang-config">AcceptFilter http connect +AcceptFilter https connect</pre> + + + <p>Le module MPM pour Windows mpm_winnt utilise la directive + AcceptFilter comme commutateur de l'API AcceptEx(), et ne supporte + pas la mise en tampon du protocole http. <code>connect</code> + utilise l'API AcceptEx(), extrait aussi les adresses réseau finales, + mais à l'instar de <code>none</code>, la valeur <code>connect</code> + n'attend pas la transmission des données initiales.</p> + + <p>Sous Windows, <code>none</code> utilise accept() au lieu + d'AcceptEx(), et ne recycle pas les sockets entre les connexions. + Ceci s'avère utile pour les interfaces réseau dont le pilote est + défectueux, ainsi que pour certains fournisseurs de réseau comme les + pilotes vpn, ou les filtres anti-spam, anti-virus ou + anti-spyware.</p> + + <div class="warning"> + <h3>L'AcceptFilter <code>data</code> (Windows)</h3> + + <p>Jusqu'à la version 2.4.23, le filtre d'acceptation <code>data</code> + attendait que des données aient été transmises et que le tampon de données + initial et l'adresse réseau finale aient été déterminés par l'invocation + AcceptEx(). Cette implémentation étant vulnérable à une attaque de type + denial of service, elle a été désactivée.</p> + + <p>La version actuelle de httpd prend par défaut le filtre + <code>connect</code> sous Windows, et reprendra la valeur + <code>data</code> si <code>data</code> est spécifié. Il est fortement + conseillé aux utilisateurs des versions plus anciennes de définir + explicitement le filtre <code>connect</code> pour leurs AcceptFilter + comme indiqué plus haut.</p> + </div> + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#protocol">Protocol</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="acceptpathinfo" id="acceptpathinfo">Directive</a> <a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Les ressources acceptent des informations sous forme d'un +nom de chemin en fin de requête.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>AcceptPathInfo Default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + + <p>Cette directive permet de définir si les requêtes contenant des + informations sous forme d'un nom de chemin suivant le nom d'un + fichier réel (ou un fichier qui n'existe pas dans un répertoire qui + existe) doivent être acceptées ou rejetées. Les scripts peuvent + accéder à cette information via la variable d'environnement + <code>PATH_INFO</code>.</p> + + <p>Supposons par exemple que <code>/test/</code> pointe vers un + répertoire qui ne contient que le fichier <code>here.html</code>. + Les requêtes pour <code>/test/here.html/more</code> et + <code>/test/nothere.html/more</code> vont affecter la valeur + <code>/more</code> à la variable d'environnement + <code>PATH_INFO</code>.</p> + + <p>L'argument de la directive <code class="directive">AcceptPathInfo</code> + possède trois valeurs possibles :</p> + <dl> + <dt><code>Off</code></dt><dd>Une requête ne sera acceptée que si + elle correspond à un chemin qui existe. Par conséquent, une requête + contenant une information de chemin après le nom de fichier réel + comme <code>/test/here.html/more</code> dans l'exemple ci-dessus + renverra une erreur "404 NOT FOUND".</dd> + + <dt><code>On</code></dt><dd>Une requête sera acceptée si la partie + principale du chemin correspond à un fichier existant. Dans + l'exemple ci-dessus <code>/test/here.html/more</code>, la requête + sera acceptée si <code>/test/here.html</code> correspond à un nom de + fichier valide.</dd> + + <dt><code>Default</code></dt><dd>Le traitement des requêtes est + déterminé par le <a href="../handler.html">gestionnaire</a> responsable de la requête. + Le gestionnaire de base pour les fichiers normaux rejette par défaut + les requêtes avec <code>PATH_INFO</code>. Les gestionnaires qui + servent des scripts, comme<a href="mod_cgi.html">cgi-script</a> et <a href="mod_isapi.html">isapi-handler</a>, acceptent en général par + défaut les requêtes avec <code>PATH_INFO</code>.</dd> + </dl> + + <p>Le but premier de la directive <code>AcceptPathInfo</code> est de + vous permettre de remplacer le choix du gestionnaire d'accepter ou + de rejeter <code>PATH_INFO</code>. Ce remplacement est nécessaire + par exemple, lorsque vous utilisez un <a href="../filter.html">filtre</a>, comme <a href="mod_include.html">INCLUDES</a>, pour générer un contenu basé + sur <code>PATH_INFO</code>. Le gestionnaire de base va en général + rejeter la requête, et vous pouvez utiliser la configuration + suivante pour utiliser un tel script :</p> +<pre class="prettyprint lang-config"><Files "mypaths.shtml"> + Options +Includes + SetOutputFilter INCLUDES + AcceptPathInfo On +</Files></pre> + + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="accessfilename" id="accessfilename">Directive</a> <a name="AccessFileName" id="AccessFileName">AccessFileName</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Nom du fichier de configuration distribué</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>AccessFileName <var>nom-du-fichier</var> +[<var>nom-du-fichier</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>AccessFileName .htaccess</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Au cours du traitement d'une requête, le serveur recherche le + premier fichier de configuration existant à partir de la liste + de noms dans chaque répertoire composant le chemin du document, à + partir du moment où les fichiers de configuration distribués sont <a href="#allowoverride">activés pour ce répertoire</a>. Par exemple + :</p> + + <pre class="prettyprint lang-config">AccessFileName .acl</pre> + + + <p>avant de renvoyer le document + <code>/usr/local/web/index.html</code>, le serveur va rechercher les + fichiers <code>/.acl</code>, <code>/usr/.acl</code>, + <code>/usr/local/.acl</code> et <code>/usr/local/web/.acl</code> + pour y lire d'éventuelles directives, à moins quelles n'aient été + désactivées avec</p> + + <pre class="prettyprint lang-config"><Directory "/"> + AllowOverride None +</Directory></pre> + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Fichiers de configuration</a></li> +<li><a href="../howto/htaccess.html">Fichiers .htaccess</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="adddefaultcharset" id="adddefaultcharset">Directive</a> <a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Paramètre jeu de caractères par défaut à ajouter quand le +type de contenu d'une réponse est <code>text/plain</code> ou +<code>text/html</code></td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>AddDefaultCharset On|Off|<var>jeu de caractères</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>AddDefaultCharset Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive spécifie une valeur par défaut pour le paramètre + jeu de caractères du type de média (le nom d'un codage de + caractères) à ajouter à une réponse, si et seulement si le type de + contenu de la réponse est soit <code>text/plain</code>, soit + <code>text/html</code>. Ceci va remplacer + tout jeu de caractères spécifié dans le corps de la réponse via un + élément <code>META</code>, bien que cet effet dépende en fait + souvent de la configuration du client de l'utilisateur. La + définition de <code>AddDefaultCharset Off</code> désactive cette + fonctionnalité. <code>AddDefaultCharset On</code> ajoute un jeu de + caractères par défaut de <code>iso-8859-1</code>. Toute autre valeur + peut être définie via le paramètre <var>jeu de caractères</var>, qui + doit appartenir à la liste des <a href="http://www.iana.org/assignments/character-sets">valeurs de + jeux de caractères enregistrés par l'IANA</a> à utiliser dans les + types de média Internet (types MIME). + Par exemple :</p> + + <pre class="prettyprint lang-config">AddDefaultCharset utf-8</pre> + + + <p>La directive <code class="directive">AddDefaultCharset</code> ne doit + être utilisée que lorsque toutes les ressources textes auxquelles + elle s'applique possèdent le jeu de caractère spécifié, et qu'il est + trop contraignant de définir leur jeu de caractères + individuellement. Un exemple de ce type est l'ajout du paramètre jeu + de caractères aux ressources comportant un contenu généré, comme les + scripts CGI hérités qui peuvent être vulnérables à des attaques de + type cross-site scripting à cause des données utilisateurs incluses + dans leur sortie. Notez cependant qu'une meilleur solution consiste + à corriger (ou supprimer) ces scripts, car la définition d'un jeu de + caractères par défaut ne protège pas les utilisateurs qui ont activé + la fonctionnalité "Détection automatique de l'encodage des + caractères" dans leur navigateur.</p> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="allowencodedslashes" id="allowencodedslashes">Directive</a> <a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Détermine si les séparateurs de chemin encodés sont +autorisés à transiter dans les URLs tels quels</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>AllowEncodedSlashes On|Off|NoDecode</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>L'option NoDecode est disponible depuis la version +2.3.12.</td></tr> +</table> + <p>La directive <code class="directive">AllowEncodedSlashes</code> permet + l'utilisation des URLs contenant des séparateurs de chemin + encodés dans la partie chemin + (<code>%2F</code> pour <code>/</code> et même <code>%5C</code> pour + <code>\</code> sur les systèmes concernés).</p> + + <p>Avec la valeur par défaut, <code>Off</code>, de telles URLs sont + refusées et provoquent le renvoi d'une erreur 404 (Not found).</p> + + <p>Avec la valeur <code>On</code>, ces URLs sont acceptées, et les + slashes encodés sont décodés comme tout autre caractère codé.</p> + + <p>Avec la valeur <code>NoDecode</code>, ces URLs sont acceptées, + mais les slashes codés ne sont pas décodés et laissés dans leur état + codé.</p> + + <p>Définir <code class="directive">AllowEncodedSlashes</code> à + <code>On</code> est surtout utile en association avec + <code>PATH_INFO</code>.</p> + + <div class="note"><h3>Note</h3> + <p>Si le codage des slashes dans la partie chemin est nécessaire, + l'utilisation de l'option <code>NoDecode</code> est fortement + recommandée par mesure de sécurité. Permettre le décodage des + slashes pourrait éventuellement induire l'autorisation de chemins + non sûrs.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="allowoverride" id="allowoverride">Directive</a> <a name="AllowOverride" id="AllowOverride">AllowOverride</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types de directives autorisées dans les fichiers +<code>.htaccess</code></td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>AllowOverride All|None|<var>type directive</var> +[<var>type directive</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>AllowOverride None à partir de la version 2.3.9, AllowOverride +All pour les versions antérieures</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Lorsque le serveur trouve un fichier <code>.htaccess</code> (dont + le nom est défini par la directive <code class="directive"><a href="#accessfilename">AccessFileName</a></code>), il doit savoir lesquelles + des directives placées dans ce fichier sont autorisées à modifier la + configuration préexistante.</p> + + <div class="note"><h3>Valable seulement dans les sections + <Directory></h3> + La directive <code class="directive">AllowOverride</code> ne peut être + utilisée que dans les sections <code class="directive"><a href="#directory"><Directory></a></code> définies sans expressions + rationnelles, et non dans les sections <code class="directive"><a href="#location"><Location></a></code>, <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> ou + <code class="directive"><a href="#files"><Files></a></code>. + </div> + + <p>Lorsque cette directive et la directive <code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code> sont définies à <code>None</code>, les + fichiers <a href="#accessfilename">.htaccess</a> sont totalement + ignorés. Dans ce cas, le serveur n'essaiera même pas de lire les + fichiers <code>.htaccess</code> du système de fichiers.</p> + + <p>Lorsque cette directive est définie à <code>All</code>, toute + directive valable dans le <a href="directive-dict.html#Context">Contexte</a> .htaccess sera + autorisée dans les fichiers <code>.htaccess</code>.</p> + + <p>L'argument <var>type directive</var> peut contenir les + groupements de directives suivants (voir <a href="overrides.html">ce + document</a> pour obtenir la liste à jour des directives activées pour + chaque type de directive) :</p> + + <dl> + <dt><a href="overrides.html#override-authconfig">AuthConfig</a></dt> + + <dd> + + Permet l'utilisation des directives d'autorisation (<code class="directive"><a href="../mod/mod_authz_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>, + <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>, + <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> + + <dt><a href="overrides.html#override-fileinfo">FileInfo</a></dt> + + <dd> + Permet l'utilisation des directives qui contrôlent les types de + documents (directives <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>, + <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>, et directives du + module <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* et Remove*), des metadonnées + des documents (<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>), des directives du + module <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>), des directives du + module <code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code> directives (<code class="directive"><a href="../mod/mod_alias.html#redirect">Redirect</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirecttemp">RedirectTemp</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirectpermanent">RedirectPermanent</a></code>, <code class="directive"><a href="../mod/mod_alias.html#redirectmatch">RedirectMatch</a></code>), et de la directive + <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> du module + <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>. + </dd> + + <dt><a href="overrides.html#override-indexes">Indexes</a></dt> + + <dd> + Permet l'utilisation des directives qui contrôlent l'indexation + des répertoires (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <a href="mod_autoindex.html#indexoptions.fancyindexing"><code>FancyIndexing</code></a>, + <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code>, + <em>etc...</em>).</dd> + + <dt><a href="overrides.html#override-limit">Limit</a></dt> + + <dd> + Permet l'utilisation des directives contrôlant l'accès au serveur + (<code class="directive"><a href="../mod/mod_access_compat.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_access_compat.html#deny">Deny</a></code> et <code class="directive"><a href="../mod/mod_access_compat.html#order">Order</a></code>).</dd> + + <dt>Nonfatal=[Override|Unknown|All]</dt> + + <dd> + Permet d'utiliser l'option AllowOverride pour rendre les erreurs + de syntaxe non fatales dans les fichiers .htaccess : au lieu de + causer une Internal Server Error, les directives non autorisées ou + non reconnues seront ignorées et un avertissement enregistré dans + le journal : + <ul> + <li><strong>Nonfatal=Override</strong> rend les directives + interdite par AllowOverride non fatales.</li> + <li><strong>Nonfatal=Unknown</strong> rend les directives + inconnues non fatales. Sont concernées les erreurs de frappe + et les directives implémentées par un module non chargé.</li> + <li><strong>Nonfatal=All</strong> rend toutes les directives + précédentes non fatales.</li> + </ul> + <p>Notez qu'une erreur de syntaxe dans une directive valide + causera toujours une internal server error.</p> + <div class="warning"><h3>Sécurité</h3> + Les erreurs non fatales peuvent être à l'origine de problèmes + de sécurité pour les utilisateurs de fichiers .htaccess. Par + exemple, si AllowOverride interdit AuthConfig, toute + configuration utilisateur destinée à restreindre l'accès à un + site ne sera pas prise en compte. + </div> + </dd> + + <dt><a href="overrides.html#override-options">Options</a>[=<var>Option</var>,...]</dt> + + <dd> + Permet l'utilisation des directives contrôlant les fonctionnalités + spécifiques d'un répertoire (<code class="directive"><a href="#options">Options</a></code> et <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>). "Options" doit être + suivi d'un signe "égal", puis d'une liste d'options séparées par des + virgules (pas d'espaces) ; ces options doivent être définies à + l'aide de la commande <code class="directive"><a href="#options">Options</a></code>. + + <div class="note"><h3>Désactivation implicite des options</h3> + <p>Bien que la liste des options disponibles dans les fichiers + .htaccess puisse être limitée par cette directive, tant qu'un + directive <code class="directive"><a href="#options">Options</a></code> est + autorisée, toute autre option héritée peut être désactivée en + utilisant la syntaxe non-relative. En d'autres termes, ce + mécanisme ne peut pas forcer une option spécifique à rester + <em>activée</em> tout en permettant à toute autre option d'être + activée. + </p></div> + + <div class="example"><p><code> + AllowOverride Options=Indexes,MultiViews + </code></p></div> + + </dd> + </dl> + + <p>Exemple :</p> + + <pre class="prettyprint lang-config">AllowOverride AuthConfig Indexes</pre> + + + <p>Dans l'exemple ci-dessus, toutes les directives qui ne font + partie ni du groupe <code>AuthConfig</code>, ni du groupe + <code>Indexes</code>, provoquent une erreur "internal + server error".</p> + + <div class="note"><p>Pour des raisons de sécurité et de performance, ne + définissez pas <code>AllowOverride</code> à autre chose que + <code>None</code> dans votre bloc <code><Directory "/"></code>. + Recherchez plutôt (ou créez) le bloc <code><Directory></code> + qui se réfère au répertoire où vous allez précisément placer un + fichier <code>.htaccess</code>.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code></li> +<li><a href="../configuring.html">Fichiers de configuration</a></li> +<li><a href="../howto/htaccess.html">Fichiers .htaccess</a></li> +<li><a href="overrides.html">Override Class Index for .htaccess</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="allowoverridelist" id="allowoverridelist">Directive</a> <a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directives autorisées dans les fichiers <code>.htaccess</code></td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>AllowOverrideList None|<var>directive</var> +[<var>directive-type</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>AllowOverrideList None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Lorsque le serveur trouve un fichier <code>.htaccess</code> + (comme spécifié par la directive <code class="directive"><a href="#accessfilename">AccessFileName</a></code>), il doit savoir lesquelles + des directives déclarées dans ce fichier peuvent remplacer des + directives des fichiers de configuration du serveur.</p> + + <div class="note"><h3>Seulement disponible dans les sections <Directory></h3> + La directive <code class="directive">AllowOverrideList</code> n'est + disponible que dans les sections <code class="directive"><a href="#directory"><Directory></a></code> spécifiées sans expressions + rationnelles. + </div> + + <p>Lorsque cette directive et la directive <code class="directive"><a href="#allowoverride">AllowOverride</a></code> sont définies à + <code>None</code>, les fichiers <a href="#accessfilename">.htaccess</a> sont totalement ignorés. Dans + ce cas, le serveur ne cherchera même pas à lire des fichiers + <code>.htaccess</code> dans le système de fichiers.</p> + + <p>Example:</p> + + <pre class="prettyprint lang-config">AllowOverride None +AllowOverrideList Redirect RedirectMatch</pre> + + + <p>Dans l'exemple ci-dessus, seules les directives + <code>Redirect</code> et <code>RedirectMatch</code> sont autorisées. + Toutes les autres provoqueront une erreur interne du serveur.</p> + + <p>Example:</p> + + <pre class="prettyprint lang-config">AllowOverride AuthConfig +AllowOverrideList CookieTracking CookieName</pre> + + + <p>Dans l'exemple ci-dessus, la directive <code class="directive"><a href="#allowoverride">AllowOverride</a></code> autorise les directives du + groupement <code>AuthConfig</code>, et + <code class="directive">AllowOverrideList</code> n'autorise que deux directives du + groupement <code>FileInfo</code>. Toutes les autres provoqueront une erreur + interne du serveur.</p> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Fichiers de configuration</a></li> +<li><a href="../howto/htaccess.html">Fichiers .htaccess</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="cgimapextension" id="cgimapextension">Directive</a> <a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique permettant de localiser l'interpréteur des +scripts CGI</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>CGIMapExtension <var>chemin CGI</var> <var>.extension</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>NetWare uniquement</td></tr> +</table> + <p>Cette directive permet de contrôler la manière dont Apache httpd trouve + l'interpréteur servant à exécuter les scripts CGI. Par exemple, avec + la définition <code>CGIMapExtension sys:\foo.nlm .foo</code>, tous + les fichiers scripts CGI possédant une extension <code>.foo</code> + seront passés à l'interpréteur FOO.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="cgipassauth" id="cgipassauth">Directive</a> <a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Active la transmission d'en-têtes d'autorisation HTTP aux scripts en +tant que variables CGI</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>CGIPassAuth On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>CGIPassAuth Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>AuthConfig</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.13 du serveur HTTP +Apache</td></tr> +</table> + <p>La directive <code class="directive">CGIPassAuth</code> permet aux + scripts d'accéder aux en-têtes d'autorisation HTTP tels que + <code>Authorization</code>, en-tête nécessaire aux scripts qui + implémente une authentification HTTP de base. Normalement, ces + en-têtes HTTP sont invisibles pour les scripts car ils leurs + permettraient de voir les identifiants et mots de passe + utilisés pour accéder au serveur lorsque l'authentification HTTP de + base est activée au niveau du serveur web. Cette directive doit être + définie à "On" lorsque des scripts sont autorisés à implémenter une + authentification HTTP de base.</p> + + <p>Cette directive constitue une alternative à l'option de + compilation <code>SECURITY_HOLE_PASS_AUTHORIZATION</code> qui était + déjà disponible dans les versions précédentes du serveur HTTP + Apache.</p> + + <p>Cette option est prise en compte par tout module qui utilise + <code>ap_add_common_vars()</code>, comme <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, + <code class="module"><a href="../mod/mod_cgid.html">mod_cgid</a></code>, <code class="module"><a href="../mod/mod_proxy_fcgi.html">mod_proxy_fcgi</a></code>, + <code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code>, etc... En particulier, elle affecte + les modules qui ne traitent pas à proprement parler les requêtes, + mais utilisent quand-même cette API, comme + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> ou <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>. Les + modules tiers qui n'utilisent pas <code>ap_add_common_vars()</code> + peuvent aussi choisir de prendre en compte cette option.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="cgivar" id="cgivar">Directive</a> <a name="CGIVar" id="CGIVar">CGIVar</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contrôle la manière dont certaines variables CGI sont définies</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>CGIVar <var>variable</var> <var>rule</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.21 du serveur HTTP Apache</td></tr> +</table> + <p>Cette directive permet de contrôler la manière dont certaines variables CGI + sont définies.</p> + + <p>règles <strong>REQUEST_URI</strong> :</p> + <dl> + <dt><code>original-uri</code> (valeur par défaut)</dt> + <dd>La valeur est extraite de la requête originale, et ne tient pas compte + des redirections internes ou des sous-requêtes qui pourraient modifier la + ressource demandée.</dd> + <dt><code>current-uri</code></dt> + <dd>La valeur reflète la ressource en cours de traitement ; elle peut être + différente de la ressource demandée dans la requête initiale du client suite à + d'éventuelles redirections internes ou sous-requêtes.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="contentdigest" id="contentdigest">Directive</a> <a name="ContentDigest" id="ContentDigest">ContentDigest</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Active la génération d'un en-tête <code>Content-MD5</code> +dans la réponse HTTP</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ContentDigest On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ContentDigest Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive active la génération d'un en-tête + <code>Content-MD5</code> selon les définitions des RFC 1864 et + 2616.</p> + + <p>MD5 est un algorithme permettant de générer un condensé (parfois + appelé "empreinte") à partir de données d'une taille aléatoire ; le + degré de précision est tel que la moindre altération des données + d'origine entraîne une altération de l'empreinte.</p> + + <p>L'en-tête <code>Content-MD5</code> permet de vérifier + l'intégrité de la réponse HTTP dans son ensemble. Un serveur mandataire + ou un client peut utiliser cet en-tête pour rechercher une + éventuelle modification accidentelle de la réponse au cours de sa + transmission. Exemple d'en-tête :</p> + + <div class="example"><p><code> + Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== + </code></p></div> + + <p>Notez que des problèmes de performances peuvent affecter votre + serveur, car l'empreinte est générée pour chaque requête (il n'y a + pas de mise en cache).</p> + + <p>L'en-tête <code>Content-MD5</code> n'est envoyé qu'avec les + documents servis par le module <code class="module"><a href="../mod/core.html">core</a></code>, à l'exclusion + de tout autre module. Ainsi, les documents SSI, les sorties de + scripts CGI, et les réponses à des requêtes partielles (byte range) + ne comportent pas cet en-tête.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="defaultruntimedir" id="defaultruntimedir">Directive</a> <a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Répertoire de base des fichiers créés au cours de l'exécution du serveur</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>DefaultRuntimeDir <var>chemin-répertoire</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible depuis la version 2.4.2 du serveur HTTP Apache</td></tr> +</table> + <p>La directive <code class="directive">DefaultRuntimeDir</code> permet de + définir le répertoire dans lequel le serveur va créer les différents + fichiers relatifs à son exécution (mémoire partagée, verrous, + etc...). Si le chemin spécifié est relatif, le chemin absolu sera + généré relativement à la valeur de la directive + <code class="directive">ServerRoot</code></p> + + <p><strong>Example</strong></p> + <pre class="prettyprint lang-config">DefaultRuntimeDir scratch/</pre> + + + <p>La valeur par défaut de la directive + <code class="directive">DefaultRuntimeDir</code> peut être modifiée en + changeant la valeur de la macro <code>DEFAULT_REL_RUNTIMEDIR</code> + définie à la compilation.</p> + + <p>Note: si la valeur de <code class="directive">ServerRoot</code> n'a pas + été spécifiée avant d'utiliser cette directive, c'est la valeur par + défaut de <code class="directive">ServerRoot</code> qui sera utilisée pour + définir la base du répertoire.</p> + + +<h3>Voir aussi</h3> +<ul> +<li>Voir les <a href="../misc/security_tips.html#serverroot">conseils à propos de +sésurité</a> pour plus d'informations en vue de définir correctement les +permissions sur la racine du serveur <code class="directive">ServerRoot</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="defaulttype" id="defaulttype">Directive</a> <a name="DefaultType" id="DefaultType">DefaultType</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Les seuls effets de cette directive sont des émissions +d'avertissements si sa valeur est différente de <code>none</code>. Dans +les versions précédentes, DefaultType permettait de spécifier un type de +média à assigner par défaut au contenu d'une réponse pour lequel aucun +autre type de média n'avait été trouvé. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>DefaultType <var>type média|none</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>DefaultType none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>L'argument <code>none</code> est disponible dans les +versions d'Apache httpd 2.2.7 et supérieures. Tous les autres choix sont +DESACTIVÉS à partir des version 2.3.x.</td></tr> +</table> + <p>Cette directive a été désactivée. Pour la compatibilité + ascendante avec les anciens fichiers de configuration, elle peut + être spécifiée avec la valeur <code>none</code>, c'est à dire sans + type de médium par défaut. Par exemple :</p> + + <pre class="prettyprint lang-config">DefaultType None</pre> + + + <p><code>DefaultType None</code> n'est disponible que dans les + versions d'Apache 2.2.7 et supérieures.</p> + + <p>Utilisez le fichier de configuration mime.types et la directive + <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> pour configurer + l'assignement d'un type de médium via les extensions de fichiers, ou + la directive <code class="directive"><a href="#forcetype">ForceType</a></code> pour + attribuer un type de médium à des ressources spécifiques. Dans le + cas contraire, le serveur enverra sa réponse sans champ d'en-tête + Content-Type, et le destinataire devra déterminer lui-même le type + de médium.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="define" id="define">Directive</a> <a name="Define" id="Define">Define</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Permet de définir une variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>Define <var>nom-paramètre</var> [<var>valeur-paramètre</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Avec un seul paramètre, l'effet de la directive + <code class="directive">Define</code> est identique à celui de l'argument + <code>-D</code> du programme <code class="program"><a href="../programs/httpd.html">httpd</a></code>. Il permet de + modifier le comportement des sections <code class="directive"><a href="#ifdefine"><IfDefine></a></code> sans avoir à ajouter d'argument + <code>-D</code> au sein des scripts de démarrage.</p> + + <p>De plus, le second paramètre permet d'affecter une valeur à la + variable définie par le premier. Cette variable peut être référencée + dans le fichier de configuration via la syntaxe <code>${VAR}</code>. + La portée de la variable est toujours globale, et n'est jamais + limitée à la section de configuration courante.</p> + + <pre class="prettyprint lang-config"><IfDefine TEST> + Define servername test.example.com +</IfDefine> +<IfDefine !TEST> + Define servername www.example.com + Define SSL +</IfDefine> + +DocumentRoot "/var/www/${servername}/htdocs"</pre> + + + <p>Le caractère ":" est interdit dans les noms de variables afin + d'éviter les conflits avec la syntaxe de la directive <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>.</p> + + <div class="note"><h3>Portée de la directive et pièges à éviter</h3> + <p>Si cette directive est définie au sein d'un bloc VirtualHost, les + changements qu'elle induit sont visibles de toute directive + ultérieure, au delà de tout bloc VirtualHost.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#undefine">UnDefine</a></code></li> +<li><code class="directive"><a href="#ifdefine">IfDefine</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="directory" id="directory">Directive</a> <a name="Directory" id="Directory"><Directory></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Regroupe un ensemble de directives qui ne s'appliquent +qu'au répertoire concerné du système de fichiers, à ses +sous-répertoires, et à leur contenu.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><Directory <var>chemin répertoire</var>> +... </Directory></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Les balises <code class="directive"><Directory></code> et + <code></Directory></code> permettent de regrouper un ensemble + de directives qui ne s'appliquent qu'au répertoire précisé, + à ses sous-répertoires, et aux fichiers situés dans ces + sous-répertoires. Toute directive + autorisée dans un contexte de répertoire peut être utilisée. + <var>chemin répertoire</var> est soit le chemin absolu d'un + répertoire, soit une chaîne de caractères avec caractères génériques + utilisant la comparaison Unix de style shell. Dans une chaîne de + caractères avec caractères génériques, <code>?</code> correspond à + un caractère quelconque, et <code>*</code> à toute chaîne de + caractères. Les intervalles de caractères <code>[]</code> sont aussi + autorisés. Aucun caractère générique ne peut remplacer le caractère + `/', si bien que l'expression <code><Directory + "/*/public_html"></code> ne conviendra pas pour le chemin + * <code>/home/user/public_html</code>, alors que <code><Directory + "/home/*/public_html"></code> conviendra. Exemple :</p> + + <pre class="prettyprint lang-config"><Directory "/usr/local/httpd/htdocs"> + Options Indexes FollowSymLinks +</Directory></pre> + + + <p>Les chemins de répertoires contenant des espaces <em>doivent</em> être + entourés de guillemets afin d'empêcher l'interprétation de ces + espaces comme fins d'arguments.</p> + + <div class="note"> + <p>Soyez prudent avec l'argument <var>chemin répertoire</var> : il + doit correspondre exactement au chemin du système de fichier + qu'Apache httpd utilise pour accéder aux fichiers. Les directives + comprises dans une section <code><Directory></code> ne + s'appliqueront pas aux fichiers du même répertoire auxquels on + aura accédé via un chemin différent, per exemple via un lien + symbolique.</p> + </div> + + <p> Les <a class="glossarylink" href="../glossary.html#regex" title="voir glossaire">Expressions rationnelles</a> + peuvent aussi être utilisées en ajoutant le caractère + <code>~</code>. Par exemple :</p> + + <pre class="prettyprint lang-config"><Directory ~ "^/www/[0-9]{3}"> + +</Directory></pre> + + + <p>pourra correspondre à tout répertoire situé dans /www/ et dont le + nom se compose de trois chiffres.</p> + + <p>Si plusieurs sections <code class="directive"><Directory></code> (sans expression rationnelle) + correspondent au répertoire (ou à un de ses parents) qui contient le + document, les directives de la section <code class="directive"><Directory></code> dont le chemin est le plus + court sont appliquées en premier, en s'intercalant avec les + directives des fichiers <a href="#accessfilename">.htaccess</a>. Par + exemple, avec</p> + + <pre class="prettyprint lang-config"><Directory "/"> + AllowOverride None +</Directory> + +<Directory "/home"> + AllowOverride FileInfo +</Directory></pre> + + + <p>l'accès au document <code>/home/web/dir/doc.html</code> emprunte + le chemin suivant :</p> + + <ul> + <li>Aplication de la directive <code>AllowOverride None</code> + (qui désactive les fichiers <code>.htaccess</code>).</li> + + <li>Application de la directive <code>AllowOverride + FileInfo</code> (pour le répertoire <code>/home</code>).</li> + + <li>Application de toute directive <code>FileInfo</code> qui se + trouverait dans d'éventuels fichiers <code>/home/.htaccess</code>, + <code>/home/web/.htaccess</code> ou + <code>/home/web/dir/.htaccess</code>, dans cet ordre.</li> + </ul> + + <p>Les directives associées aux répertoires sous forme d'expressions + rationnelles ne sont prises en compte qu'une fois toutes les + directives des sections sans expressions rationnelles appliquées. + Alors, tous les répertoires avec expressions rationnelles sont + testés selon l'ordre dans lequel ils apparaissent dans le fichier de + configuration. Par exemple, avec</p> + + <pre class="prettyprint lang-config"><Directory ~ "abc$"> + # ... directives ici ... +</Directory></pre> + + + <p>la section avec expression rationnelle ne sera prise en compte + qu'après les sections <code class="directive"><Directory></code> sans expression rationnelle + et les fichiers <code>.htaccess</code>. Alors, l'expression + rationnelle conviendra pour <code>/home/abc/public_html/abc</code> + et la section <code class="directive"><Directory></code> + correspondante s'appliquera.</p> + + <p><strong>Notez que la politique d'accès par défaut + dans les sections <code><Directory "/"></code> consiste à + autoriser tout accès sans restriction. Ceci signifie qu'Apache httpd va servir tout fichier + correspondant à une URL. Il est recommandé de modifier cette + situation à l'aide d'un bloc du style</strong></p> + + <pre class="prettyprint lang-config"><Directory "/"> + Require all denied +</Directory></pre> + + + <p><strong>puis d'affiner la configuration pour les répertoires que vous + voulez rendre accessibles. Voir la page <a href="../misc/security_tips.html">Conseils à propos de sécurité</a> + pour plus de détails.</strong></p> + + <p>Les sections <code class="directive"><Directory></code> se situent + dans le fichier <code>httpd.conf</code>. Les directives <code class="directive"><Directory></code> ne peuvent pas être imbriquées + et ne sont pas autorisées dans les sections <code class="directive"><a href="#limit"><Limit></a></code> ou <code class="directive"><a href="#limitexcept"><LimitExcept></a></code>.</p> + +<h3>Voir aussi</h3> +<ul> +<li><a href="../sections.html">Comment fonctionnent les sections +<Directory>, <Location> et <Files></a> pour des +explications à propos de la manière dont ces différentes sections se +combinent entre elles à la réception d'une requête</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="directorymatch" id="directorymatch">Directive</a> <a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Regroupe des directives qui s'appliquent au contenu de répertoires +du système de fichiers correspondant à une expression rationnelle</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><DirectoryMatch <var>regex</var>> +... </DirectoryMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Les balises <code class="directive"><DirectoryMatch></code> + et <code></DirectoryMatch></code> permettent de regrouper un + ensemble de directives qui ne s'appliqueront qu'au répertoire + précisé (et aux fichiers qu'il contient), comme pour la section <code class="directive"><a href="#directory"><Directory></a></code>. Cependant, le + répertoire est précisé sous la forme d'une <a class="glossarylink" href="../glossary.html#regex" title="voir glossaire">expression rationnelle</a>. Par exemple :</p> + + <pre class="prettyprint lang-config"><DirectoryMatch "^/www/(.+/)?[0-9]{3}/"> + # ... +</DirectoryMatch></pre> + + + <p>convient pour les sous-répertoires de <code>/www/</code> dont + le nom se compose de trois chiffres.</p> + + <div class="note"><h3>Compatibilité</h3> + Avant la version 2.3.9, cette directive s'appliquait aussi aux + sous-répertoires (comme la directive <code class="directive"><a href="#directory"><Directory></a></code>), et ne tenait pas compte du + symbole de fin de ligne ($). Depuis la version 2.3.9, seuls les + répertoires qui correspondent à l'expression sont affectés par les + directives contenues dans la section. + </div> + + <div class="note"><h3>slash de fin</h3> + Cette directive s'applique aux requêtes pour des répertoires avec + ou sans slash de fin ; les expressions contenant un symbole de fin + de ligne ($) doivent donc faire l'objet d'une attention + particulière. + </div> + + <p>A partir de la version 2.4.8, les groupes nommés et les + références arrières sont extraits et enregistrés dans + l'environnement avec leur nom en majuscules et préfixé + par "MATCH_". Ceci permet + de référencer des URLs dans des <a href="../expr.html">expressions</a> + ou au sein de modules comme <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. Pour + éviter toute confusion, les références arrières numérotées (non + nommées) sont ignorées. Vous devez utiliser à la place des groupes + nommés.</p> + +<pre class="prettyprint lang-config"><DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</DirectoryMatch></pre> + + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#directory"><Directory></a></code> +pour une description de la manière dont les expressions rationnelles +sont traitées en présence d'autres sections <code class="directive"><Directory></code> sans expressions rationnelles</li> +<li><a href="../sections.html">Comment fonctionnent les sections +<Directory>, <Location> et <Files></a> pour une +explication à propos de la manière dont ces différentes sections se +combinent entre elles à la réception d'une requête</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="documentroot" id="documentroot">Directive</a> <a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Racine principale de l'arborescence des documents visible +depuis Internet</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>DocumentRoot <var>chemin répertoire</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>DocumentRoot "/usr/local/apache/htdocs"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive permet de définir le répertoire à partir duquel + <code class="program"><a href="../programs/httpd.html">httpd</a></code> va servir les fichiers. S'il ne correspond + pas à un <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code>, le chemin + de l'URL sera ajouté par le serveur à la racine des documents afin + de construire le chemin du document recherché. Exemple :</p> + + <pre class="prettyprint lang-config">DocumentRoot "/usr/web"</pre> + + + <p>un accès à <code>http://my.example.com/index.html</code> se + réfère alors à <code>/usr/web/index.html</code>. Si <var>chemin + répertoire</var> n'est pas un chemin absolu, il est considéré comme + relatif au chemin défini par la directive <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p> + + <p>Le répertoire défini par la directive + <code class="directive">DocumentRoot</code> ne doit pas comporter de slash + final.</p> + +<h3>Voir aussi</h3> +<ul> +<li><a href="../urlmapping.html#documentroot">Mise en +correspondance des URLs avec le système de fichiers</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="else" id="else">Directive</a> <a name="Else" id="Else"><Else></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contient des directives qui ne s'appliquent que si la +condition correspondant à la section <code class="directive"><a href="#if"><If></a></code> ou <code class="directive"><a href="#elseif"><ElseIf></a></code> précédente n'est pas satisfaite par la +requête à l'exécution</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><Else> ... </Else></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Les conditions imbriquées sont supportées à partir de la version +2.4.26 du serveur HTTP Apache</td></tr> +</table> + <p>La section <code class="directive"><Else></code> applique + les directives qu'elle contient si et seulement si les conditions + correspondant à la section <code class="directive"><If></code> + ou <code class="directive"><ElseIf></code> immédiatement + supérieure et dans la même portée n'ont pas été satisfaites. Par + exemple, dans :</p> + + <pre class="prettyprint lang-config"><If "-z req('Host')"> + # ... +</If> +<Else> + # ... +</Else></pre> + + + <p>La condition de la section <code class="directive"><If></code> serait satisfaite pour les requêtes + HTTP/1.0 sans en-tête <var>Host:</var>, alors que celle de la section + <code class="directive"><Else></code> le serait pour les + requêtes comportant un en-tête <var>Host:</var>.</p> + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><a href="../sections.html">Fonctionnement des sections <Directory>, <Location>, + <Files></a> pour une explication de la manière dont ces + différentes section se combinent entre elles lorsqu'une requête est + reçue. Les directives <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, et <code class="directive"><Else></code> s'appliquent en dernier.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="elseif" id="elseif">Directive</a> <a name="ElseIf" id="ElseIf"><ElseIf></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contient des directives qui ne s'appliquent que si la +condition correspondante est satisfaite par une requête à l'exécution, +alors que la condition correspondant à la section <code class="directive"><a href="#if"><If></a></code> ou <code class="directive"><ElseIf></code> précédente ne l'était pas.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Les conditions imbriquées sont supportées à partir de la version +2.4.26 du serveur HTTP Apache</td></tr> +</table> + <p>La section <code class="directive"><ElseIf></code> applique + les directives qu'elle contient si et seulement si d'une part la + condition correspondante est satisfaite, et d'autre part la condition + correspondant à la section <code class="directive"><If></code> + ou <code class="directive"><ElseIf></code> de la même portée ne + l'est pas. Par exemple, dans :</p> + + <pre class="prettyprint lang-config"><If "-R '10.1.0.0/16'"> + #... +</If> +<ElseIf "-R '10.0.0.0/8'"> + #... +</ElseIf> +<Else> + #... +</Else></pre> + + + <p>La condition correspondant à la section <code class="directive"><ElseIf></code> est satisfaite si l'adresse + distante de la requête appartient au sous-réseau 10.0.0.0/8, mais + pas si elle appartient au sous-réseau 10.1.0.0/16.</p> + + +<h3>Voir aussi</h3> +<ul> +<li><a href="../expr.html">Les expressions dans le serveur HTTP +Apache</a>, pour une référence complète et d'autres exemples.</li> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">Fonctionnement des sections <Directory>, <Location>, + <Files></a> pour une explication de la manière dont ces + différentes section se combinent entre elles lorsqu'une requête est + reçue. Les directives <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, et <code class="directive"><Else></code> s'appliquent en dernier.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="enablemmap" id="enablemmap">Directive</a> <a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Utilise la projection en mémoire (Memory-Mapping) pour +lire les fichiers pendant qu'ils sont servis</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>EnableMMAP On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>EnableMMAP On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive définit si <code class="program"><a href="../programs/httpd.html">httpd</a></code> peut utiliser + la projection en mémoire (Memory-Mapping) quand il doit lire le contenu + d'un fichier pendant qu'il est servi. Par défaut, lorsque le + traitement d'une requête requiert l'accès aux données contenues dans + un fichier -- par exemple, pour servir un fichier interprété par le + serveur à l'aide de <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache httpd projette + le fichier en mémoire si le système d'exploitation le permet.</p> + + <p>Cette projection en mémoire induit parfois une amélioration des + performances. Sur certains systèmes cependant, il est préférable de + désactiver la projection en mémoire afin d'éviter certains problèmes + opérationnels :</p> + + <ul> + <li>Sur certains systèmes multi-processeurs, la projection en + mémoire peut dégrader les performances du programme + <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</li> + <li>S'il fait l'objet d'une projection en mémoire par + <code class="program"><a href="../programs/httpd.html">httpd</a></code>, la suppression ou la troncature d'un + fichier peut provoquer un crash de <code class="program"><a href="../programs/httpd.html">httpd</a></code> avec une + erreur de segmentation.</li> + </ul> + + <p>Pour les configurations de serveur sujettes à ce genre de + problème, il est préférable de désactiver la projection en mémoire + des fichiers servis en spécifiant :</p> + + <pre class="prettyprint lang-config">EnableMMAP Off</pre> + + + <p>Pour les montages NFS, cette fonctionnalité peut être + explicitement désactivée pour les fichiers concernés en spécifiant + :</p> + + <pre class="prettyprint lang-config"><Directory "/path-to-nfs-files"> + EnableMMAP Off +</Directory></pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="enablesendfile" id="enablesendfile">Directive</a> <a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Utilise le support sendfile du noyau pour servir les +fichiers aux clients</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>EnableSendfile On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>EnableSendfile Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Par défaut à Off depuis la version 2.3.9.</td></tr> +</table> + <p>Cette directive définit si le programme <code class="program"><a href="../programs/httpd.html">httpd</a></code> + peut utiliser le support sendfile du noyau pour transmettre le + contenu des fichiers aux clients. Par défaut, lorsque le traitement + d'une requête ne requiert pas l'accès aux données contenues dans un + fichier -- par exemple, pour la transmission d'un fichier statique + -- Apache httpd utilise sendfile pour transmettre le contenu du fichier + sans même lire ce dernier, si le système d'exploitation le + permet.</p> + + <p>Ce mécanisme sendfile évite la séparation des opérations de + lecture et d'envoi, ainsi que les réservations de tampons. sur + certains systèmes cependant, ou sous certains systèmes de fichiers, + il est préférable de désactiver cette fonctionnalité afin d'éviter + certains problèmes opérationnels :</p> + + <ul> + <li>Certains systèmes peuvent présenter un support sendfile + défectueux que le système de compilation n'a pas détecté, en + particulier si les exécutables ont été compilés sur une autre + machine, puis copiés sur la première avec un support sendfile + défectueux.</li> + <li>Sous Linux, l'utilisation de sendfile induit des bogues lors de + la récupération des paquets de vérification TCP (TCP-checksum) avec + certaines cartes réseau lorsqu'on utilise IPv6.</li> + <li>Sous Linux sur Itanium, <code>sendfile</code> peut s'avérer incapable de + traiter les fichiers de plus de 2 Go.</li> + <li>Avec un montage réseau de <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (par exemple NFS, SMB, CIFS, + FUSE), le + noyau peut s'avérer incapable de servir un fichier de ce montage + réseau en passant par son propre cache.</li> + </ul> + + <p>Pour les configurations de serveur non sujettes à ce genre de + problème, vous pouvez activer cette fonctionnalité en + spécifiant :</p> + + <pre class="prettyprint lang-config">EnableSendfile On</pre> + + + <p>Pour les montages réseau, cette fonctionnalité peut être + explicitement désactivée pour les fichiers concernés en spécifiant + :</p> + + <pre class="prettyprint lang-config"><Directory "/path-to-nfs-files"> + EnableSendfile Off +</Directory></pre> + + <p>Veuillez noter que la configuration de la directive + <code class="directive">EnableSendfile</code> dans un contexte de répertoire + ou de fichier .htaccess n'est pas supportée par + <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code>. Le module ne prend en compte la + définition de <code class="directive">EnableSendfile</code> que dans un + contexte global. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="error" id="error">Directive</a> <a name="Error" id="Error">Error</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Interrompt la lecture de la configuration avec un message +d'erreur personnalisé</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>Error <var>message</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>à partir de la version 2.3.9</td></tr> +</table> + <p>Si une erreur peut être détectée dans la configuration, souvent + un module manquant, cette + directive peut être utilisée pour générer un message d'erreur + personnalisé, et interrompre la lecture de la configuration. </p> + + <pre class="prettyprint lang-config"># Exemple +# vérification du chargement de mod_include +<IfModule !include_module> + Error "mod_include is required by mod_foo. Load it with LoadModule." +</IfModule> + +# vérification de la définition de SSL ou (exclusif) NOSSL +<IfDefine SSL> +<IfDefine NOSSL> + Error "Both SSL and NOSSL are defined. Define only one of them." +</IfDefine> +</IfDefine> +<IfDefine !SSL> +<IfDefine !NOSSL> + Error "Either SSL or NOSSL must be defined." +</IfDefine> +</IfDefine></pre> + + + <div class="warning"><h3>Note</h3> + <p>Cette directive est évaluée lors du traitement de la configuration, + et non à l'exécution. Par conséquent, elle ne peut pas être évaluée de + manière conditionnelle en l'incluant dans une section <code class="directive"><a href="#if"><If></a></code>.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="errordocument" id="errordocument">Directive</a> <a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Document que le serveur renvoie au client en cas +d'erreur</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ErrorDocument <var>code erreur</var> <var>document</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Apache httpd peut traiter les problèmes et les erreurs de quatre + manières,</p> + + <ol> + <li>afficher un simple message d'erreur au contenu fixe</li> + + <li>afficher un message personnalisé</li> + + <li>rediriger en interne vers un <var>chemin d'URL</var> local pour traiter + le problème ou l'erreur</li> + + <li>rediriger vers une <var>URL</var> externe pour traiter + le problème ou l'erreur</li> + </ol> + + <p>La première option constitue le comportement par défaut; pour + choisir une des trois autres options, il faut configurer Apache à + l'aide de la directive <code class="directive">ErrorDocument</code>, suivie + du code de la réponse HTTP et d'une URL ou d'un message. Apache + httpd fournit parfois des informations supplémentaires à propos du + problème ou de l'erreur.</p> + + <p>A partir de la version 2.4.13, il est possible d'utiliser la <a href="../expr.html">syntaxe des expressions</a> dans cette directive + afin de générer des chaînes et URLs dynamiques.</p> + + <p>Les URLs peuvent commencer par un slash (/) pour les chemins web + locaux (relatifs au répertoire défini par la directive <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), ou se présenter sous la + forme d'une URL complète que le client pourra résoudre. + Alternativement, un message à afficher par le navigateur pourra être + fourni. Notez que la décision de considérer le paramètre comme URL, + chemin ou message intervient avant toute interprètation + d'expression. Exemples :</p> + + <pre class="prettyprint lang-config">ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi +ErrorDocument 404 /errors/bad_urls.php +ErrorDocument 401 /subscription_info.html +ErrorDocument 403 "Sorry can't allow you access today" +ErrorDocument 403 Forbidden! +ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}}</pre> + + + <p>De plus, on peut spécifier la valeur spéciale <code>default</code> + pour indiquer l'utilisation d'un simple message d'Apache httpd codé en + dur. Bien que non nécessaire dans des circonstances normales, la + spécification de la valeur <code>default</code> va permettre de + rétablir l'utilisation du simple message d'Apache httpd codé en dur pour + les configurations qui sans cela, hériteraient d'une directive + <code class="directive">ErrorDocument</code> existante.</p> + + <pre class="prettyprint lang-config">ErrorDocument 404 /cgi-bin/bad_urls.pl + +<Directory "/web/docs"> + ErrorDocument 404 default +</Directory></pre> + + + <p>Notez que lorsque vous spécifiez une directive + <code class="directive">ErrorDocument</code> pointant vers une URL distante + (c'est à dire tout ce qui commence par le préfixe http), le serveur + HTTP Apache va + envoyer une redirection au client afin de lui indiquer où trouver le + document, même dans le cas où ce document se trouve sur le serveur + local. Ceci a de nombreuses conséquences dont la plus importante + réside dans le fait que le client ne recevra pas le code d'erreur + original, mais au contraire un code de statut de redirection. Ceci + peut en retour semer la confusion chez les robots web et divers + clients qui tentent de déterminer la validité d'une URL en examinant + le code de statut. De plus, si vous utilisez une URL distante avec + <code>ErrorDocument 401</code>, le client ne saura pas qu'il doit + demander un mot de passe à l'utilisateur car il ne recevra pas le + code de statut 401. C'est pourquoi, <strong>si vous utilisez une + directive <code>ErrorDocument 401</code>, elle devra faire référence + à un document par le biais d'un chemin local.</strong></p> + + <p>Microsoft Internet Explorer (MSIE) ignore par défaut les messages + d'erreur générés par le serveur lorsqu'ils sont trop courts et + remplacent ses propres messages d'erreur "amicaux". Le seuil de + taille varie en fonction du type d'erreur, mais en général, si la + taille de votre message d'erreur est supérieure à 512 octets, il y a + peu de chances pour que MSIE l'occulte, et il sera affiché par ce + dernier. Vous trouverez d'avantage d'informations dans l'article de + la base de connaissances Microsoft <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p> + + <p>Bien que la plupart des messages d'erreur internes originaux + puissent être remplacés, ceux-ci sont cependant conservés dans + certaines circonstances sans tenir compte de la définition de la + directive <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. En + particulier, en cas de détection d'une requête mal formée, le + processus de traitement normal des requêtes est immédiatement + interrompu, et un message d'erreur interne est renvoyé, ceci afin de + se prémunir contre les problèmes de sécurité liés aux requêtes mal + formées.</p> + + <p>Si vous utilisez mod_proxy, il est en général préférable + d'activer <code class="directive"><a href="../mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> afin d'être en + mesure de produire des messages d'erreur personnalisés pour le + compte de votre serveur d'origine. Si vous n'activez pas + ProxyErrorOverride, Apache httpd ne générera pas de messages d'erreur + personnalisés pour le contenu mandaté.</p> + + +<h3>Voir aussi</h3> +<ul> +<li><a href="../custom-error.html">documentation sur la +personnalisation des réponses</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="errorlog" id="errorlog">Directive</a> <a name="ErrorLog" id="ErrorLog">ErrorLog</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définition du chemin du journal des erreurs</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code> ErrorLog <var>file-path</var>|syslog[:[<var>facility</var>][:<var>tag</var>]]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">ErrorLog</code> permet de définir le + nom du fichier dans lequel le serveur va journaliser toutes les + erreurs qu'il rencontre. Si le <var>file-path</var> n'est pas + absolu, il est considéré comme relatif au chemin défini par la + directive <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p> + + <pre class="prettyprint lang-config">ErrorLog "/var/log/httpd/error_log"</pre> + + + <p>Si le <var>file-path</var> commence par une barre verticale + "<code>(|)</code>", il est considéré comme une commande à lancer pour traiter la + journalisation de l'erreur.</p> + + <pre class="prettyprint lang-config">ErrorLog "|/usr/local/bin/httpd_errors"</pre> + + + <p>Voir les notes à propos des <a href="../logs.html#piped">journaux + redirigés</a> pour plus d'informations.</p> + + <p>L'utilisation de <code>syslog</code> à la place d'un nom de + fichier active la journalisation via syslogd(8) si le système le + supporte. Le dispositif syslog par défaut est <code>local7</code>, + mais vous pouvez le modifier à l'aide de la syntaxe + <code>syslog:<var>facility</var></code>, où <var>facility</var> peut + être remplacé par un des noms habituellement documentés dans la page + de man syslog(1). Le dispositif syslog <code>local7</code> est + global, et si il est modifié dans un serveur virtuel, le dispositif + final spécifié affecte l'ensemble du serveur. La même règle s'applique au + tag syslog qui utilise par défaut le nom du binaire du serveur HTTP Apache + <code>httpd</code> dans la plupart des cas. Vous pouvez aussi modifier cette + valeur en utilisant la syntaxe <code>syslog::<var>tag</var></code>.</p> + + <pre class="prettyprint lang-config">ErrorLog syslog:user +ErrorLog syslog:user:httpd.srv1 +ErrorLog syslog::httpd.srv2</pre> + + + <p>SECURITE : Voir le document <a href="../misc/security_tips.html#serverroot">conseils à propos de + sécurité</a> pour des détails sur les raisons pour lesquelles votre + sécurité peut être compromise si le répertoire contenant les + fichiers journaux présente des droits en écriture pour tout autre + utilisateur que celui sous lequel le serveur est démarré.</p> + <div class="warning"><h3>Note</h3> + <p>Lors de la spécification d'un chemin de fichier sur les + plates-formes non-Unix, on doit veiller à n'utiliser que des + slashes (/), même si la plate-forme autorise l'utilisation des + anti-slashes (\). Et d'une manière générale, il est recommandé de + n'utiliser que des slashes (/) dans les fichiers de + configuration.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Fichiers journaux du serveur HTTP Apache</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="errorlogformat" id="errorlogformat">Directive</a> <a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Spécification du format des entrées du journal des erreurs</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">ErrorLogFormat</code> permet de + spécifier quelles informations supplémentaires vont être enregistrées + dans le journal des erreurs en plus du message habituel.</p> + + <pre class="prettyprint lang-config"># Exemple simple +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"</pre> + + + <p>La spécification de <code>connection</code> ou + <code>request</code> comme premier paramètre permet de définir des + formats supplémentaires, ce qui a pour effet de journaliser des + informations additionnelles lorsque le premier message est + enregistré respectivement pour une connexion ou une requête + spécifique. Ces informations additionnelles ne sont enregistrées + qu'une seule fois par connexion/requête. Si le traitement d'une + connexion ou d'une requête ne génère aucun message dans le journal, + alors aucune information additionnelle n'est enregistrée.</p> + + <p>Il peut arriver que certains items de la chaîne de format ne + produisent aucune sortie. Par exemple, l'en-tête Referer n'est + présent que si le message du journal est associé à une requête et s'il + est généré à un moment où l'en-tête Referer a déjà été lu par le + client. Si aucune sortie n'est générée, le comportement par défaut + consiste à supprimer tout ce qui se trouve entre l'espace précédent + et le suivant. Ceci implique que la ligne de journalisation est + divisée en champs ne contenant pas d'espace séparés par des espaces. + Si un item de la chaîne de format ne génère aucune sortie, + l'ensemble du champ est omis. Par exemple, si l'adresse distante + <code>%a</code> du format <code>[%t] [%l] [%a] %M </code> n'est + pas disponible, les crochets qui l'entourent ne seront eux-mêmes pas + enregistrés. Il est possible d'échapper les espaces par un anti-slash + afin qu'ils ne soient pas considérés comme séparateurs de champs. + La combinaison '% ' (pourcentage espace) est un délimiteur de + champ de taille nulle qui ne génère aucune sortie.</p> + + <p>Ce comportement peut être changé en ajoutant des modificateurs à + l'item de la chaîne de format. Le modificateur <code>-</code> + (moins) provoque l'enregistrement d'un signe moins si l'item + considéré ne génère aucune sortie. Pour les formats à enregistrement + unique par connexion/requête, il est aussi possible d'utiliser le + modificateur <code>+</code> (plus). Si un item ne générant aucune + sortie possède le modificateur plus, la ligne dans son ensemble est + omise.</p> + + <p>Un modificateur de type entier permet d'assigner un niveau de + sévérité à un item de format. L'item considéré ne + sera journalisé que si la sévérité du message n'est pas + plus haute que le niveau de sévérité spécifié. Les + valeurs possibles vont de 1 (alert) à 15 (trace8), en passant par 4 + (warn) ou 7 (debug).</p> + + <p>Par exemple, voici ce qui arriverait si vous ajoutiez des + modificateurs à l'item <code>%{Referer}i</code> qui enregistre le + contenu de l'en-tête <code>Referer</code>.</p> + + <table class="bordered"><tr class="header"><th>Item modifié</th><th>Signification</th></tr> +<tr> + <td><code>%-{Referer}i</code></td> + <td>Enregistre le caractère <code>-</code> si l'en-tête + <code>Referer</code> n'est pas défini.</td> + </tr> +<tr class="odd"> + <td><code>%+{Referer}i</code></td> + <td>N'enregistre rien si l'en-tête + <code>Referer</code> n'est pas défini.</td> + </tr> +<tr> + <td><code>%4{Referer}i</code></td> + <td>N'enregistre le contenu de l'en-tête <code>Referer</code> que si + la sévérité du message de journalisation est supérieure à 4.</td> + </tr> +</table> + + <p>Certains items de format acceptent des paramètres supplémentaires + entre accolades.</p> + + <table class="bordered"><tr class="header"><th>Chaîne de format</th> <th>Description</th></tr> +<tr><td><code>%%</code></td> + <td>Le signe pourcentage</td></tr> +<tr class="odd"><td><code>%a</code></td> + <td>Adresse IP et port clients</td></tr> +<tr><td><code>%{c}a</code></td> + <td>Port et adresse IP sous-jacents du correspondant pour la + connexion (voir le module + <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code>)</td></tr> +<tr class="odd"><td><code>%A</code></td> + <td>Adresse IP et port locaux</td></tr> +<tr><td><code>%{<em>name</em>}e</code></td> + <td>Variable d'environnement de requête <em>name</em></td></tr> +<tr class="odd"><td><code>%E</code></td> + <td>Etat d'erreur APR/OS et chaîne</td></tr> +<tr><td><code>%F</code></td> + <td>Nom du fichier source et numéro de ligne de l'appel du + journal</td></tr> +<tr class="odd"><td><code>%{<em>name</em>}i</code></td> + <td>En-tête de requête <em>name</em></td></tr> +<tr><td><code>%k</code></td> + <td>Nombre de requêtes persistantes pour cette connexion</td></tr> +<tr class="odd"><td><code>%l</code></td> + <td>Sévérité du message</td></tr> +<tr><td><code>%L</code></td> + <td>Identifiant journal de la requête</td></tr> +<tr class="odd"><td><code>%{c}L</code></td> + <td>Identifiant journal de la connexion</td></tr> +<tr><td><code>%{C}L</code></td> + <td>Identifiant journal de la connexion si utilisé dans la + portée de la connexion, vide sinon</td></tr> +<tr class="odd"><td><code>%m</code></td> + <td>Nom du module qui effectue la journalisation du message</td></tr> +<tr><td><code>%M</code></td> + <td>Le message effectif</td></tr> +<tr class="odd"><td><code>%{<em>name</em>}n</code></td> + <td>Note de requête <em>name</em></td></tr> +<tr><td><code>%P</code></td> + <td>Identifiant du processus courant</td></tr> +<tr class="odd"><td><code>%T</code></td> + <td>Identifiant du thread courant</td></tr> +<tr><td><code>%{g}T</code></td> + <td>Identifiant unique de thread système du thread courant + (l'identifiant affiché par la commande <code>top</code> par + exemple ; seulement sous Linux pour l'instant)</td></tr> +<tr class="odd"><td><code>%t</code></td> + <td>L'heure courante</td></tr> +<tr><td><code>%{u}t</code></td> + <td>L'heure courante avec les microsecondes</td></tr> +<tr class="odd"><td><code>%{cu}t</code></td> + <td>L'heure courante au format compact ISO 8601, avec les + microsecondes</td></tr> +<tr><td><code>%v</code></td> + <td>Le nom de serveur canonique <code class="directive"><a href="#servername">ServerName</a></code> du serveur courant.</td></tr> +<tr class="odd"><td><code>%V</code></td> + <td>Le nom de serveur du serveur qui sert la requête en accord + avec la définition de la directive <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>.</td></tr> +<tr><td><code>\ </code> (anti-slash espace)</td> + <td>Espace non délimiteur</td></tr> +<tr class="odd"><td><code>% </code> (pourcentage espace)</td> + <td>Délimiteur de champ (aucune sortie)</td></tr> +</table> + + <p>L'item de format identifiant journal <code>%L</code> génère un + identifiant unique pour une connexion ou une requête. Il peut servir + à déterminer quelles lignes correspondent à la même connexion ou + requête ou quelle requête est associée à tel connexion. Un item de + format <code>%L</code> est aussi disponible dans le module + <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code>, mais il permet dans ce contexte de + corréler les entrées du journal des accès avec celles du journal des + erreurs. Si le module <code class="module"><a href="../mod/mod_unique_id.html">mod_unique_id</a></code> est chargé, + c'est son identifiant unique qui sera utilisé comme identifiant de + journal pour les requêtes.</p> + + <pre class="prettyprint lang-config"># Exemple (format par défaut pour les MPMs threadés) +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"</pre> + + + <p>Cet exemple renverrait un message d'erreur du style :</p> + + <div class="example"><p><code> + [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico + </code></p></div> + + <p>Notez que, comme indiqué plus haut, certains champs sont + totalement supprimés s'ils n'ont pas été définis.</p> + + <pre class="prettyprint lang-config"># Exemple (similaire au format 2.2.x) +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"</pre> + + + <pre class="prettyprint lang-config"># Exemple avancé avec identifiants journal de requête/connexion +ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M" +ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T" +ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'" +ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'" +ErrorLogFormat connection "[%{uc}t] [C:%{c}L] remote\ %a local\ %A"</pre> + + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Fichiers journaux du serveur HTTP Apache</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="extendedstatus" id="extendedstatus">Directive</a> <a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Extrait des informations d'état étendues pour chaque +requête</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ExtendedStatus On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ExtendedStatus Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + + <p>Cette option permet d'extraire des données supplémentaires + concernant la requête en cours de traitement pour un processus + donné, et crée un résumé d'utilisation ; vous pouvez accéder à + ces variables pendant l'exécution en configurant + <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>. Notez que d'autres modules sont + susceptibles de s'appuyer sur ce tableau de bord.</p> + + <p>Cette directive s'applique au serveur dans son ensemble, et ne + peut pas être activée/désactivée pour un serveur virtuel + particulier. Notez que l'extraction des informations d'état étendues + peut ralentir le serveur. Notez aussi que cette définition ne peut + pas être modifiée au cours d'un redémarrage graceful.</p> + + <div class="note"> + <p>Notez que le chargement de <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> définit + automatiquement ExtendedStatus à On, et que d'autres modules tiers + sont susceptibles d'en faire de même. De tels modules ont besoin + d'informations détaillées à propos de l'état de tous les processus. + Depuis la version 2.3.6, <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> a définit la + valeur par défaut à On, alors qu'elle était à Off dans les versions + antérieures.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="fileetag" id="fileetag">Directive</a> <a name="FileETag" id="FileETag">FileETag</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Caractéristiques de fichier utilisées lors de la génération +de l'en-tête de réponse HTTP ETag pour les fichiers statiques</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>FileETag <var>composant</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>FileETag MTime Size</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>La valeur par défaut était "INode MTime Size" +dans les versions 2.3.14 et antérieures.</td></tr> +</table> + <p> + La directive <code class="directive">FileETag</code> définit les + caractéristiques de fichier utilisées lors de la génération de + l'en-tête de réponse HTTP <code>ETag</code> (entity tag) quand le + document est contenu dans un fichier statique (la valeur de + <code>ETag</code> + est utilisée dans le cadre de la gestion du cache pour préserver la + bande passante réseau). La directive + <code class="directive">FileETag</code> vous permet maintenant de choisir + quelles caractéristiques du fichier vont être utilisées, le cas + échéant. Les mots-clés reconnus sont : + </p> + + <dl> + <dt><strong>INode</strong></dt> + <dd>Le numéro d'i-node du fichier sera inclus dans le processus de + génération</dd> + <dt><strong>MTime</strong></dt> + <dd>La date et l'heure auxquelles le fichier a été modifié la + dernière fois seront incluses</dd> + <dt><strong>Size</strong></dt> + <dd>La taille du fichier en octets sera incluse</dd> + <dt><strong>All</strong></dt> + <dd>Tous les champs disponibles seront utilisés. Cette définition + est équivalente à : + <pre class="prettyprint lang-config">FileETag INode MTime Size</pre> +</dd> + <dt><strong>Digest</strong></dt> + <dd>Si un document est à base de fichier, le champ <code>ETag</code> sera + généré à partir du condensé du fichier.</dd> + <dt><strong>None</strong></dt> + <dd>Si le document se compose d'un fichier, aucun champ + <code>ETag</code> ne sera inclus dans la réponse</dd> + </dl> + + <p>Les mots-clés <code>INode</code>, <code>MTime</code>, + <code>Size</code> et <code>Digest</code> peuvent être préfixés par <code>+</code> ou + <code>-</code>, ce qui permet de modifier les valeurs par défaut + héritées d'un niveau de configuration plus général. Tout mot-clé + apparaissant sans aucun préfixe annule entièrement et immédiatement + les configurations héritées.</p> + + <p>Si la configuration d'un répertoire contient + <code>FileETag INode MTime Size</code>, et si un de + ses sous-répertoires contient <code>FileETag -INode</code>, la + configuration de ce sous-répertoire (qui sera propagée vers tout + sous-répertoire qui ne la supplante pas), sera équivalente à + <code>FileETag MTime Size</code>.</p> + <div class="note"><h3>Inclusions côté serveur</h3> + Aucun champ ETag n'est généré pour les réponses interprétées par + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>, car l'entité de la réponse peut + changer sans modification de l'INode, MTime, Size ou Digest du + fichier statique contenant les directives SSI. + </div> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="files" id="files">Directive</a> <a name="Files" id="Files"><Files></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contient des directives qui s'appliquent aux fichiers +précisés</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><Files <var>nom fichier</var>> ... </Files></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive"><Files></code> limite + la portée des directives qu'elle contient aux fichiers précisés. + Elle est comparable aux directives <code class="directive"><a href="#directory"><Directory></a></code> et <code class="directive"><a href="#location"><Location></a></code>. Elle doit se terminer par une + balise <code></Files></code>. Les directives contenues dans + cette section s'appliqueront à tout objet dont le nom de base (la + dernière partie du nom de fichier) correspond au fichier spécifié. + Les sections <code class="directive"><Files></code> sont + traitées selon l'ordre dans lequel elles apparaissent dans le + fichier de configuration, après les sections <code class="directive"><a href="#directory"><Directory></a></code> et la lecture des fichiers + <code>.htaccess</code>, mais avant les sections <code class="directive"><a href="#location"><Location></a></code>. Notez que les + sections <code class="directive"><Files></code> peuvent être + imbriquées dans les sections <code class="directive"><a href="#directory"><Directory></a></code> afin de restreindre la portion + du système de fichiers à laquelle ces dernières vont + s'appliquer.</p> + + <p>L'argument <var>filename</var> peut contenir un nom de fichier + ou une chaîne de caractères avec caractères génériques, où + <code>?</code> remplace un caractère, et <code>*</code> toute chaîne + de caractères.</p> + <pre class="prettyprint lang-config"><Files "cat.html"> + # Insérer ici des directives qui s'appliquent au fichier cat.html +</Files> + +<Files "?at.*"> + # Les directives insérées ici s'appliqueront aux fichiers + # cat.html, bat.html, hat.php, et ainsi de suite. +</Files></pre> + + + <p>On peut aussi utiliser les <a class="glossarylink" href="../glossary.html#regex" title="voir glossaire">Expressions rationnelles</a> en ajoutant la + caractère <code>~</code>. Par exemple :</p> + + <pre class="prettyprint lang-config"><Files ~ "\.(gif|jpe?g|png)$"> + #... +</Files></pre> + + + <p>correspondrait à la plupart des formats graphiques de l'Internet. + Il est cependant préférable d'utiliser la directive <code class="directive"><a href="#filesmatch"><FilesMatch></a></code>.</p> + + <p>Notez qu'à la différence des sections <code class="directive"><a href="#directory"><Directory></a></code> et <code class="directive"><a href="#location"><Location></a></code>, les sections <code class="directive"><Files></code> peuvent être utilisées dans les + fichiers <code>.htaccess</code>. Ceci permet aux utilisateurs de + contrôler l'accès à leurs propres ressources, fichier par + fichier.</p> + + +<h3>Voir aussi</h3> +<ul> +<li><a href="../sections.html">Comment fonctionnent les sections +<Directory>, <Location> et <Files></a> pour une +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="filesmatch" id="filesmatch">Directive</a> <a name="FilesMatch" id="FilesMatch"><FilesMatch></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contient des directives qui s'appliquent à des fichiers +spécifiés sous la forme d'expressions rationnelles</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><FilesMatch <var>expression rationnelle</var>> ... +</FilesMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La section <code class="directive"><FilesMatch></code> + limite la portée des directives qu'elle contient aux fichiers + spécifiés, tout comme le ferait une section <code class="directive"><a href="#files"><Files></a></code>. Mais elle accepte aussi les + <a class="glossarylink" href="../glossary.html#regex" title="voir glossaire">expressions rationnelles</a>. Par + exemple :</p> + + <pre class="prettyprint lang-config"><FilesMatch ".+\.(gif|jpe?g|png)$"> + # ... +</FilesMatch></pre> + + + <p>correspondrait à la plupart des formats graphiques de + l'Internet.</p> + + <div class="note">Les caractères <code>.+</code> au début de l'expression + rationnelle permettent de s'assurer que les fichiers de nom + <code>.png</code>, ou <code>.gif</code>, par exemple, ne seront pas + pris en compte.</div> + + <p>A partir de la version 2.4.8, les groupes nommés et les + références arrières sont extraits et enregistrés dans + l'environnement avec leur nom en majuscules et préfixé + par "MATCH_". Ceci permet + de référencer des URLs dans des <a href="../expr.html">expressions</a> + ou au sein de modules comme <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. Pour + éviter toute confusion, les références arrières numérotées (non + nommées) sont ignorées. Vous devez utiliser à la place des groupes + nommés.</p> + +<pre class="prettyprint lang-config"><FilesMatch "^(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</FilesMatch></pre> + + + +<h3>Voir aussi</h3> +<ul> +<li><a href="../sections.html">Comment fonctionnent les sections +<Directory>, <Location> et <Files></a> pour une +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="flushmaxpipelined" id="flushmaxpipelined">Directive</a> <a name="FlushMaxPipelined" id="FlushMaxPipelined">FlushMaxPipelined</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Nombre maximal de réponses en attente (pipelined) au-delà duquel +elles sont envoyées sur le réseau</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>FlushMaxPipelined <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>FlushMaxPipelined 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.47 du serveur HTTP Apache</td></tr> +</table> + <p>Cette directive permet de définir le nombre maximal de réponses + "pipelinées" qui restent en attente tant que des requêtes "pipelinées" sont + reçues. Lorsque cette limite est dépassée, l'envoi des réponses sur le + réseau est forcé en mode bloqué jusqu'à ce que leur nombre repasse en + dessous de la limite.</p> + + <p>La directive <code class="directive">FlushMaxPipelined</code> permet de limiter + la consommation de mémoire. Lorsqu'elle est définie à <code>0</code>, le + pipelining est désactivé, et lorsqu'elle est définie à <code>-1</code>, il n'y + a plus de limite (mais la directive <code class="directive"><a href="#flushmaxthreshold">FlushMaxThreshold</a></code> + s'applique quand-même).</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="flushmaxthreshold" id="flushmaxthreshold">Directive</a> <a name="FlushMaxThreshold" id="FlushMaxThreshold">FlushMaxThreshold</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Seuil au-delà duquel les données en attente sont envoyées sur le +réseau</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>FlushMaxThreshold <var>number-of-bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>FlushMaxThreshold 65536</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.47 du serveur HTTP Apache</td></tr> +</table> + <p>Cette directive permet de définir le seuil maximal de données en attente + d'envoi (en octets). Lorsque cette limite est dépassée, l'envoi des données sur le + réseau est forcé en mode bloqué jusqu'à ce que leur quantité repasse en + dessous du seuil spécifié.</p> + + <p>La directive <code class="directive">FlushMaxThreshold</code> permet de limiter + la consommation de mémoire. Lorsqu'elle est définie à <code>0</code> ou à une + valeur trop petite, aucune donnée n'est mise en attente, mais dans le cas + des MPMs threadés, il peut alors y avoir plus de threads occupés en attente du + réseau, ce qui diminue d'autant le nombre de threads disponibles pour + traiter les autres connexions simultanées.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="forcetype" id="forcetype">Directive</a> <a name="ForceType" id="ForceType">ForceType</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Force le type de médium spécifié dans le champ d'en-tête +HTTP Content-Type pour les fichiers correspondants</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ForceType <var>type médium</var>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Lorsqu'elle est placée dans un fichier <code>.htaccess</code> ou + une section <code class="directive"><a href="#directory"><Directory></a></code>, <code class="directive"><a href="#location"><Location></a></code>, ou <code class="directive"><a href="#files"><Files></a></code>, cette directive force + l'identification du type MIME des fichiers spécifiés à la valeur de + l'argument <var>type médium</var>. Par exemple, si vous possédez un + répertoire ne contenant que des fichiers GIF, et si vous ne voulez + pas leur ajouter l'extension <code>.gif</code>, vous pouvez utiliser + :</p> + + <pre class="prettyprint lang-config">ForceType image/gif</pre> + + + <p>Notez que cette directive l'emporte sur d'autres associations de + type de médium indirectes définies dans mime.types ou via la + directive <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code>.</p> + + <p>Vous pouvez aussi annuler toute définition plus générale de + <code class="directive">ForceType</code> en affectant la valeur + <code>None</code> à l'argument <var>type médium</var> :</p> + + <pre class="prettyprint lang-config"># force le type MIME de tous les fichiers à image/gif: +<Location "/images"> + ForceType image/gif +</Location> + +# mais utilise les méthodes classiques d'attribution du type MIME +# dans le sous-répertoire suivant : +<Location "/images/mixed"> + ForceType None +</Location></pre> + + + <p>A la base, cette directive écrase le type de contenu généré pour + les fichiers statiques servis à partir du sytème de fichiers. Pour + les ressources autres que les fichiers statiques pour lesquels le + générateur de réponse spécifie en général un type de contenu, cette + directive est ignorée.</p> + + <div class="note"><h3>Note</h3> + <p>Lorsque des directives explicites comme <code class="directive"><a href="#sethandler">SetHandler</a></code> ou + <code class="directive">module="mod_mime">AddHandler</code> ne s'appliquent + pas à la requête courante, le nom du gestionnaire interne + normalement défini par ces directives correspondra alors au type de + contenu spécifié par cette directive. Il s'agit d'un + comportement historique que certains modules + tiers, comme mod_php, peuvent interpréter comme un type de contenu + artificiel ne servant qu'à indiquer le module qui doit prendre en + compte la requête considérée. Dans la mesure du + possible, il est conseillé d'éviter les + configurations qui comportent de tels types artificiels en utilisant + les directives <code class="directive"><a href="#sethandler">SetHandler</a></code> ou + <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code>.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="gprofdir" id="gprofdir">Directive</a> <a name="GprofDir" id="GprofDir">GprofDir</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Répertoire dans lequel écrire les données de profiling +gmon.out.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Lorsque le serveur a été compilé avec le support du profiling + gprof, la directive <code class="directive">GprofDir</code> permet de + spécifier dans quel répertoire les fichiers <code>gmon.out</code> + doivent être écrits lorsque le processus s'arrête. Si l'argument se + termine par un caractère pourcentage ('%'), des sous-répertoires + sont créés pour chaque identifiant de processus.</p> + + <p>Cette directive ne fonctionne actuellement qu'avec le MPM + <code class="module"><a href="../mod/prefork.html">prefork</a></code>.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="hostnamelookups" id="hostnamelookups">Directive</a> <a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Active la recherche DNS sur les adresses IP des +clients</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>HostnameLookups Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive active la recherche DNS afin de pouvoir + journaliser les nom d'hôtes (et les passer aux programmes CGI et aux + inclusions SSI via la variable <code>REMOTE_HOST</code>). La valeur + <code>Double</code> déclenche une double recherche DNS inverse. En + d'autres termes, une fois la recherche inverse effectuée, on lance + une recherche directe sur le résultat de cette dernière. Au moins + une des adresses IP fournies par la recherche directe doit + correspondre à l'adresse originale (ce que l'on nomme + <code>PARANOID</code> dans la terminologie "tcpwrappers").</p> + + <p>Quelle que soit la configuration, lorsqu'on utilise + <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> pour contrôler l'accès en fonction + du nom d'hôte, une double recherche DNS inverse est effectuée, + sécurité oblige. Notez cependant que le résultat de cette double + recherche n'est en général pas accessible, à moins que vous n'ayez + spécifié <code>HostnameLookups Double</code>. Par exemple, si vous + n'avez spécifié que <code>HostnameLookups On</code>, et si une + requête concerne un objet protégé par des restrictions en fonction + du nom d'hôte, quel que soit le résultat de la double recherche + inverse, les programmes CGI ne recevront que le résultat de la + recherche inverse simple dans la variable + <code>REMOTE_HOST</code>.</p> + + <p>La valeur par défaut est <code>Off</code> afin de préserver le + traffic réseau des sites pour lesquels la recherche inverse n'est + pas vraiment nécessaire. Cette valeur par défaut est aussi bénéfique + pour les utilisateurs finaux car il n'ont ainsi pas à subir de temps + d'attente supplémentaires dus aux recherches DNS. Les sites + fortement chargés devraient laisser cette directive à + <code>Off</code>, car les recherches DNS peuvent prendre des temps + très longs. Vous pouvez éventuellement utiliser hors ligne + l'utilitaire <code class="program"><a href="../programs/logresolve.html">logresolve</a></code>, compilé par défaut dans + le sous-répertoire <code>bin</code> de votre répertoire + d'installation, afin de déterminer les noms d'hôtes associés aux + adresses IP journalisées.</p> + + <p>Enfin, si vous avez des <a href="mod_authz_host.html#reqhost">directives Require à base de + nom</a>, une recherche de nom d'hôte sera effectuée quelle que soit + la définition de la directive <code class="directive">HostnameLookups</code>.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="httpprotocoloptions" id="httpprotocoloptions">Directive</a> <a name="HttpProtocolOptions" id="HttpProtocolOptions">HttpProtocolOptions</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Modifie les contraintes sur les messages des requêtes HTTP</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>HttpProtocolOptions Strict LenientMethods Allow0.9</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir des versions 2.2.32 et 2.4.24 du serveur HTTP +Apache</td></tr> +</table> + <p>Cette directive permet de modifier les règles qui s'appliquent à la ligne + de requête HTTP (<a href="https://tools.ietf.org/html/rfc7230#section-3.1.1">RFC 7230 + §3.1.1</a>) et aux champs des en-têtes des requêtes HTTP (<a href="https://tools.ietf.org/html/rfc7230#section-3.2">RFC 7230 + §3.2</a>), qui s'appliquent maintenant par défaut ou en utilisant + l'option <code>Strict</code>. L'option <code>Unsafe</code> + a été ajoutée pour pouvoir restaurer les anciens + comportements nécessaires aux anciens modules et applications et aux agents + utilisateurs personnalisés considérés comme obsolètes.</p> + + <p>Ces règles + s'appliquant avant le traitement de la requête, elles doivent, pour être prises en + compte, être définies + au niveau global ou dans la première section par défaut du serveur virtuel + qui correspond à la requête considérée, par interface IP/port et non par + nom.</p> + + <p>Cette directive accepte trois paramètres issus de la liste suivante, ceux + qui ne sont pas spécifiés prenant leur valeur par défaut :</p> + + <dl> + <dt>Strict|Unsafe</dt> + <dd> + <p>Avant l'introduction de cette directive, les interpréteurs de requêtes du + serveur HTTP Apache toléraient un grand nombre de formats en entrée qui + n'étaient pas forcément conformes au protocole. <a href="https://tools.ietf.org/html/rfc7230#section-9.4">RFC 7230 §9.4 + Request Splitting</a> et <a href="https://tools.ietf.org/html/rfc7230#section-9.5">§9.5 Response + Smuggling</a> ne rappellent que deux des risques potentiels induits par des + requêtes non conformes, alors que <a href="https://tools.ietf.org/html/rfc7230#section-3.5">RFC 7230 + §3.5</a> signale les risques encourus par l'acceptation de blancs non + conformes dans les lignes de requête. Avec l'introduction de cette + directive, toutes les règles de grammaire de la spécification doivent être + respectées dans le mode d'opérations par défaut <code>Strict</code>.</p> + + <div class="warning"><h3>Risques de sécurité liés au mode Unsafe</h3> + <p>Il est fortement déconseillé aux utilisateurs d'utiliser le mode + d'opération <code>Unsafe</code>, ou + <code>UnsafeWhitespace</code>, en particulier pour les déploiements de + serveurs ouverts sur l'extérieur et/ou accessibles au public. Si un moniteur + défectueux ou autre logiciel spécialisé ne s'exécutant que sur un intranet + nécessite une interface, les utilisateurs ne doivent utiliser les options de + type UnSafe qu'en cas de nécessité et uniquement au sein d'un serveur + virtuel bien spécifique et sur un réseau privé.</p> + </div> + + <div class="example"><h3>Exemple de requête provoquant l'envoi d'un message HTTP 400 en + mode Strict</h3><p><code> + + # Missing CRLF<br /> + GET / HTTP/1.0\n\n + </code></p></div> + <div class="warning"><h3>Utilitaires en ligne de commande et CRLF</h3> + <p>Il peut s'avérer nécessaire de forcer certains utilitaires à utiliser + CRLF ; si ce n'est pas le cas, httpd reverra une réponse HTTP 400 comme + dans le cas précédent. Par exemple, le <strong>client OpenSSL s_client + doit utiliser le paramètre -crlf pour fonctionner correctement</strong>.</p> + <p>Pour détecter des problèmes tels que l'absence de CRLF, vous pouvez + utiliser la directive <code class="directive"><a href="../mod/mod_dumpio.html#dumpioinput">DumpIOInput</a></code> qui permet de décortiquer + les requêtes HTTP.</p> + </div> + </dd> + <dt>RegisteredMethods|LenientMethods</dt> + <dd> + <p>La section de la <a href="https://tools.ietf.org/html/rfc7231#section-4.1">RFC 7231 + §4.1</a> "Request Methods" "Overview" indique que les serveurs doivent + renvoyer un message d'erreur lorsque la ligne de requête comporte une + méthode non supportée. C'est déjà le cas lorsque l'option + <code>LenientMethods</code> est utilisée, mais les administrateurs ont la + possibilité de limiter les méthodes utilisées via l'option + <code>RegisteredMethods</code> en enregistrant toute méthode non standard + via la directive <code class="directive">RegisterHttpMethod</code>, en particulier + si l'option <code>Unsafe</code> est utilisée.</p> + + <div class="warning"><h3>Compatibilité avec le mandat direct</h3> + <p>L'option + <code>RegisteredMethods</code> <strong>ne doit pas</strong> être utilisée + pour les serveurs mandataires car ces derniers ne connaissent pas les + méthodes supportées par les serveurs originaux.</p> + </div> + + <div class="example"><h3>Exemple de requête provoquant l'envoi d'un message HTTP 501 en + mode LenientMethods</h3><p><code> + + # Méthode HTTP inconnue<br /> + WOW / HTTP/1.0\r\n\r\n<br /><br /> + # Méthode HTTP spécifiée en minuscules<br /> + get / HTTP/1.0\r\n\r\n<br /> + </code></p></div> + </dd> + <dt>Allow0.9|Require1.0</dt> + <dd> + <p>La section de la <a href="https://tools.ietf.org/html/rfc2616#section-19.6">RFC 2616 + §19.6</a> "Compatibility With Previous Versions" encouragait les + serveurs HTTP à supporter les anciennes requêtes HTTP/0.9. La RFC 7230 va + cependant à son encontre via sa préconisation "Le souhait de supporter les + requêtes HTTP/0.9 a été supprimé" et y adjoint des commentaires dans <a href="https://tools.ietf.org/html/rfc7230#appendix-A">RFC 7230 Appendix + A</a>. A ce titre, l'option <code>Require1.0</code> permet à l'utilisateur + d'inhiber le comportement induit par l'option par défaut + <code>Allow0.9</code>.</p> + + <div class="example"><h3>Exemple de requête provoquant l'envoi d'un message HTTP 400 en + mode Require1.0</h3><p><code> + + # Version HTTP non supportée<br /> + GET /\r\n\r\n + </code></p></div> + </dd> + </dl> + + <p>La consultation des messages enregistrés dans le journal + <code class="directive">ErrorLog</code>, configuré via la directive + <code class="directive">LogLevel</code> avec un niveau <code>info</code>, pourra + vous aider à identifier de telles requêtes non conformes ainsi que leur + provenance. Les utilisateurs devront accorder une attention particulière aux + messages d'erreur de type 400 dans le journal access pour détecter les + requêtes apparemment valides mais rejetées.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="if" id="if">Directive</a> <a name="If" id="If"><If></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contient des directives qui ne s'appliquent que si une +condition est satisfaite au cours du traitement d'une +requête</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Les conditions imbriquées sont supportées à partir de la version +2.4.26 du serveur HTTP Apache</td></tr> +</table> + <p>La directive <code class="directive"><If></code> évalue une + expression à la volée, et applique les directives qu'elle contient + si et seulement si l'expression renvoie la valeur "vrai". Par + exemple :</p> + + <pre class="prettyprint lang-config"><If "-z req('Host')"></pre> + + + <p>serait satisfaite pour les requêtes HTTP/1.0 sans en-tête + <var>Host:</var>. Les expressions peuvent contenir différents + opérateurs de type shell pour la comparaison de chaînes + (<code>==</code>, <code>!=</code>, <code><</code>, ...), la + comparaison d'entiers (<code>-eq</code>, <code>-ne</code>, ...), ou + à usages divers (<code>-n</code>, <code>-z</code>, <code>-f</code>, + ...). Les expressions rationnelles sont aussi supportées,</p> + + <pre class="prettyprint lang-config"><If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"></pre> + + + <p>ainsi que les comparaison de modèles de type shell et de + nombreuses autres opérations. Ces opérations peuvent être effectuées + sur les en-têtes de requêtes (<code>req</code>), les variables + d'environnement (<code>env</code>), et un grand nombre d'autres + propriétés. La documentation complète est disponible dans <a href="../expr.html">Les expressions dans le serveur HTTP Apache</a>.</p> + + <p>Cette section de configuration ne peut contenir que des + directives qui supportent le <a href="directive-dict.html#Context">contexte de répertoire</a>.</p> + + <div class="warning"> + Certain variables, such as <code>CONTENT_TYPE</code> and other + response headers, are set after <If> conditions have already + been evaluated, and so will not be available to use in this + directive. + </div> + + <div class="warning"> + Les directives qui sont évaluées lors du traitement de la configuration + comme <code class="directive">Define</code>, <code class="directive">Include</code> et + <code class="directive">Error</code> ne peuvent pas être traitées de manière + conditionnelle en les incluant dans une section de configuration <code class="directive"><If></code>. Ces sections font en effet toujours partie de + la configuration, quelle soit la manière dont elles sont évaluées à + l'exécution. + </div> + + +<h3>Voir aussi</h3> +<ul> +<li><a href="../expr.html">Les expressions dans le serveur HTTP +Apache</a>, pour une référence complète et d'autres exemples.</li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">Comment fonctionnent les sections +<Directory>, <Location> et <Files></a> pour une +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête. Les +directives <code class="directive"><If></code>, <code class="directive"><ElseIf></code>, et <code class="directive"><Else></code> s'appliquent en dernier.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ifdefine" id="ifdefine">Directive</a> <a name="IfDefine" id="IfDefine"><IfDefine></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contient des directives qui ne s'appliqueront que si un +test retourne "vrai" au démarrage du serveur</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><IfDefine [!]<var>paramètre</var>> ... + </IfDefine></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La section <code><IfDefine + <var>test</var>>...</IfDefine></code> permet de + conférer un caractère conditionnel à un ensemble de directives. Les + directives situées à l'intérieur d'une section <code class="directive"><IfDefine></code> ne s'appliquent que si + <var>test</var> est vrai. Si <var>test</var> est faux, tout ce qui + se trouve entre les balises de début et de fin est ignoré.</p> + + <p><var>test</var> peut se présenter sous deux formes :</p> + + <ul> + <li><var>nom paramètre</var></li> + + <li><code>!</code><var>nom paramètre</var></li> + </ul> + + <p>Dans le premier cas, les directives situées entre les balises de + début et de fin ne s'appliqueront que si le paramètre nommé <var>nom + paramètre</var> est défini. Le second format inverse le test, et + dans ce cas, les directives ne s'appliqueront que si <var>nom + paramètre</var> n'est <strong>pas</strong> défini.</p> + + <p>L'argument <var>nom paramètre</var> est une définition qui peut + être effectuée par la ligne de commande + <code class="program"><a href="../programs/httpd.html">httpd</a></code> via le paramètre + <code>-D<var>paramètre</var></code> au démarrage du serveur, ou via la + directive <code class="directive"><a href="#define">Define</a></code>.</p> + + <p>Les sections <code class="directive"><IfDefine></code> + peuvent être imbriquées, ce qui permet d'implémenter un test + multi-paramètres simple. Exemple :</p> + + <div class="example"><p><code>httpd -DReverseProxy -DUseCache -DMemCache ...</code></p></div> + <pre class="prettyprint lang-config"><IfDefine ReverseProxy> + LoadModule proxy_module modules/mod_proxy.so + LoadModule proxy_http_module modules/mod_proxy_http.so + <IfDefine UseCache> + LoadModule cache_module modules/mod_cache.so + <IfDefine MemCache> + LoadModule mem_cache_module modules/mod_mem_cache.so + </IfDefine> + <IfDefine !MemCache> + LoadModule cache_disk_module modules/mod_cache_disk.so + </IfDefine> + </IfDefine> +</IfDefine></pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ifdirective" id="ifdirective">Directive</a> <a name="IfDirective" id="IfDirective"><IfDirective></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Regroupe des directives dont le traitement est conditionné par la +présence ou l'absence d'une directive particulière</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><IfDirective [!]<var>directive-name</var>> ... + </IfDirective></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.34 du serveur HTTP Apache</td></tr> +</table> + <p>La section <code><IfDirective + <var>test</var>>...</IfDirective></code> permet de regrouper des + directives dont le traitement n'est effectué que si une directive + particulière est présente, autrement dit si l'expression <var>test</var> est + évaluée à true. Si l'expression <var>test</var> est évaluée à false, toutes + les lignes qui se trouvent entre les balises de début et de fin de la + section sont ignorées.</p> + + <p>L'expression <var>test</var> de la section <code class="directive"><IfDirective></code> peut prendre les deux formes + suivantes :</p> + + <ul> + <li><var>directive-name</var></li> + + <li>!<var>directive-name</var></li> + </ul> + + <p>Dans le premier cas, les directives qui se situent entre les balises de + début et de fin de la section ne sont traitées que si une directive de nom + directive-name est disponible à cet instant. Dans le second cas, la condition est + inversée, et les directives ne sont traitées que si + <var>directive-name</var> n'est <strong>pas</strong> disponible.</p> + + <div class="note">Cette section ne doit être utilisée que si vous devez partager le même + fichier de configuration entre plusieurs versions de + <code class="program"><a href="../programs/httpd.html">httpd</a></code>, sans tenir compte de la disponibilité de telle ou + telle directive. Dans une configuration standard, il est inutile de placer + les directives dans des sections <code class="directive"><IfDirective></code>.</div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#ifsection"><IfSection></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="iffile" id="iffile">Directive</a> <a name="IfFile" id="IfFile"><IfFile></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Regroupe des directives qui ne seront traitées que si un fichier +existe au démarrage</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><IfFile [!]<var>filename</var>> ... + </IfFile></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.34 du serveur HTTP Apache</td></tr> +</table> + <p>La section <code><IfFile <var>filename</var>>...</IfFile></code> + permet de conditionner le traitement de directives à + l'existence d'un fichier sur disque. Ainsi, les directives définies au sein + d'une section <code class="directive"><IfFile></code> ne seront + traitées que si le fichier <var>filename</var> existe. Si le fichier + <var>filename</var> n'existe pas, tout ce qui se trouve entre les marqueurs + start et end sera ignoré. <var>filename</var> peut être un chemin absolu ou + relatif au chemin défini par la directive ServerRoot.</p> + + <p>Le paramètre <var>filename</var> de l'en-tête d'une section <code class="directive"><IfFile></code> peut prendre la même forme que la variable + <var>test</var> de la section <code class="directive"><a href="#ifdefine"><IfDefine></a></code> ; à ce titre, le résultat du test peut + être inversé en plaçant le caractère <code>!</code> juste avant + <var>filename</var>. + </p> + + <p>Si <var>filename</var> est un chemin relatif, il sera généré par rapport + au chemin défini par la directive <code class="directive"><a href="#serverroot">ServerRoot</a></code>. Lorsque la directive <code class="directive"><IfFile></code> intervient avant la définition de la + directive <code class="directive"><a href="#serverroot">ServerRoot</a></code>, + <var>filename</var> sera relatif au répertoire racine par défaut du serveur + ou au répertoire racine passé dans la ligne de commande via l'option + <code>-d</code>.</p> + + <div class="warning"><h3>Avertissement</h3> + Avec la version 2.4.34, il est interdit de spécifier un <var>filename</var> + entouré de guillemets. Ceci provoquerait une erreur de syntaxe au démarrage. + Il est donc impossible de spécifier des noms de fichiers contenant des + espaces, mais ce défaut a été corrigé à partir de la version 2.4.35.</div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ifmodule" id="ifmodule">Directive</a> <a name="IfModule" id="IfModule"><IfModule></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contient des directives qui ne s'appliquent qu'en fonction +de la présence ou de l'absence d'un module spécifique</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><IfModule [!]<var>fichier module</var>|<var>identificateur +module</var>> ... </IfModule></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Les identificateurs de modules sont disponibles dans les +versions 2.1 et supérieures.</td></tr> +</table> + <p>La section <code><IfModule + <var>test</var>>...</IfModule></code> permet de conférer à + des directives un caractère conditionnel basé sur la présence d'un + module spécifique. Les directives situées dans une section + <code class="directive"><IfModule></code> ne s'appliquent que + si <var>test</var> est vrai. Si <var>test</var> est faux, tout ce + qui se trouve entre les balises de début et de fin est ignoré.</p> + + <p><var>test</var> peut se présenter sous deux formes :</p> + + <ul> + <li><var>module</var></li> + + <li>!<var>module</var></li> + </ul> + + <p>Dans le premier cas, les directives situées entre les balises de + début et de fin ne s'appliquent que si le module <var>module</var> + est présent -- soit compilé avec le binaire Apache httpd, soit chargé + dynamiquement via la directive <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>. Le second format inverse le test, et dans + ce cas, les directives ne s'appliquent que si <var>module</var> + n'est <strong>pas</strong> présent.</p> + + <p>L'argument <var>module</var> peut contenir soit l'identificateur + du module, soit le nom du fichier source du module. Par exemple, + <code>rewrite_module</code> est un identificateur et + <code>mod_rewrite.c</code> le nom du fichier source + correspondant. Si un module comporte plusieurs fichiers sources, + utilisez le nom du fichier qui contient la chaîne de caractères + <code>STANDARD20_MODULE_STUFF</code>.</p> + + <p>Les sections <code class="directive"><IfModule></code> + peuvent être imbriquées, ce qui permet d'implémenter des tests + multi-modules simples.</p> + + <div class="note">Cette section ne doit être utilisée que si votre fichier de + configuration ne fonctionne qu'en fonction de la présence ou de + l'absence d'un module spécifique. D'une manière générale, il n'est + pas nécessaire de placer les directives à l'intérieur de sections + <code class="directive"><IfModule></code>.</div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ifsection" id="ifsection">Directive</a> <a name="IfSection" id="IfSection"><IfSection></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Regroupe des directives dont le traitement est conditionné par la +présence ou l'absence d'une section particulière</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><IfSection [!]<var>section-name</var>> ... + </IfSection></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.34 du serveur HTTP Apache</td></tr> +</table> + <p>La section <code><IfSection + <var>test</var>>...</IfSection></code> permet de regrouper des + directives dont le traitement n'est effectué que si une section de + configuration particulière est présente. Une section, par exemple <code class="directive"><VirtualHost></code>, permet de regrouper des directives + et possède un nom précédé du caractère "<".</p> + + <p>Les directives situées à l'intérieur d'une section <code class="directive"><IfSection></code> ne sont traitées que si l'expression + <var>test</var> est évaluée à true. Si l'expression <var>test</var> est + évaluée à false, toutes les lignes situées entre les balises de début et de + fin de la section sont ignorées.</p> + + <p><var>section-name</var> doit être spécifié sans les caractères de début + "<" ou fin ">". L'expression <var>test</var> de la section <code class="directive"><IfSection></code> peut prendre deux formes :</p> + + <ul> + <li><var>section-name</var></li> + <li>!<var>section-name</var></li> + </ul> + + <p>Dans le premier cas, les directives qui se situent entre les balises de + début et de fin de la section ne sont traitées que si une section de nom + section-name est disponible à cet instant. Dans le second cas, la condition est + inversée, et les directives ne sont traitées que si + <var>section-name</var> n'est <strong>pas</strong> disponible.</p> + + <p>Par exemple :</p> + + <pre class="prettyprint lang-config"><IfSection VirtualHost> + ... +</IfSection></pre> + + + <div class="note">Cette section ne doit être utilisée que si vous devez partager le même + fichier de configuration entre plusieurs versions de + <code class="program"><a href="../programs/httpd.html">httpd</a></code>, sans tenir compte de la disponibilité de telle ou + telle section. Dans une configuration standard, il est inutile de placer + les directives dans des sections <code class="directive"><IfSection></code>.</div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#ifdirective"><IfDirective></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="include" id="include">Directive</a> <a name="Include" id="Include">Include</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Inclut d'autres fichiers de configuration dans un des +fichiers de configuration du serveur</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>Include <var>chemin-fichier</var>|<var>chemin-répertoire</var>|<var>wildcard</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Utilisation des caractères génériques dans la partie chemin depuis la +version 2.3.6</td></tr> +</table> + <p>Cette directive permet l'inclusion d'autres fichiers de + configuration dans un des fichiers de configuration du serveur.</p> + + <p>On peut utiliser des caractères génériques de style Shell + (<code>fnmatch()</code>) aussi bien dans la partie nom de fichier du + chemin que dans la partie répertoires pour inclure plusieurs + fichiers en une + seule fois, selon leur ordre alphabétique. De plus, si la directive + <code class="directive">Include</code> pointe vers un répertoire, Apache + httpd inclura tous les fichiers de ce répertoire et de tous ces + sous-répertoires. L'inclusion de répertoires entiers est cependant + déconseillée, car il est fréquent d'oublier des fichiers + temporaires dans un répertoire, ce qui causerait une erreur + <code class="program"><a href="../programs/httpd.html">httpd</a></code> en cas d'inclusion. Pour inclure des + fichiers qui correspondent à un certain modèle, comme *.conf par + exemple, nous vous recommandons d'utiliser plutôt la syntaxe avec + caractères génériques comme ci-dessous.</p> + + <p>La directive <code class="directive"><a href="#include">Include</a></code> + <strong>échouera avec un code d'erreur</strong> si une expression + contenant des caractères génériques ne correspond à aucun fichier. + Pour ignorer les expressions contenant des caractères génériques ne + correspondant à aucun fichier, utilisez la directive <code class="directive"><a href="#includeoptional">IncludeOptional</a></code>.</p> + + <p>Le chemin fichier spécifié peut être soit un chemin absolu, soit + un chemin relatif au répertoire défini par la directive <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p> + + <p>Exemples :</p> + + <pre class="prettyprint lang-config">Include /usr/local/apache2/conf/ssl.conf +Include /usr/local/apache2/conf/vhosts/*.conf</pre> + + + <p>ou encore, avec des chemins relatifs au répertoire défini par la + directive <code class="directive"><a href="#serverroot">ServerRoot</a></code> :</p> + + <pre class="prettyprint lang-config">Include conf/ssl.conf +Include conf/vhosts/*.conf</pre> + + + <p>On peut aussi insérer des caractères génériques dans la partie + répertoires du chemin. Dans l'exemple suivant, la directive + échouera si aucun sous-répertoire de conf/vhosts ne contient au + moins un fichier *.conf :</p> + + <pre class="prettyprint lang-config">Include conf/vhosts/*/*.conf</pre> + + + <p>Par contre, dans l'exemple suivant, la directive sera simplement + ignorée si aucun sous-répertoire de conf/vhosts ne contient au + moins un fichier *.conf :</p> + + <pre class="prettyprint lang-config">IncludeOptional conf/vhosts/*/*.conf</pre> + + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#includeoptional">IncludeOptional</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="includeoptional" id="includeoptional">Directive</a> <a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Inclusion de fichiers dans le fichier de configuration</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>IncludeOptional +<var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.3.6 du serveur HTTP +Apache. Après la version 2.4.30, les chemins de fichiers non existants et +ne comportant pas de caractères génériques ne génèrent plus d'erreurs de syntaxe</td></tr> +</table> + <p>Cette directive permet d'inclure des fichiers dans les fichiers + de configuration du serveur. Elle fonctionne de manière identique à + la directive <code class="directive"><a href="#include">Include</a></code>, mais au lieu de + générer une erreur, elle sera ignorée silensieusement si malgré + l'utilisation de caractères génériques, le chemin de fichier ou de + répertoire spécifié n'existe pas dans le système de fichiers.</p> + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#include">Include</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="keepalive" id="keepalive">Directive</a> <a name="KeepAlive" id="KeepAlive">KeepAlive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Active les connexions HTTP persistantes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>KeepAlive On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>KeepAlive On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>L'extension Keep-Alive de HTTP/1.0 et l'implémentation des + connexions persistantes dans HTTP/1.1 ont rendu possibles des + sessions HTTP de longue durée, ce qui permet de transmettre + plusieurs requêtes via la même connexion TCP. Dans certains cas, le + gain en rapidité pour des documents comportant de nombreuses images + peut atteindre 50%. Pour activer les connexions persistantes, + définissez <code>KeepAlive On</code>.</p> + + <p>Pour les clients HTTP/1.0, les connexions persistantes ne seront + mises en oeuvre que si elles ont été spécialement demandées par un + client. De plus, une connexion persistante avec un client HTTP/1.0 + ne peut être utilisée que si la taille du contenu est connue + d'avance. Ceci implique que les contenus dynamiques comme les + sorties CGI, les pages SSI, et les listings de répertoires générés + par le serveur n'utiliseront en général pas les connexions + persistantes avec les clients HTTP/1.0. Avec les clients HTTP/1.1, + les connexions persistantes sont utilisées par défaut, sauf + instructions contraires. Si le client le demande, le transfert par + tronçons de taille fixe (chunked encoding) sera utilisé afin de + transmettre un contenu de longueur inconnue via une connexion + persistante.</p> + + <p>Lorsqu'un client utilise une connexion persistante, elle comptera + pour une seule requête pour la directive <code class="directive"><a href="../mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code>, quel + que soit le nombre de requêtes transmises via cette connexion.</p> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="keepalivetimeout" id="keepalivetimeout">Directive</a> <a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Durée pendant laquelle le serveur va attendre une requête +avant de fermer une connexion persistante</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>KeepAliveTimeout <var>nombre</var>[ms]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>KeepAliveTimeout 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Le nombre de secondes pendant lesquelles Apache httpd va attendre une + requête avant de fermer la connexion. Le délai peut être défini en + millisecondes en suffixant sa valeur par ms. La valeur du délai + spécifiée par la directive <code class="directive"><a href="#timeout">Timeout</a></code> s'applique dès qu'une requête a + été reçue.</p> + + <p>Donner une valeur trop élévée à + <code class="directive">KeepAliveTimeout</code> peut induire des problèmes + de performances sur les serveurs fortement chargés. Plus le délai + est élévé, plus nombreux seront les processus serveur en attente de + requêtes de la part de clients inactifs.</p> + + <p>Si la directive <code class="directive">KeepAliveTimeout</code> n'est + <strong>pas</strong> définie pour un serveur virtuel à base de nom, c'est + la valeur de la paire adresse IP/port du serveur virtuel qui + correspond le mieux qui sera utilisée.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limit" id="limit">Directive</a> <a name="Limit" id="Limit"><Limit></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limite les contrôles d'accès que la section contient à +certaines méthodes HTTP</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><Limit <var>méthode</var> [<var>méthode</var>] ... > ... + </Limit></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>AuthConfig, Limit</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Les contrôles d'accès s'appliquent normalement à + <strong>toutes</strong> les méthodes d'accès, et c'est en général le + comportement souhaité. <strong>Dans le cas général, les directives + de contrôle d'accès n'ont pas à être placées dans une section + <code class="directive"><Limit></code>.</strong></p> + + <p>La directive <code class="directive"><Limit></code> a pour + but de limiter les effets des contrôles d'accès aux méthodes HTTP + spécifiées. Pour toutes les autres méthodes, les restrictions + d'accès contenues dans la section <code class="directive"><Limit></code> <strong>n'auront aucun + effet</strong>. L'exemple suivant n'applique les contrôles d'accès + qu'aux méthodes <code>POST</code>, <code>PUT</code>, et + <code>DELETE</code>, en laissant les autres méthodes sans protection + :</p> + + <pre class="prettyprint lang-config"><Limit POST PUT DELETE> + Require valid-user +</Limit></pre> + + + <p>La liste des noms de méthodes peut contenir une ou plusieurs + valeurs parmi les suivantes : <code>GET</code>, <code>POST</code>, + <code>PUT</code>, <code>DELETE</code>, <code>CONNECT</code>, + <code>OPTIONS</code>, <code>PATCH</code>, <code>PROPFIND</code>, + <code>PROPPATCH</code>, <code>MKCOL</code>, <code>COPY</code>, + <code>MOVE</code>, <code>LOCK</code>, et <code>UNLOCK</code>. + <strong>Le nom de méthode est sensible à la casse.</strong> Si la + valeur <code>GET</code> est présente, les requêtes <code>HEAD</code> + seront aussi concernées. La méthode <code>TRACE</code> ne peut pas + être limitée (voir la directive <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p> + + <div class="warning">Une section <code class="directive"><LimitExcept></code> doit toujours être préférée à + une section <code class="directive"><Limit></code> pour la + restriction d'accès, car une section <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> fournit une protection contre + les méthodes arbitraires.</div> + + <p>Les directives <code class="directive"><Limit></code> et + <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> + peuvent être imbriquées. Dans ce cas, pour chaque niveau des + directives <code class="directive"><Limit></code> ou <code class="directive"><a href="#limitexcept"><LimitExcept></a></code>, ces dernières + doivent restreindre l'accès pour les méthodes auxquelles les + contrôles d'accès s'appliquent.</p> + + <div class="warning">Lorsqu'on utilise les directives <code class="directive"><Limit></code> ou <code class="directive"><LimitExcept></code> avec la directive <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>, la première directive + <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> dont la + condition est satisfaite autorise la requête, sans tenir compte de + la présence d'autres directives <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>.</div> + + <p>Par exemple, avec la configuration suivante, tous les + utilisateurs seront autorisés à effectuer des requêtes + <code>POST</code>, et la directive <code>Require group + editors</code> sera ignorée dans tous les cas :</p> + + <pre class="prettyprint lang-config"><LimitExcept GET> + Require valid-user +</LimitExcept> +<Limit POST> + Require group editors +</Limit></pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitexcept" id="limitexcept">Directive</a> <a name="LimitExcept" id="LimitExcept"><LimitExcept></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applique les contrôles d'accès à toutes les méthodes HTTP, +sauf celles qui sont spécifiées</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><LimitExcept <var>méthode</var> [<var>méthode</var>] ... > ... + </LimitExcept></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>AuthConfig, Limit</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><LimitExcept></code> et + <code></LimitExcept></code> permettent de regrouper des + directives de contrôle d'accès qui s'appliqueront à toutes les + méthodes d'accès HTTP qui ne font <strong>pas</strong> partie de la + liste des arguments ; en d'autres termes, elles ont un comportement + opposé à celui de la section <code class="directive"><a href="#limit"><Limit></a></code>, et on peut les utiliser pour + contrôler aussi bien les méthodes standards que les méthodes non + standards ou non reconnues. Voir la documentation de la section + <code class="directive"><a href="#limit"><Limit></a></code> pour plus + de détails.</p> + + <p>Par exemple :</p> + + <pre class="prettyprint lang-config"><LimitExcept POST GET> + Require valid-user +</LimitExcept></pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a> <a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Détermine le nombre maximal de redirections internes et de +sous-requêtes imbriquées</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>LimitInternalRecursion <var>nombre</var> [<var>nombre</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>LimitInternalRecursion 10</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Une redirection interne survient, par exemple, quand on utilise + la directive <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> qui + redirige en interne la requête d'origine vers un script CGI. Une + sous-requête est le mécanisme qu'utilise Apache httpd pour déterminer ce + qui se passerait pour un URI s'il faisait l'objet d'une requête. Par + exemple, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> utilise les sous-requêtes pour + rechercher les fichiers listés dans la directive <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>.</p> + + <p>La directive <code class="directive">LimitInternalRecursion</code> permet + d'éviter un crash du serveur dû à un bouclage infini de redirections + internes ou de sous-requêtes. De tels bouclages sont dus en général + à des erreurs de configuration.</p> + + <p>La directive accepte, comme arguments, deux limites qui sont + évaluées à chaque requête. Le premier <var>nombre</var> est le + nombre maximum de redirections internes qui peuvent se succéder. Le + second <var>nombre</var> détermine la profondeur d'imbrication + maximum des sous-requêtes. Si vous ne spécifiez qu'un seul + <var>nombre</var>, il sera affecté aux deux limites.</p> + + <pre class="prettyprint lang-config">LimitInternalRecursion 5</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitrequestbody" id="limitrequestbody">Directive</a> <a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>limite la taille maximale du corps de la requête HTTP +envoyée par le client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>LimitRequestBody <var>octets</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>LimitRequestBody 1073741824</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Dans les versions 2.4.53 et antérieures du serveur HTTP Apache, +la valeur par défaut était 0 (aucune limite)</td></tr> +</table> + <p>Cette directive permet de spécifier la taille maximale d'un corps de + requête, en <var>octets</var>. Une valeur de <var>0</var> signifie « sans + limites ».</p> + + <p>La directive <code class="directive">LimitRequestBody</code> permet de + définir une limite pour la taille maximale autorisée du corps d'une + requête HTTP en tenant compte du contexte dans lequel la directive + a été placée (c'est à dire au niveau du serveur, d'un répertoire, + d'un fichier ou d'une localisation). Si la requête du client dépasse + cette limite, le serveur répondra par un message d'erreur et ne + traitera pas la requête. La taille du corps d'une requête normale va + varier de manière importante en fonction de la nature de la + ressource et des méthodes autorisées pour cette dernière. Les + scripts CGI utilisent souvent le corps du message pour extraire les + informations d'un formulaire. Les implémentations de la méthode + <code>PUT</code> nécessitent une valeur au moins aussi élevée que la + taille maximale des représentations que le serveur désire accepter + pour cette ressource.</p> + + <p>L'administrateur du serveur peut utiliser cette directive pour + contrôler plus efficacement les comportements anormaux des requêtes + des clients, ce qui lui permettra de prévenir certaines formes + d'attaques par déni de service.</p> + + <p>Si par exemple, vous autorisez le chargement de fichiers vers une + localisation particulière, et souhaitez limiter la taille des + fichiers chargés à 100Ko, vous pouvez utiliser la directive suivante + :</p> + + <pre class="prettyprint lang-config">LimitRequestBody 102400</pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitrequestfields" id="limitrequestfields">Directive</a> <a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limite le nombre de champs d'en-tête autorisés dans une +requête HTTP</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>LimitRequestFields <var>nombre</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>LimitRequestFields 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p><var>nombre</var> est un entier de 0 à 32767. La valeur 0 signifie un + nombre de champs illimité. La valeur par défaut est définie à la compilation + par la constante <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 selon la + distribution).</p> + + <p>La directive <code class="directive">LimitRequestFields</code> permet à + l'administrateur du serveur de modifier le nombre maximum de champs + d'en-tête autorisés dans une requête HTTP. Pour un serveur, cette + valeur doit être supérieure au nombre de champs qu'une requête + client normale peut contenir. Le nombre de champs d'en-tête d'une + requête qu'un client utilise dépasse rarement 20, mais ce nombre + peut varier selon les implémentations des clients, et souvent en + fonction des extensions que les utilisateurs configurent dans leurs + navigateurs pour supporter la négociation de contenu détaillée. Les + extensions HTTP optionnelles utilisent souvent les + champs d'en-tête des requêtes.</p> + + <p>L'administrateur du serveur peut utiliser cette directive pour + contrôler plus efficacement les comportements anormaux des requêtes + des clients, ce qui lui permettra de prévenir certaines formes + d'attaques par déni de service. La valeur spécifiée doit être + augmentée si les clients standards reçoivent une erreur du serveur + indiquant que la requête comportait un nombre d'en-têtes trop + important.</p> + + <p>Par exemple :</p> + + <pre class="prettyprint lang-config">LimitRequestFields 50</pre> + + + <div class="warning"><h3>Avertissement</h3> + <p>Dans le cas des serveurs virtuels à base de noms, la valeur de + cette directive est extraite du serveur virtuel par défaut (le + premier de la liste) pour la paire adresse IP/port.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a> <a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Dédinit la taille maximale autorisée d'un en-tête de +requête HTTP</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>LimitRequestFieldSize <var>octets</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive permet de définir le nombre maximum + d'<var>octets</var> autorisés dans un en-tête de requête HTTP.</p> + + <p>La directive <code class="directive">LimitRequestFieldSize</code> permet + à l'administrateur du serveur de définir la taille + maximale autorisée d'un en-tête de requête HTTP. Pour un serveur, + cette valeur doit être suffisamment grande pour contenir tout + en-tête d'une requête client normale. La taille d'un champ d'en-tête + de requête normal va varier selon les implémentations des clients, + et en fonction des extensions que les utilisateurs + configurent dans leurs navigateurs pour supporter la négociation de + contenu détaillée. Les en-têtes d'authentification SPNEGO peuvent + atteindre une taille de 12392 octets.</p> + + <p>L'administrateur du serveur peut utiliser cette directive pour + contrôler plus efficacement les comportements anormaux des requêtes + des clients, ce qui lui permettra de prévenir certaines formes + d'attaques par déni de service.</p> + + <p>Par exemple :</p> + + <pre class="prettyprint lang-config">LimitRequestFieldSize 4094</pre> + + + <div class="note">Dans des conditions normales, la valeur par défaut de cette + directive ne doit pas être modifiée.</div> + + <div class="warning"><h3>Avertissement</h3> + <p>Dans le cas des serveurs virtuels à base de noms, la valeur de + cette directive est extraite du serveur virtuel par défaut (le + premier de la liste) pour lequel la paire adresse IP/port + correspond le mieux.</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitrequestline" id="limitrequestline">Directive</a> <a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit la taille maximale d'une ligne de requête +HTTP</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>LimitRequestLine <var>octets</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>LimitRequestLine 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive permet de définir la taille maximale autorisée + pour une ligne de requête HTTP en <var>octets</var>.</p> + + <p>La directive <code class="directive">LimitRequestLine</code> permet à + l'administrateur du serveur de définir la taille + maximale autorisée d'une ligne de requête HTTP client. Comme une + requête comporte une méthode HTTP, un URI, et une version de + protocole, la directive <code class="directive">LimitRequestLine</code> + impose une restriction sur la longueur maximale autorisée pour un + URI dans une requête au niveau du serveur. Pour un serveur, cette + valeur doit être suffisamment grande pour référencer les noms de + toutes ses ressources, y compris toutes informations pouvant être + ajoutées dans la partie requête d'une méthode <code>GET</code>.</p> + + <p>L'administrateur du serveur peut utiliser cette directive pour + contrôler plus efficacement les comportements anormaux des requêtes + des clients, ce qui lui permettra de prévenir certaines formes + d'attaques par déni de service.</p> + + <p>Par exemple :</p> + + <pre class="prettyprint lang-config">LimitRequestLine 4094</pre> + + + <div class="note">Dans des conditions normales, cette directive doit conserver + sa valeur par défaut.</div> + + <div class="warning"><h3>Avertissement</h3> + <p>Dans le cas des serveurs virtuels à base de noms, la valeur de + cette directive est extraite du serveur virtuel par défaut (le + premier de la liste) pour lequel la paire adresse IP/port + correspond le mieux.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a> <a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit la taille maximale du corps d'une requête au format +XML</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>LimitXMLRequestBody <var>octets</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Taille maximale (en octets) du corps d'une requête au format XML. Une + valeur de <code>0</code> appliquera une limite physique (différente selon + que le système est sur 32 ou 64 bits) permettant à XML de s'étaler jusqu'aux + limites de la mémoire adressable du système, mais elle n'existe qu'à des + fins de compatibilité et il est déconseillé de l'utiliser car elle ne tient + pas compte de la mémoire consommée ailleurs et des requêtes simultanées, ce + qui pourrait provoquer un dépassement de mémoire global du système. + </p> + + <p>Exemple :</p> + + <pre class="prettyprint lang-config"># Limitation à 1 Mo +LimitXMLRequestBody 1073741824</pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="location" id="location">Directive</a> <a name="Location" id="Location"><Location></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>N'applique les directives contenues qu'aux URLs +spécifiées</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><Location + <var>chemin URL</var>|<var>URL</var>> ... </Location></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive"><Location></code> + limite la portée des directives contenues aux URLs définies par + l'argument URL. Elle est similaire à la directive <code class="directive"><a href="#directory"><Directory></a></code>, et marque le + début d'une section qui se termine par une directive + <code></Location></code>. Les sections <code class="directive"><Location></code> sont traitées selon l'ordre dans + lequel elles apparaissent dans le fichier de configuration, mais + après les sections <code class="directive"><a href="#directory"><Directory></a></code> et la lecture des + fichiers <code>.htaccess</code>, et après les sections <code class="directive"><a href="#files"><Files></a></code>.</p> + + <p>Les sections <code class="directive"><Location></code> + agissent complètement en dehors du système de fichiers. Ceci a de + nombreuses conséquences. Parmi les plus importantes, on ne doit pas + utiliser les sections <code class="directive"><Location></code> + pour contrôler l'accès aux répertoires du système de fichiers. Comme + plusieurs URLs peuvent correspondre au même répertoire du système de + fichiers, un tel contrôle d'accès pourrait être contourné.</p> + + <p>Les directives que contient cette section seront appliquées aux + requêtes si la partie chemin de l'URL satisfait à l'un au moins de + ces critères : + </p> + <ul> + <li>Le chemin spécifié correspond exactement à la partie chemin de + l'URL. + </li> + <li>Le chemin spécifié, qui se termine par un slash, est un + préfixe de la partie chemin de l'URL (traité comme une racine du + contexte). + </li> + <li>Le chemin spécifié, si on lui ajoute un slash de fin, est un + préfixe de la partie chemin de l'URL (aussi traité comme une racine du + contexte). + </li> + </ul> + <p> + Dans l'exemple ci-dessous, où aucun slash de fin n'est utilisé, les + directives contenues dans la section s'appliqueront à /private1, + /private1/ et /private1/file.txt, mais pas à /private1other. + </p> + <pre class="prettyprint lang-config"><Location "/private1"> + # ... +</Location></pre> + + <p> + De même, dans l'exemple ci-dessous, où l'on utilise un slash de fin, les + directives contenues dans la section s'appliqueront à /private2/ et + à /private2/file.txt, mais pas à /private2other. + </p> + <pre class="prettyprint lang-config"><Location "/private2<em>/</em>"> + # ... +</Location></pre> + + + <div class="note"><h3>Quand utiliser la section <code class="directive"><Location></code></h3> + + <p>Vous pouvez utiliser une section <code class="directive"><Location></code> pour appliquer des directives à + des contenus situés en dehors du système de fichiers. Pour les + contenus situés à l'intérieur du système de fichiers, utilisez + plutôt les sections <code class="directive"><a href="#directory"><Directory></a></code> et <code class="directive"><a href="#files"><Files></a></code>. <code><Location + "/"></code> constitue une exception et permet d'appliquer aisément + une configuration à l'ensemble du serveur.</p> + </div> + + <p>Pour toutes les requêtes originales (non mandatées), l'argument + URL est un chemin d'URL de la forme + <code>/chemin/</code>. <em>Aucun protocole, nom d'hôte, port, ou chaîne + de requête ne doivent apparaître.</em> Pour les requêtes mandatées, l'URL + spécifiée doit être de la forme + <code>protocole://nom_serveur/chemin</code>, et vous devez inclure + le préfixe.</p> + + <p>L'URL peut contenir des caractères génériques. Dans une chaîne + avec caractères génériques, <code>?</code> correspond à un caractère + quelconque, et <code>*</code> à toute chaîne de caractères. Les + caractères génériques ne peuvent pas remplacer un / dans le chemin + URL.</p> + + <p>On peut aussi utiliser les <a class="glossarylink" href="../glossary.html#regex" title="voir glossaire">Expressions + rationnelles</a>, moyennant l'addition d'un caractère + <code>~</code>. Par exemple :</p> + + <pre class="prettyprint lang-config"><Location ~ "/(extra|special)/data"> + #... +</Location></pre> + + + <p>concernerait les URLs contenant les sous-chaîne + <code>/extra/data</code> ou <code>/special/data</code>. La directive + <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> + présente un comportement identique à la version avec expressions + rationnelles de la directive <code class="directive"><Location></code>, et son utilisation est + préférable à l'utilisation de cette dernière pour la simple raison + qu'il est difficile de distinguer <code>~</code> de <code>-</code> + dans la plupart des fontes.</p> + + <p>La directive <code class="directive"><Location></code> + s'utilise principalement avec la directive <code class="directive"><a href="#sethandler">SetHandler</a></code>. Par exemple, pour activer les + requêtes d'état, mais ne les autoriser que depuis des navigateurs + appartenant au domaine <code>example.com</code>, vous pouvez + utiliser :</p> + + <pre class="prettyprint lang-config"><Location "/status"> + SetHandler server-status + Require host example.com +</Location></pre> + + + <div class="note"><h3>Note à propos du slash (/)</h3> <p>La signification du + caractère slash dépend de l'endroit où il se trouve dans l'URL. Les + utilisateurs peuvent être habitués à son comportement dans le système de + fichiers où plusieurs slashes successifs sont souvent réduits à un slash + unique (en d'autres termes, <code>/home///foo</code> est identique à + <code>/home/foo</code>). Dans l'espace de nommage des URLs, ce n'est + cependant pas toujours vrai si la directive <code class="directive"><a href="#mergeslashes">MergeSlashes</a></code> a été définie à "OFF". Pour la + directive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> + et la version avec expressions rationnelles de la directive <code class="directive"><Location></code>, vous devez spécifier explicitement les + slashes multiples si les slashes ne sont pas fusionnés.</p> + + <p>Par exemple, <code><LocationMatch "^/abc"></code> va + correspondre à l'URL <code>/abc</code> mais pas à l'URL <code> + //abc</code>. La directive <code class="directive"><Location></code> sans expression rationnelle se comporte de + la même manière lorsqu'elle est utilisée pour des requêtes + mandatées. Par contre, lorsque la directive <code class="directive"><Location></code> sans expression rationnelle + est utilisée pour des requêtes non mandatées, elle fera + correspondre implicitement les slashes multiples à des slashes + uniques. Par exemple, si vous spécifiez <code><Location + "/abc/def"></code>, une requête de la forme + <code>/abc//def</code> correspondra.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><a href="../sections.html">Comment fonctionnent les sections +<Directory>, <Location> et <Files></a> pour une +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="locationmatch" id="locationmatch">Directive</a> <a name="LocationMatch" id="LocationMatch"><LocationMatch></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>N'applique les directives contenues qu'aux URLs +correspondant à une expression rationnelle</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><LocationMatch + <var>regex</var>> ... </LocationMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive"><LocationMatch></code> + limite la portée des directives contenues à l'URL spécifiée, de + manière identique à la directive <code class="directive"><a href="#location"><Location></a></code>. Mais son argument permettant de + spécifier les URLs concernées est une <a class="glossarylink" href="../glossary.html#regex" title="voir glossaire">expression rationnelle</a> au lieu d'une simple + chaîne de caractères. Par exemple :</p> + + <pre class="prettyprint lang-config"><LocationMatch "/(extra|special)/data"> + # ... +</LocationMatch></pre> + + + <p>correspondrait à toute URL contenant les sous-chaînes + <code>/extra/data</code> ou <code>/special/data</code>.</p> + + <div class="note"><p>Si vous recherchez une URL <strong>commençant par</strong> + plutôt que seulement contenant <code>/extra/data</code>, préfixez + l'expression rationnelle avec un <code>^</code>.</p> + + <pre class="prettyprint lang-config"><LocationMatch "^/(extra|special)/data"></pre> + + </div> + + <p>A partir de la version 2.4.8, les groupes nommés et les + références arrières sont extraits et enregistrés dans + l'environnement avec leur nom en majuscules et préfixé + par "MATCH_". Ceci permet + de référencer des URLs dans des <a href="../expr.html">expressions</a> + ou au sein de modules comme <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. Pour + éviter toute confusion, les références arrières numérotées (non + nommées) sont ignorées. Vous devez utiliser à la place des groupes + nommés.</p> + +<pre class="prettyprint lang-config"><LocationMatch "^/combined/(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</LocationMatch></pre> + + + <div class="note"><h3>Note à propos du slash '/'</h3> <p>La signification du + caractère slash '/' dépend de l'endroit où il apparaît dans une URL. Les + utilisateurs sont habitués à voir de multiples slashes adjacents réduits à + un seul au sein du système de fichiers (par exemple, + <code>/home///foo</code> est équivalent à <code>/home/foo</code>). Ce n'est + n'est cependant pas toujours vrai au sein des URLs si la directive + <code class="directive"><a href="#mergeslashes">MergeSlashes</a></code> a été définie à "OFF". En + effet, si vous souhaitez spécifier plusieurs slashes, vous devez le faire + explicitement au sein de la directive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> et de la version regex de la + directive <code class="directive"><Location></code>, si les slashes ne + sont pas fusionnés.</p> + + <p>Par exemple, <code><LocationMatch "^/abc"></code> correspondra à + l'URL <code>/abc</code>, mais pas à l'URL <code>//abc</code>. La directive + (non-regex) <code class="directive"><Location></code> se comporte de + la même manière lorsqu'elle est utilisée dans les requêtes de mandataire. + Par contre, pour les autres types de requêtes, la directive <code class="directive"><Location></code> considérera plusieurs slashes + adjacents comme équivalents à un seul slash. Par exemple, si vous + spécifiez <code><Location "/abc/def"></code>, une requête pour + <code>/abc//def</code> correspondra.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><a href="../sections.html">Comment fonctionnent les sections +<Directory>, <Location> et <Files></a> pour une +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="loglevel" id="loglevel">Directive</a> <a name="LogLevel" id="LogLevel">LogLevel</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contrôle la verbosité du journal des erreurs</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>LogLevel [<var>module</var>:]<var>niveau</var> + [<var>module</var>:<var>niveau</var>] ... +</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>LogLevel warn</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>La configuration du niveau de journalisation par module +et par répertoire est disponible depuis la version 2.3.6 du serveur HTTP +Apache</td></tr> +</table> + <p>La directive <code class="directive">LogLevel</code> permet d'ajuster la + verbosité des messages enregistrés dans les journaux d'erreur (voir + la directive <code class="directive"><a href="#errorlog">ErrorLog</a></code> + directive). Les <var>niveau</var>x disponibles sont présentés + ci-après, par ordre de criticité décroissante :</p> + + <table class="bordered"> + + <tr> + <th><strong>Niveau</strong> </th> + + <th><strong>Description</strong> </th> + + <th><strong>Exemple</strong> </th> + </tr> + + <tr> + <td><code>emerg</code> </td> + + <td>Urgences - le système est inutilisable.</td> + + <td>"Child cannot open lock file. Exiting"</td> + </tr> + + <tr> + <td><code>alert</code> </td> + + <td>Des mesures doivent être prises immédiatement.</td> + + <td>"getpwuid: couldn't determine user name from uid"</td> + </tr> + + <tr> + <td><code>crit</code> </td> + + <td>Conditions critiques.</td> + + <td>"socket: Failed to get a socket, exiting child"</td> + </tr> + + <tr> + <td><code>error</code> </td> + + <td>Erreurs.</td> + + <td>"Premature end of script headers"</td> + </tr> + + <tr> + <td><code>warn</code> </td> + + <td>Avertissements.</td> + + <td>"child process 1234 did not exit, sending another + SIGHUP"</td> + </tr> + + <tr> + <td><code>notice</code> </td> + + <td>Evènement important mais normal.</td> + + <td>"httpd: caught SIGBUS, attempting to dump core in + ..."</td> + </tr> + + <tr> + <td><code>info</code> </td> + + <td>Informations.</td> + + <td>"Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..."</td> + </tr> + + <tr> + <td><code>debug</code> </td> + + <td>Messages de débogage.</td> + + <td>"Opening config file ..."</td> + </tr> + <tr> + <td><code>trace1</code> </td> + + <td>Messages de traces</td> + + <td>"proxy: FTP: control connection complete"</td> + </tr> + <tr> + <td><code>trace2</code> </td> + + <td>Messages de traces</td> + + <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td> + </tr> + <tr> + <td><code>trace3</code> </td> + + <td>Messages de traces</td> + + <td>"openssl: Handshake: start"</td> + </tr> + <tr> + <td><code>trace4</code> </td> + + <td>Messages de traces</td> + + <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td> + </tr> + <tr> + <td><code>trace5</code> </td> + + <td>Messages de traces</td> + + <td>"map lookup FAILED: map=rewritemap key=keyname"</td> + </tr> + <tr> + <td><code>trace6</code> </td> + + <td>Messages de traces</td> + + <td>"cache lookup FAILED, forcing new map lookup"</td> + </tr> + <tr> + <td><code>trace7</code> </td> + + <td>Messages de traces, enregistrement d'une grande quantité de + données</td> + + <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td> + </tr> + <tr> + <td><code>trace8</code> </td> + + <td>Messages de traces, enregistrement d'une grande quantité de + données</td> + + <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td> + </tr> + </table> + + <p>Lorsqu'un niveau particulier est spécifié, les messages de tous + les autres niveaux de criticité supérieure seront aussi enregistrés. + <em>Par exemple</em>, si <code>LogLevel info</code> est spécifié, + les messages de niveaux <code>notice</code> et <code>warn</code> + seront aussi émis.</p> + + <p>Il est recommandé d'utiliser un niveau <code>crit</code> ou + inférieur.</p> + + <p>Par exemple :</p> + + <pre class="prettyprint lang-config">LogLevel notice</pre> + + + <div class="note"><h3>Note</h3> + <p>Si la journalisation s'effectue directement dans un fichier, + les messages de niveau <code>notice</code> ne peuvent pas être + supprimés et sont donc toujours journalisés. Cependant, ceci ne + s'applique pas lorsque la journalisation s'effectue vers + <code>syslog</code>.</p> + </div> + + <p>Spécifier un niveau sans nom de module va attribuer ce niveau à + tous les modules. Spécifier un niveau avec nom de module va + attribuer ce niveau à ce module seulement. Il est possible de + spécifier un module par le nom de son fichier source ou par son + identificateur, avec ou sans le suffixe <code>_module</code>. Les + trois spécifications suivantes sont donc équivalentes :</p> + + <pre class="prettyprint lang-config">LogLevel info ssl:warn +LogLevel info mod_ssl.c:warn +LogLevel info ssl_module:warn</pre> + + + <p>Il est aussi possible d'attribuer un niveau de journalisation par + répertoire :</p> + + <pre class="prettyprint lang-config">LogLevel info +<Directory "/usr/local/apache/htdocs/app"> + LogLevel debug +</Directory></pre> + + + <div class="note"> + La configuration du niveau de journalisation par répertoire + n'affecte que les messages journalisés après l'interprétation de + la requête et qui sont associés à cette dernière. Les messages + de journalisation associés à la connexion ou au serveur ne sont + pas affectés. + </div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#errorlogformat">ErrorLogFormat</a></code></li> +<li><a href="../logs.html">Journaux du serveur HTTP Apache</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a> <a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Nombre de requêtes permises pour une connexion +persistante</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>MaxKeepAliveRequests <var>nombre</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">MaxKeepAliveRequests</code> permet + de limiter le nombre de requêtes autorisées par connexion lorsque + <code class="directive"><a href="#keepalive">KeepAlive</a></code> est à "on". Si sa + valeur est <code>0</code>, le nombre de requêtes autorisées est + illimité. Il est recommandé de définir une valeur assez haute pour + des performances du serveur maximales.</p> + + <p>Par exemple :</p> + + <pre class="prettyprint lang-config">MaxKeepAliveRequests 500</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="maxrangeoverlaps" id="maxrangeoverlaps">Directive</a> <a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Nombre de chevauchements de segments de données autorisé + (par exemple <code>100-200,150-300</code>) avant le renvoi de la + ressource complète</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | <var>nombre de + chevauchements</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible depuis la version 2.3.15 du serveur HTTP + Apache</td></tr> +</table> + <p>La directive <code class="directive">MaxRangeOverlaps</code> permet + de limiter le nombre de chevauchements de segments de données HTTP + autorisé par le serveur. Si le nombre de + chevauchements de segments demandé est supérieur au nombre maximal + autorisé, la ressource sera renvoyée dans son intégralité.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>Limite le nombre de chevauchements de segments à la valeur + par défaut 20 définie à la compilation.</dd> + + <dt><strong>none</strong></dt> + <dd>Aucun chevauchement de segment n'est autorisé.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>Le nombre de chevauchements de segments est illimité.</dd> + + <dt><var>number-of-ranges</var></dt> + <dd>Un nombre positif représente le nombre maximal de + chevauchements de segments autorisé par le serveur.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="maxrangereversals" id="maxrangereversals">Directive</a> <a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Nombre d'inversions d'ordre autorisé dans la spécification des + segments de données (par exemple <code>100-200,50-70</code>) avant le renvoi de la + ressource complète</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>MaxRangeReversals default | unlimited | none | <var>nombre + d'inversions</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>MaxRangeReversals 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible depuis la version 2.3.15 du serveur HTTP + Apache</td></tr> +</table> + <p>La directive <code class="directive">MaxRangeReversals</code> permet + de limiter le nombre d'inversions d'ordre dans la spécification + des segments de données HTTP + autorisé par le serveur. Si le nombre + d'inversions demandé est supérieur au nombre maximal + autorisé, la ressource sera renvoyée dans son intégralité.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>Limite le nombre d'inversions à la valeur + par défaut 20 définie à la compilation.</dd> + + <dt><strong>none</strong></dt> + <dd>Aucune inversion n'est autorisée.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>Le nombre d'inversions est illimité.</dd> + + <dt><var>number-of-ranges</var></dt> + <dd>Un nombre positif représente le nombre maximal + d'inversions autorisé par le serveur.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="maxranges" id="maxranges">Directive</a> <a name="MaxRanges" id="MaxRanges">MaxRanges</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Nombre de segments de données autorisé avant le renvoi de +l'intégralité de la ressource</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>MaxRanges default | unlimited | none | <var>nombre de segments</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>MaxRanges 200</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible depuis la version 2.3.15 du serveur HTTP +Apache</td></tr> +</table> + <p>La directive <code class="directive">MaxRanges</code> permet de limiter + le nombre de segments de données que le serveur va renvoyer au + client. Si un nombre de segments plus important est demandé, la + ressource sera renvoyée dans son intégralité.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>Limite le nombre de segments de données à 200 (valeur par + défaut définie à la compilation).</dd> + + <dt><strong>none</strong></dt> + <dd>Les en-têtes Range sont ignorés.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>Le nombre de segments de données est illimité.</dd> + + <dt><var>nombre de segments</var></dt> + <dd>Un nombre positif représentera la nombre de segments de + données maximal que le serveur renverra au client.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="mergeslashes" id="mergeslashes">Directive</a> <a name="MergeSlashes" id="MergeSlashes">MergeSlashes</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Fusion des slashes consécutifs dans les URLs par le serveur. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>MergeSlashes ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>MergeSlashes ON</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.39 du serveur HTTP Apache</td></tr> +</table> + <p>Par défaut, le serveur fusionne les caractères slash ('/') multiples et + consécutifs dans la partie chemin de l'URL d'une requête.</p> + + <p>Lorsque cette partie chemin de l'URL est appliquée au système de + fichiers, ces slashes multiples sont inutiles. Il peut être cependant + préférable de conserver ces slashes multiples et consécutifs car ils peuvent + avoir une signification dans le cas des URLs gérées différemment, par + exemple par CGI ou par un serveur mandataire. Il convient alors de définir + <code class="directive">MergeSlashes</code> à <em>OFF</em> pour conserver les + slashes multiples consécutifs, ce qui correspond au comportement + traditionnel.</p> + <p> + Lorsque cette directive est définie à "OFF", les expressions rationnelles utilisées dans le + fichier de configuration pour effectuer une comparaison de la partie chemin + de l'URL ((<code class="directive">LocationMatch</code>, + <code class="directive">RewriteRule</code>, ...) doivent en effet tenir compte de la + présence éventuelle de slashes multiples et consécutifs. Les sections + <code class="directive">Location</code> à base d'expressions non rationnelles + correspondent toujours à des URLs avec slashes fusionnés et ne peuvent pas + tenir compte des slashes multiples.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="mergetrailers" id="mergetrailers">Directive</a> <a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Détermine si les données supplémentaires (trailers) sont +fusionnées avec les en-têtes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>MergeTrailers [on|off]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>MergeTrailers off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.11 du serveur HTTP +Apache</td></tr> +</table> + <p>Cette directive permet de contrôler la fusion des données HTTP + supplémentaires (trailers) avec la représentation interne des + en-têtes. Cette fusion intervient lorsque le corps de la requête a + été entièrement reçu, bien longtemps après que la majeure partie du + traitement des en-têtes ait une chance de pouvoir examiner ou + modifier les en-têtes de la requête.</p> + <p>Cette option a été introduite dans un souci de compatibilité avec + les versions antérieures à 2.4.11, où les données supplémentaires + étaient systématiquement fusionnées avec les en-têtes de la requête.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="mutex" id="mutex">Directive</a> <a name="Mutex" id="Mutex">Mutex</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit les mécanismes de mutex et le repertoire du fichier +verrou pour tous les mutex ou seulement les mutex spécifiés</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>Mutex <var>mécanisme</var> [default|<var>nom-mutex</var>] ... [OmitPID]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>Mutex default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible depuis la version 2.3.4 du serveur HTTP Apache</td></tr> +</table> + <p>La directive <code class="directive">Mutex</code> permet de définir le + mécanisme de mutex, et éventuellement le répertoire du fichier + verrou que les modules et httpd utilisent pour sérialiser l'accès aux + ressources. Spécifiez <code>default</code> comme second argument + pour modifier la configuration de tous les mutex ; spécifiez un nom + de mutex (voir la table ci-dessous) comme second argument pour + ne modifier que la configuration de ce mutex.</p> + + <p>La directive <code class="directive">Mutex</code> est typiquement + utilisée dans les situations exceptionnelles suivantes :</p> + + <ul> + <li>choix d'un autre mécanisme de mutex lorsque le mécanisme par + défaut sélectionné par <a class="glossarylink" href="../glossary.html#apr" title="voir glossaire">APR</a> présente un + problème de fonctionnement ou de performances.</li> + + <li>choix d'un autre répertoire utilisé par les mutex à base de + fichier lorsque le répertoire par défaut ne supporte pas le + verrouillage</li> + </ul> + + <div class="note"><h3>Modules supportés</h3> + <p>Cette directive ne configure que les mutex qui ont été + enregistrés avec le serveur de base via l'API + <code>ap_mutex_register()</code>. Tous les modules fournis avec + httpd supportent la directive <code class="directive">Mutex</code>, mais il + n'en sera pas forcément de même pour les modules tiers. + Reportez-vous à la documentation du module tiers considéré afin de + déterminer le(s) nom(s) de mutex qui pourront être définis si la + directive est supportée.</p> + </div> + + + + <p>Les <em>mécanismes</em> de mutex disponibles sont les suivants :</p> + <ul> + <li><code>default | yes</code> + <p>C'est l'implémentation du verrouillage par défaut, telle + qu'elle est définie par <a class="glossarylink" href="../glossary.html#apr" title="voir glossaire">APR</a>. On peut + afficher l'implémentation du verrouillage par défaut via la + commande <code class="program"><a href="../programs/httpd.html">httpd</a></code> avec l'option <code>-V</code>.</p></li> + + <li><code>none | no</code> + <p>Le mutex est désactivé, et cette valeur n'est permise pour un + mutex que si le module indique qu'il s'agit d'un choix valide. + Consultez la documentation du module pour plus d'informations.</p></li> + + <li><code>posixsem</code> + <p>Une variante de mutex basée sur un sémaphore Posix.</p> + + <div class="warning"><h3>Avertissement</h3> + <p>La propriété du sémaphore n'est pas restituée si un thread du + processus gérant le mutex provoque une erreur de segmentation, + ce qui provoquera un blocage du serveur web.</p> + </div> + </li> + + <li><code>sysvsem</code> + <p>Une variante de mutex basée sur un sémaphore IPC SystemV.</p> + + <div class="warning"><h3>Avertissement</h3> + <p>Il peut arriver que les sémaphores SysV soient conservés si le + processus se crashe avant que le sémaphore ne soit supprimé.</p> + </div> + + <div class="warning"><h3>Sécurité</h3> + <p>L'API des sémaphores permet les attaques par déni de service + par tout programme CGI s'exécutant sous le même uid que le + serveur web (autrement dit tous les programmes CGI, à moins que + vous n'utilisiez un programme du style <code class="program"><a href="../programs/suexec.html">suexec</a></code> + ou <code>cgiwrapper</code>).</p> + </div> + </li> + + <li><code>sem</code> + <p>Sélection de la "meilleure" implémentation des sémaphores + disponible ; le choix s'effectue entre les sémaphores posix et + IPC SystemV, dans cet ordre.</p></li> + + <li><code>pthread</code> + <p>Une variante de mutex à base de mutex de thread Posix + inter-processus.</p> + + <div class="warning"><h3>Avertissement</h3> + <p>Sur la plupart des systèmes, si un processus enfant se + termine anormalement alors qu'il détenait un mutex qui utilise + cette implémentation, le serveur va se bloquer et cesser de + répondre aux requêtes. Dans ce cas, un redémarrage manuel est + nécessaire pour récupérer le mutex.</p> + <p>Solaris et Linux constituent des exceptions notables, en ceci qu'ils fournissent + un mécanisme qui permet en général de récupérer le mutex après + l'arrêt anormal d'un processus enfant qui détenait le mutex.</p> + <p>Si votre système est compatible POSIX ou implémente la fonction + <code>pthread_mutexattr_setrobust_np()</code>, vous devriez + pouvoir utiliser l'option <code>pthread</code> sans problème.</p> + </div> + </li> + + <li><code>fcntl:/chemin/vers/mutex</code> + <p>Une variante de mutex utilisant un fichier verrou physique et + la fonction <code>fcntl()</code>.</p> + + <div class="warning"><h3>Avertissement</h3> + <p>Lorsqu'on utilise plusieurs mutex basés sur ce mécanisme dans + un environnement multi-processus, multi-thread, des erreurs de + blocage (EDEADLK) peuvent être rapportées pour des opérations de + mutex valides si la fonction <code>fcntl()</code> ne gère pas + les threads, comme sous Solaris.</p> + </div> + </li> + + <li><code>flock:/chemin/vers/mutex</code> + <p>Méthode similaire à <code>fcntl:/chemin/vers/mutex</code>, + mais c'est la fonction <code>flock()</code> qui est utilisée + pour gérer le verrouillage par fichier.</p></li> + + <li><code>file:/chemin/vers/mutex</code> + <p>Sélection de la "meilleure" implémentation de verrouillage + par fichier disponible ; le choix s'effectue entre + <code>fcntl</code> et <code>flock</code>, dans cet ordre.</p></li> + </ul> + + <p>La plupart des mécanismes ne sont disponibles que sur les + plate-formes où ces dernières et <a class="glossarylink" href="../glossary.html#apr" title="voir glossaire">APR</a> les + supportent. Les mécanismes qui ne sont pas disponibles sur toutes + les plate-formes sont <em>posixsem</em>, + <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>, + <em>flock</em>, et <em>file</em>.</p> + + <p>Avec les mécanismes à base de fichier <em>fcntl</em> et + <em>flock</em>, le chemin, s'il est fourni, est un répertoire dans + lequel le fichier verrou sera créé. Le répertoire par + défaut est le répertoire d'exécution de httpd relatif à la + directive <code class="directive"><a href="#serverroot">ServerRoot</a></code>. + Utilisez toujours un système + de fichiers local sur disque pour <code>/chemin/vers/mutex</code> et + jamais un répertoire se trouvant dans un système de fichiers NFS ou + AFS. Le nom de base du fichier se composera du type de mutex, d'une + chaîne optionnelle correspondant à l'instance et fournie par le + module ; et, sauf si le mot-clé <code>OmitPID</code> a été spécifié, + l'identificateur du processus parent httpd sera ajouté afin de + rendre le nom du fichier unique, évitant ainsi tout conflit lorsque + plusieurs instances d'httpd partagent le même répertoire de + verrouillage. Par exemple, si le nom de mutex est + <code>mpm-accept</code>, et si le répertoire de verrouillage est + <code>/var/httpd/locks</code>, le nom du fichier verrou pour + l'instance httpd dont le processus parent a pour identifiant 12345 + sera <code>/var/httpd/locks/mpm-accept.12345</code>.</p> + + <div class="warning"><h3>Sécurité</h3> + <p>Il est conseillé d'<em>éviter</em> de placer les fichiers mutex + dans un répertoire où tout le monde peut écrire comme + <code>/var/tmp</code>, car quelqu'un pourrait initier une attaque + par déni de service et empêcher le serveur de démarrer en créant un + fichier verrou possédant un nom identique à celui que le serveur va + tenter de créer.</p> + </div> + + <p>La table suivante décrit les noms de mutex utilisés par httpd et + ses modules associés.</p> + + <table class="bordered"><tr class="header"> + <th>Nom mutex</th> + <th>Module(s)</th> + <th>Ressource protégée</th> + </tr> +<tr> + <td><code>mpm-accept</code></td> + <td>modules MPM <code class="module"><a href="../mod/prefork.html">prefork</a></code> et <code class="module"><a href="../mod/worker.html">worker</a></code></td> + <td>connexions entrantes, afin d'éviter le problème de + l'afflux de requêtes ; pour plus d'informations, voir la + documentation <a href="../misc/perf-tuning.html">Amélioration des + performances</a></td> + </tr> +<tr class="odd"> + <td><code>authdigest-client</code></td> + <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td> + <td>liste de clients en mémoire partagée</td> + </tr> +<tr> + <td><code>authdigest-opaque</code></td> + <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td> + <td>compteur en mémoire partagée</td> + </tr> +<tr class="odd"> + <td><code>ldap-cache</code></td> + <td><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code></td> + <td>cache de résultat de recherche LDAP</td> + </tr> +<tr> + <td><code>rewrite-map</code></td> + <td><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></td> + <td>communication avec des programmes externes + d'associations de valeurs, afin d'éviter les interférences + d'entrées/sorties entre plusieurs requêtes</td> + </tr> +<tr class="odd"> + <td><code>ssl-cache</code></td> + <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td> + <td>cache de session SSL</td> + </tr> +<tr> + <td><code>ssl-stapling</code></td> + <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td> + <td>cache de l'étiquetage OCSP ("OCSP stapling")</td> + </tr> +<tr class="odd"> + <td><code>watchdog-callback</code></td> + <td><code class="module"><a href="../mod/mod_watchdog.html">mod_watchdog</a></code></td> + <td>fonction de rappel d'un module client particulier</td> + </tr> +</table> + + <p>Le mot-clé <code>OmitPID</code> permet d'empêcher l'addition de + l'identifiant du processus httpd parent au nom du fichier verrou.</p> + + + <p>Dans l'exemple suivant, le mécanisme de mutex pour le mutex + mpm-accept est modifié pour passer du mécanisme par défaut au + mécanisme <code>fcntl</code>, avec le fichier verrou associé créé + dans le répertoire <code>/var/httpd/locks</code>. Le mécanisme de + mutex par défaut pour tous les autres mutex deviendra + <code>sysvsem</code>.</p> + + <pre class="prettyprint lang-config">Mutex sysvsem default +Mutex fcntl:/var/httpd/locks mpm-accept</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="namevirtualhost" id="namevirtualhost">Directive</a> <a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>OBSOLETE : Définit une adresse IP pour les serveurs virtuels à base de +nom</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>NameVirtualHost <var>adresse</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + + <p>Avant la version 2.3.11, il était nécessaire de définir une + directive <code class="directive">NameVirtualHost</code> pour indiquer au + serveur qu'une paire adresse IP/port particulière pouvait être + utilisée comme serveur virtuel à base de nom. Depuis la version + 2.3.11, chaque fois qu'une paire adresse IP/port est utilisée dans + plusieurs serveurs virtuels, l'hébergement virtuel à base de nom est + automatiquement activé pour cette adresse.</p> + + <p>Cette directive n'a actuellement plus aucun effet.</p> + +<h3>Voir aussi</h3> +<ul> +<li><a href="../vhosts/">Documentation sur les serveurs +virtuels</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="options" id="options">Directive</a> <a name="Options" id="Options">Options</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit les fonctionnalités disponibles pour un répertoire +particulier</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>Options + [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>Options FollowSymlinks</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Avec la version 2.3.11, la valeur par défaut passe de All +à FollowSymlinks</td></tr> +</table> + <p>La directive <code class="directive">Options</code> permet de définir + les fonctionnalités de serveur disponibles pour un répertoire + particulier.</p> + + <p><var>option</var> peut être défini à <code>None</code>, auquel + cas aucune fonctionnalité spécifique n'est activée, ou comprendre + une ou plusieurs des options suivantes :</p> + + <dl> + <dt><code>All</code></dt> + + <dd>Toutes les options excepté <code>MultiViews</code>.</dd> + + <dt><code>ExecCGI</code></dt> + + <dd>L'exécution de scripts CGI à l'aide du module + <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> est permise.</dd> + + <dt><code>FollowSymLinks</code></dt> + + <dd> + + Le serveur va suivre les liens symboliques dans le répertoire + concerné. Il s'agit de la valeur par défaut. + <div class="note"> + <p>Bien que le serveur suive les liens symboliques, il ne modifie + <em>pas</em> le nom de chemin concerné défini par la section + <code class="directive"><a href="#directory"><Directory></a></code>.</p> + + <p>Les options <code>FollowSymLinks</code> et + <code>SymLinksIfOwnerMatch</code> ne fonctionnent que dans les + sections <code class="directive"><a href="#directory"><Directory></a></code> ou les fichiers + <code>.htaccess</code>.</p> + + <p>Le fait d'omettre cette option ne doit pas être considéré comme + une mesure de sécurité efficace, car il existe toujours une + situation de compétition (race condition) entre l'instant où l'on + vérifie qu'un chemin n'est pas un lien symbolique, et l'instant où + l'on utilise effectivement ce chemin.</p> + </div></dd> + + <dt><code>Includes</code></dt> + + <dd> + Les inclusions côté serveur (SSI) à l'aide du module + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> sont autorisées.</dd> + + <dt><code>IncludesNOEXEC</code></dt> + + <dd> + + Les inclusions côté serveur (SSI) sont permises, mais <code>#exec + cmd</code> et <code>#exec cgi</code> sont désactivés. + L'utilisation de <code>#include virtual</code> pour les scripts + CGI est cependant toujours possible depuis des répertoires + définis par <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>.</dd> + + <dt><code>Indexes</code></dt> + + <dd> + Si une URL requise correspond au répertoire concerné, et si aucun + <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> (<em>par + exemple</em> <code>index.html</code>) n'est défini pour ce + répertoire, le module <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> va renvoyer + un listing formaté du répertoire.</dd> + + <dt><code>MultiViews</code></dt> + + <dd> + Les vues multiples ("multiviews") à <a href="../content-negotiation.html">contenu négocié</a> à l'aide du + module <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> sont autorisées. + <div class="note"><h3>Note</h3> <p>Cette option est ignorée si elle est + définie en tout autre endroit qu'une section <code class="directive"><a href="#directory"><Directory></a></code>, car + <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> a besoin de ressources réelles + pour effectuer ses comparaisons et ses évaluations.</p></div> + + </dd> + + <dt><code>SymLinksIfOwnerMatch</code></dt> + + <dd>Le serveur ne suivra que les liens symboliques qui renvoient + vers un fichier ou un répertoire dont le propriétaire est le même + que celui du lien. + + <div class="note"><h3>Note</h3> + <p>Les options <code>FollowSymLinks</code> et + <code>SymLinksIfOwnerMatch</code> ne fonctionnent que dans les + sections <code class="directive"><a href="#directory"><Directory></a></code> ou les fichiers + <code>.htaccess</code>.</p> + + <p>Le fait d'omettre cette option ne doit pas être considéré comme + une mesure de sécurité efficace, car il existe toujours une + situation de compétition (race condition) entre l'instant où l'on + vérifie qu'un chemin n'est pas un lien symbolique, et l'instant où + l'on utilise effectivement ce chemin.</p> + </div> </dd> + </dl> + + <p>Normalement, si plusieurs directives + <code class="directive">Options</code> peuvent s'appliquer à un répertoire, + c'est la plus spécifique qui est utilisée et les autres sont + ignorées ; les options ne sont pas fusionnées (voir <a href="../sections.html#merging">comment les sections sont + fusionnées</a>). Elles le sont cependant si <em>toutes</em> les + options de la directive <code class="directive">Options</code> sont + précédées d'un symbole <code>+</code> ou <code>-</code>. Toute + option précédée d'un <code>+</code> est ajoutée à la liste des + options courantes de manière forcée et toute option précédée d'un + <code>-</code> est supprimée de la liste des options courantes de la + même manière.</p> + + <div class="note"><h3>Note</h3> + <p>Mélanger des <code class="directive">Options</code> avec <code>+</code> + ou <code>-</code> avec des <code class="directive">Options</code> sans + <code>+</code> ou <code>-</code> constitue une erreur de syntaxe, et + la vérification de la syntaxe au cours du démarrage du serveur fera + échouer ce dernier.</p> + </div> + + <p>Par exemple, sans aucun symbole <code>+</code> et <code>-</code> + :</p> + + <pre class="prettyprint lang-config"><Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options Includes +</Directory></pre> + + + <p>ici, seule l'option <code>Includes</code> sera prise en compte + pour le répertoire <code>/web/docs/spec</code>. Par contre, si la + seconde directive <code class="directive">Options</code> utilise les + symboles <code>+</code> et <code>-</code> :</p> + + <pre class="prettyprint lang-config"><Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options +Includes -Indexes +</Directory></pre> + + + <p>alors, les options <code>FollowSymLinks</code> et + <code>Includes</code> seront prises en compte pour le répertoire + <code>/web/docs/spec</code>.</p> + + <div class="note"><h3>Note</h3> + <p>L'utilisation de <code>-IncludesNOEXEC</code> ou + <code>-Includes</code> désactive complètement les inclusions côté + serveur sans tenir compte des définitions précédentes.</p> + </div> + + <p>En l'absence de toute définition d'options, la valeur par défaut + est <code>FollowSymlinks</code>.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="protocol" id="protocol">Directive</a> <a name="Protocol" id="Protocol">Protocol</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocole pour une socket d'écoute</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>Protocol <var>protocole</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible depuis la version 2.1.5 d'Apache, mais +seulement depuis la version 2.3.3 sous Windows.</td></tr> +</table> + <p>Cette directive permet de spécifier le protocole utilisé pour une + socket d'écoute particulière. Le protocole sert à déterminer quel + module doit traiter une requête, et d'appliquer les optimisations + spécifiques au protocole via la directive + <code class="directive">AcceptFilter</code>.</p> + + <p>Dans la plupart des configurations, cette directive n'est pas nécessaire. + Si elle n'est pas définie, le protocole par défaut pour le port 443 est + <code>https</code> et <code>http</code> pour tous les autres ports. La + connaissance du protocole permet de déterminer quel module doit traiter la + requête, et d'appliquer les optimisations spécifiques au protocole via la + directive <code class="directive"><a href="#acceptfilter">AcceptFilter</a></code>.</p> + + <p>Par exemple, si vous travaillez avec le protocole + <code>https</code> sur un port non standard, spécifiez le protocole + de manière explicite :</p> + + <pre class="prettyprint lang-config">Protocol https</pre> + + + <p>Vous pouvez aussi spécifier le protocole via la directive + <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="protocols" id="protocols">Directive</a> <a name="Protocols" id="Protocols">Protocols</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocoles disponibles pour un serveur virtuel ou non</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>Protocols <var>protocole</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>Protocols http/1.1</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.17 du serveur + HTTP Apache.</td></tr> +</table> + <p>Cette directive permet de spécifier la liste des protocoles + supportés par un serveur virtuel ou non. Cette liste énumère les + protocoles qu'un client sera autorisé à négocier avec ce + serveur.</p> + + <p>Par défaut, + seul le protocole http/1.1 est disponible (compatible avec les + clients http/1.0 et http/0.9). Par conséquent, vous devez + fournir cette liste si vous voulez étendre les protocoles + disponibles pour le serveur.</p> + + <p>Par exemple, si vous voulez autoriser le protocole + HTTP/2 pour un serveur avec TLS, utilisez + cette directive comme suit :</p> + + <pre class="prettyprint lang-config">Protocols h2 http/1.1</pre> + + + <p>Les protocoles valides sont <code>http/1.1</code> pour les + connexions http et https, <code>h2</code> pour les connections + https et <code>h2c</code> pour les connexions http. D'autres + modules peuvent fournir d'autres protocoles.</p> + + <p>Spécifier des protocoles non disponibles ou désactivés n'aura + aucun effet, et ceux-ci seront simplement ignorés.</p> + + <p>Si un serveur virtuel ne possède pas de directive Protocols + propre, il hérite des protocoles spécifiés pour le serveur + principal. Autrement dit, les directives Protocols définies au + niveau d'un serveur virtuel remplacent celles définies au niveau + du serveur principal. + </p> + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#protocolshonororder">ProtocolsHonorOrder</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="protocolshonororder" id="protocolshonororder">Directive</a> <a name="ProtocolsHonorOrder" id="ProtocolsHonorOrder">ProtocolsHonorOrder</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Détermine qui du client ou du serveur détermine l'ordre + des protocoles au cours de la négociation de la connexion</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ProtocolsHonorOrder On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ProtocolsHonorOrder On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.17 du serveur + HTTP Apache.</td></tr> +</table> + <p>Cette directive permet de définir si le serveur doit tenir + compte de l'ordre des protocoles définis par la directive + <code class="directive">Protocols</code>.</p> + + <p>Si cette directive est définie à Off, l'ordre de la liste des + protocoles fournie par le client l'emporte sur l'ordre défini + dans la configuration du serveur.</p> + + <p>Si la directive <code class="directive">ProtocolsHonorOrder</code> + est définie à <code>on</code> (valeur par défaut), + il n'est pas tenu compte de l'ordre de la liste des protocoles + fournie par le client, et seul l'ordre de la liste des protocles + définie au niveau du serveur influera la + négociation du protocole.</p> + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#protocols">Protocols</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="qualifyredirecturl" id="qualifyredirecturl">Directive</a> <a name="QualifyRedirectURL" id="QualifyRedirectURL">QualifyRedirectURL</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Vérifie si la variable d'environnement REDIRECT_URL est +pleinement qualifiée</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>QualifyRedirectURL On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>QualifyRedirectURL Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Directive supportée à partir de la version 2.4.18 du +serveur HTTP Apache. Jusqu'à la version 2.4.17, le serveur se comportait +comme si la directive QualifyRedirectURL était définie à On.</td></tr> +</table> + <p>Cette directive permet de s'assurer que le serveur vérifiera que + la variable d'environnement REDIRECT_URL est bien pleinement + qualifiée. Par défaut, cette variable contient l'URL textuellement + demandée par le client, par exemple "/index.html". Avec + <code class="directive">QualifyRedirectURL ON</code>, la même requête + affectera à la variable REDIRECT_URL une valeur du style + "http://www.example.com/index.html".</p> + <p>Même si cette directive n'est pas définie, lorsqu'une requête est + soumise avec une URL pleinement qualifiée, la variable REDIRECT_URL + contiendra quand-même une URL pleinement qualifiée. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="readbuffersize" id="readbuffersize">Directive</a> <a name="ReadBufferSize" id="ReadBufferSize">ReadBufferSize</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Taille des tampons utilisés pour lire les données</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ReadBufferSize <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ReadBufferSize 8192</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.5 du serveur HTTP +Apache.</td></tr> +</table> + <p>Cette directive permet de définir la taille (en octets) du tampon mémoire + utilisé pour lire des données depuis le réseau ou un fichier.</p> + + <p>Un tampon de grande taille peut améliorer les performances pour les + grandes quantités de données, mais consomme d'avantage de mémoire par + connexion. La taille minimale du tampon est de <var>1024</var> octets.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="regexdefaultoptions" id="regexdefaultoptions">Directive</a> <a name="RegexDefaultOptions" id="RegexDefaultOptions">RegexDefaultOptions</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configuration des options globales par défaut pour les + expressions rationnelles</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>RegexDefaultOptions [none] [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>RegexDefaultOptions DOTALL DOLLAR_ENDONLY</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.30 du serveur HTTP + Apache.</td></tr> +</table> + <p>Cette directive permet d'ajouter certains comportements par défaut à + TOUTES les expressions rationnelles utilisées ultérieurement.</p> + + <p>Toute option précédée d'un '+' est ajoutée aux options déjà définies.<br /> + Toute option précédée d'un '-' est enlevée des options déjà définies.<br /> + Toute option non suffixée par '+' ou '-' sera définie et remplacera + l'option correspondante éventuellement déjà définie.<br /> + Le mot-clé <code>none</code> annule toutes les options déjà définies.</p> + + <p><var>option</var> peut être :</p> + <dl> + <dt><code>ICASE</code></dt> + <dd>Utilise une recherche de correspondance insensible à la casse.</dd> + + <dt><code>EXTENDED</code></dt> + <dd>Le drapeau Perl /x ; ignore les espaces non échappés et les + commentaires dans le modèle.</dd> + + <dt><code>DOTALL</code></dt> + <dd>Le drapeau Perl /s ; '.' correspond aux caractères nouvelle + ligne.</dd> + + <dt><code>DOLLAR_ENDONLY</code></dt> + <dd>'$' n'est actif qu'à la fin de la chaîne de référence.</dd> + + </dl> + <pre class="prettyprint lang-config"># Ajoute l'option ICASE par défaut pour toutes les expressions rationnelles +RegexDefaultOptions +ICASE +... +# Supprime l'option DOLLAR_ENDONLY par défaut et conserve toutes les autres +# options +RegexDefaultOptions -DOLLAR_ENDONLY +... +# Définit l'option DOTALL seule et annule toutes les autres options +RegexDefaultOptions DOTALL +... +# Annule toutes les options définies +RegexDefaultOptions none +...</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="registerhttpmethod" id="registerhttpmethod">Directive</a> <a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enregistrement de méthodes HTTP non standards</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>RegisterHttpMethod <var>méthode</var> [<var>méthode</var> [...]]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.24 du serveur HTTP Apache</td></tr> +</table> +<p>Cette directive permet d'enregistrer des méthodes HTTP supplémentaires. Ceci +s'avérera nécessaire si l'on doit utiliser des méthodes non standards avec des +directives qui acceptent des noms de méthodes en paramètres, ou pour permettre +l'utilisation de méthodes particulières non standards en passant par un serveur +mandataire ou au sein de scripts CGI, et ceci alors que le serveur a été +configuré pour ne transmettre que des méthodes reconnues aux modules.</p> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#httpprotocoloptions">HTTPProtocolOptions</a></code></li> +<li><code class="directive"><a href="../mod/mod_allowmethods.html#allowmethods">AllowMethods</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="rlimitcpu" id="rlimitcpu">Directive</a> <a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limite le temps CPU alloué aux processus initiés par les +processus enfants d'Apache httpd</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>RLimitCPU <var>secondes</var>|max [<var>secondes</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>Non défini ; utilise les valeurs par défaut du système +d'exploitation</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Prend 1 ou 2 paramètres. Le premier definit la limite de + consommation de ressources pour tous les processus, et le second la + consommation de ressources maximale. Les deux paramètres peuvent + contenir soit un nombre, soit <code>max</code> pour indiquer au + serveur que la limite de consommation correspond à la valeur + maximale autorisée par la configuration du système d'exploitation. + Pour augmenter la consommation maximale de ressources, le serveur + doit s'exécuter en tant que <code>root</code>, ou se trouver dans sa + phase de démarrage.</p> + + <p>Cette directive s'applique aux processus initiés par les + processus enfants d'Apache httpd qui traitent les requêtes, et non aux + processus enfants eux-mêmes. Sont concernés les scripts CGI et les + commandes exec des SSI, mais en aucun cas les processus initiés par + le processus parent d'Apache httpd comme les journalisations redirigées + vers un programme.</p> + + <p>Les limites de ressources CPU sont exprimées en secondes par + processus.</p> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="rlimitmem" id="rlimitmem">Directive</a> <a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limite la mémoire allouée aux processus initiés par les +processus enfants d'Apache httpd</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>RLimitMEM <var>octets</var>|max [<var>octets</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>Non défini ; utilise les valeurs par défaut du système +d'exploitation</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Prend 1 ou 2 paramètres. Le premier definit la limite de + consommation de ressources pour tous les processus, et le second la + consommation de ressources maximale. Les deux paramètres peuvent + contenir soit un nombre, soit <code>max</code> pour indiquer au + serveur que la limite de consommation correspond à la valeur + maximale autorisée par la configuration du système d'exploitation. + Pour augmenter la consommation maximale de ressources, le serveur + doit s'exécuter en tant que <code>root</code>, ou se trouver dans sa + phase de démarrage.</p> + + <p>Cette directive s'applique aux processus initiés par les + processus enfants d'Apache httpd qui traitent les requêtes, et non aux + processus enfants eux-mêmes. Sont concernés les scripts CGI et les + commandes exec des SSI, mais en aucun cas les processus initiés par + le processus parent d'Apache httpd comme les journalisations redirigées + vers un programme.</p> + + <p>Les limites de ressources mémoire sont exprimées en octets par + processus.</p> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="rlimitnproc" id="rlimitnproc">Directive</a> <a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limite le nombre de processus qui peuvent être initiés par +les processus initiés par les processus enfants d'Apache httpd</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>RLimitNPROC <var>nombre</var>|max [<var>nombre</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>Unset; uses operating system defaults</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Prend 1 ou 2 paramètres. Le premier definit la limite de + consommation de ressources pour tous les processus, et le second la + consommation de ressources maximale. Les deux paramètres peuvent + contenir soit un nombre, soit <code>max</code> pour indiquer au + serveur que la limite de consommation correspond à la valeur + maximale autorisée par la configuration du système d'exploitation. + Pour augmenter la consommation maximale de ressources, le serveur + doit s'exécuter en tant que <code>root</code>, ou se trouver dans sa + phase de démarrage.</p> + + <p>Cette directive s'applique aux processus initiés par les + processus enfants d'Apache httpd qui traitent les requêtes, et non aux + processus enfants eux-mêmes. Sont concernés les scripts CGI et les + commandes exec des SSI, mais en aucun cas les processus initiés par + le processus parent d'Apache httpd comme les journalisations redirigées + vers un programme.</p> + + <p>Les limites des processus contrôlent le nombre de processus par + utilisateur.</p> + + <div class="note"><h3>Note</h3> + <p>Si les processus CGI s'exécutent sous le même + utilisateur que celui du serveur web, cette + directive va limiter le nombre de processus que le serveur + pourra lui-même créer. La présence de messages + <strong><code>cannot fork</code></strong> dans le journal des + erreurs indiquera que la limite est atteinte.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="scriptinterpretersource" id="scriptinterpretersource">Directive</a> <a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Permet de localiser l'interpréteur des scripts +CGI</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Win32 seulement.</td></tr> +</table> + <p>Cette directive permet de contrôler la méthode qu'utilise Apache + httpd pour trouver l'interpréteur destiné à exécuter les scripts CGI. La + définition par défaut est <code>Script</code> : ceci indique à + Apache httpd qu'il doit utiliser l'interpréteur précisé dans la ligne + shebang du script (la première ligne, commençant par + <code>#!</code>). Sur les systèmes Win32, cette ligne ressemble + souvent à ceci :</p> + + <pre class="prettyprint lang-perl">#!C:/Perl/bin/perl.exe</pre> + + + <p>ou simplement, dans le cas où <code>perl</code> est dans le + <code>PATH</code> :</p> + + <pre class="prettyprint lang-perl">#!perl</pre> + + + <p>Avec <code>ScriptInterpreterSource Registry</code>, Windows va + effectuer une recherche dans l'arborescence + <code>HKEY_CLASSES_ROOT</code> de la base de registre avec comme + mot-clé l'extension du fichier contenant le script (par exemple + <code>.pl</code>). C'est la commande définie par la sous-clé de + registre <code>Shell\ExecCGI\Command</code> ou, si elle n'existe + pas, la sous-clé <code>Shell\Open\Command</code> qui est utilisée + pour ouvrir le fichier du script. Si ces clés de registre ne sont + pas trouvées, Apache httpd utilise la méthode de l'option + <code>Script</code>.</p> + + <div class="warning"><h3>Sécurité</h3> + <p>Soyez prudent si vous utilisez <code>ScriptInterpreterSource + Registry</code> avec des répertoires faisant l'objet d'un <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>, car Apache httpd va essayer + d'exécuter <strong>tous</strong> les fichiers contenus dans + celui-ci. L'option <code>Registry</code> peut causer des appels de + programmes non voulus sur des fichiers non destinés à être exécutés. + Par exemple, la commande par défaut open sur les fichiers + <code>.htm</code> sur la plupart des systèmes Windows va lancer + Microsoft Internet Explorer ; ainsi, toute requête HTTP pour un + fichier <code>.htm</code> situé dans le répertoire des scripts + va lancer le navigateur en arrière-plan sur le serveur, ce qui a + toutes les chances de crasher votre système dans les minutes qui + suivent.</p> + </div> + + <p>L'option <code>Registry-Strict</code> + agit de manière identique à <code>Registry</code>, mais n'utilise + que la sous-clé <code>Shell\ExecCGI\Command</code>. La présence de + la clé <code>ExecCGI</code> n'étant pas systématique, Elle doit être + définie manuellement dans le registre Windows et évite ainsi tout + appel de programme accidentel sur votre système.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="seerequesttail" id="seerequesttail">Directive</a> <a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Détermine si mod_status affiche les 63 premiers caractères +d'une requête ou les 63 derniers, en supposant que la requête +elle-même possède plus de 63 caractères.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SeeRequestTail On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SeeRequestTail Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible depuis la version 2.2.7 +d'Apache httpd.</td></tr> +</table> + <p>Avec <code>ExtendedStatus On</code>, <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> affiche la + véritable requête en cours de traitement. Pour des raisons + historiques, seuls 63 caractères de la requête sont réellement + stockés à des fins d'affichage. Cette directive permet de déterminer + si ce sont les 63 premiers caractères qui seront stockés (c'est le + comportement par défaut), + ou si ce sont les 63 derniers. Ceci ne s'applique bien entendu que + si la taille de la requête est de 64 caractères ou plus.</p> + + <p>Si Apache httpd traite la requête <code>GET /disque1/stockage/apache/htdocs/images/rep-images1/nourriture/pommes.jpg HTTP/1.1</code> + , l'affichage de la requête par <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> se présentera comme suit : + </p> + + <table class="bordered"> + <tr> + <th>Off (défaut)</th> + <td>GET /disque1/stockage/apache/htdocs/images/rep-images1/nourritu</td> + </tr> + <tr> + <th>On</th> + <td>apache/htdocs/images/rep-images1/nourriture/pommes.jpg HTTP/1.1</td> + </tr> + </table> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serveradmin" id="serveradmin">Directive</a> <a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>L'adresse électronique que le serveur inclut dans les +messages d'erreur envoyés au client</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ServerAdmin <var>adresse électronique</var>|<var>URL</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">ServerAdmin</code> permet de définir + l'adresse de contact que le serveur va inclure dans tout message + d'erreur qu'il envoie au client. Si le programme <code>httpd</code> + ne reconnait pas l'argument fourni comme une URL, il suppose que + c'est une <var>adresse électronique</var>, et lui ajoute le préfixe + <code>mailto:</code> dans les cibles des hyperliens. Il est + cependant recommandé d'utiliser exclusivement une adresse + électronique, car de nombreux scripts CGI considèrent ceci comme + implicite. Si vous utilisez une URL, elle doit pointer vers un autre + serveur que vous contrôlez. Dans le cas contraire, les utilisateurs + seraient dans l'impossibilité de vous contacter en cas de problème.</p> + + <p>Il peut s'avérer utile de définir une adresse dédiée à + l'administration du serveur, par exemple :</p> + + <pre class="prettyprint lang-config">ServerAdmin www-admin@foo.example.com</pre> + + <p>car les utilisateurs ne mentionnent pas systématiquement le + serveur dont ils parlent !</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serveralias" id="serveralias">Directive</a> <a name="ServerAlias" id="ServerAlias">ServerAlias</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Autres noms d'un serveur utilisables pour atteindre des +serveurs virtuels à base de nom</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ServerAlias <var>nom serveur</var> [<var>nom serveur</var>] +...</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">ServerAlias</code> permet de définir + les noms alternatifs d'un serveur utilisables pour atteindre des <a href="../vhosts/name-based.html">serveurs virtuels à base de + nom</a>. La directive <code class="directive">ServerAlias</code> peut + contenir des caractères génériques, si nécessaire.</p> + + <pre class="prettyprint lang-config"><VirtualHost *:80> + ServerName server.example.com + ServerAlias server server2.example.com server2 + ServerAlias *.example.com + UseCanonicalName Off + # ... +</VirtualHost></pre> + + <p>La recherche du serveur virtuel à base de nom correspondant au + plus près à la requête s'effectue selon l'ordre d'apparition des + directives <code class="directive"><a href="#virtualhost"><virtualhost></a></code> dans le fichier de + configuration. Le premier serveur virtuel dont le <code class="directive"><a href="#servername">ServerName</a></code> ou le <code class="directive"><a href="#serveralias">ServerAlias</a></code> correspond est choisi, sans + priorité particulière si le nom contient des caractères génériques + (que ce soit pour ServerName ou ServerAlias).</p> + + <p>Tous les noms spécifiés au sein d'une section <code class="directive"><a href="#virtualhost"><VirtualHost></a></code> sont traités comme un + <code class="directive">ServerAlias</code> (sans caractères génériques).</p> + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><a href="../vhosts/">Documentation sur les serveurs virtuels +du serveur HTTP Apache</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="servername" id="servername">Directive</a> <a name="ServerName" id="ServerName">ServerName</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Nom d'hôte et port que le serveur utilise pour +s'authentifier lui-même</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ServerName +[<var>protocole</var>://]<var>nom-de-domaine</var>|<var>adresse-ip</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">ServerName</code> permet de définir + les protocole, nom d'hôte et port d'une requête que le serveur + utilise pour s'authentifier lui-même.</p> + + <p>La directive <code class="directive">ServerName</code> permet (éventuellement en + conjonction avec la directive <code class="directive"><a href="#serveralias">ServerAlias</a></code>) d'identifier de manière unique un + serveur virtuel, lorsqu'elle est utilisée dans un contexte de <a href="../vhosts/name-based.html">serveurs virtuels à base de noms</a>.</p> + + <p>Cette directive est aussi utilisée lors de la création d'URLs de + redirection relatives quand la directive <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> est définie à une valeur autre + que la valeur par défaut.</p> + + <p>Par exemple, si le nom de la + machine hébergeant le serveur web est + <code>simple.example.com</code>, la machine possède l'alias + DNS <code>www.example.com</code>, et si vous voulez que le serveur + web s'identifie avec cet alias, vous devez utilisez la définition + suivante :</p> + + <pre class="prettyprint lang-config">ServerName www.example.com</pre> + + + <p>La directive <code class="directive">ServerName</code> peut apparaître à + toutes les étapes de la définition du serveur. Toute occurrence + annule cependant la précédente (pour ce serveur).</p> + + <p>Si la directive <code class="directive">ServerName</code> n'est pas + définie, le serveur tente de déterminer le nom + d'hôte visible du point de vue du client en demandant tout d'abord au + système d'exploitation le nom d'hôte système, et en cas d'échec, en effectuant + une recherche DNS inverse sur une adresse IP présente sur le système.</p> + + <p>Si la directive + <code class="directive">ServerName</code> ne précise pas de port, le serveur + utilisera celui de la requête entrante. Il est recommandé de + spécifier un nom d'hôte et un port spécifiques à l'aide de la + directive <code class="directive">ServerName</code> pour une fiabilité + optimale et à titre préventif.</p> + + <p>Si vous définissez des <a href="../vhosts/name-based.html">serveurs virtuels à base de + nom</a>, une directive <code class="directive">ServerName</code> située à + l'intérieur d'une section <code class="directive"><a href="#virtualhost"><VirtualHost></a></code> spécifiera quel nom d'hôte + doit apparaître dans l'en-tête de requête <code>Host:</code> pour + pouvoir atteindre ce serveur virtuel.</p> + + + <p>Parfois, le serveur s'exécute en amont d'un dispositif qui + implémente SSL, comme un mandataire inverse, un répartiteur de + charge ou un boîtier dédié SSL. Dans ce cas, spécifiez le protocole + <code>https://</code> et le port auquel les clients se connectent + dans la directive <code class="directive">ServerName</code>, afin de + s'assurer que le serveur génère correctement ses URLs + d'auto-identification. + </p> + + <p>Voir la description des directives <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> et <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> pour les + définitions qui permettent de déterminer si les URLs + auto-identifiantes (par exemple via le module + <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>) vont faire référence au port spécifié, ou + au port indiqué dans la requête du client. + </p> + + <div class="warning"> + <p>Si la valeur de la directive <code class="directive">ServerName</code> ne + peut pas être résolue en adresse IP, le démarrage du serveur + provoquera un avertissement. <code>httpd</code> va alors utiliser le + résultat de la commande système <code>hostname</code> pour + déterminer le nom du serveur, ce qui ne correspondra pratiquement + jamais au nom de serveur que vous souhaitez réellement.</p> + <div class="example"><p><code> + httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName + </code></p></div> + </div> + + +<h3>Voir aussi</h3> +<ul> +<li><a href="../dns-caveats.html">Problèmes concernant le DNS et +le serveur HTTP Apache</a></li> +<li><a href="../vhosts/">Documentation sur les serveurs virtuels +du serveur HTTP Apache</a></li> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serverpath" id="serverpath">Directive</a> <a name="ServerPath" id="ServerPath">ServerPath</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Nom de chemin d'URL hérité pour un serveur virtuel à base +de nom accédé par un navigateur incompatible</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ServerPath <var>chemin d'URL</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">ServerPath</code> permet de définir + le nom de chemin d'URL hérité d'un hôte, à utiliser avec les <a href="../vhosts/">serveurs virtuels à base de nom</a>.</p> + +<h3>Voir aussi</h3> +<ul> +<li><a href="../vhosts/">Documentation sur les serveurs virtuels +du serveur HTTP Apache</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serverroot" id="serverroot">Directive</a> <a name="ServerRoot" id="ServerRoot">ServerRoot</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Racine du répertoire d'installation du +serveur</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ServerRoot <var>chemin de répertoire</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">ServerRoot</code> permet de définir + le répertoire dans lequel le serveur est installé. En particulier, + il contiendra les sous-répertoires <code>conf/</code> et + <code>logs/</code>. Les chemins relatifs indiqués dans les autres + directives (comme <code class="directive"><a href="#include">Include</a></code> ou <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>) seront définis par + rapport à ce répertoire.</p> + + <pre class="prettyprint lang-config">ServerRoot "/home/httpd"</pre> + + + <p>La valeur par défaut de <code class="directive">ServerRoot</code> peut + être modifiée via l'argument <code>--prefix</code> de la commande <a href="../programs/configure.html"><code>configure</code></a>, et de + nombreuses distributions tierces du serveur proposent une valeur + différente de celles listées ci-dessus.</p> + + +<h3>Voir aussi</h3> +<ul> +<li><a href="../invoking.html">the <code>-d</code> + options de <code>httpd</code></a></li> +<li><a href="../misc/security_tips.html#serverroot">les conseils à +propos de sécurité</a> pour des informations sur la manière de définir +correctement les permissions sur le répertoire indiqué par la directive +<code class="directive">ServerRoot</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="serversignature" id="serversignature">Directive</a> <a name="ServerSignature" id="ServerSignature">ServerSignature</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit un pied de page pour les documents générés par le +serveur</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ServerSignature Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">ServerSignature</code> permet de + définir une ligne de pied de page fixe pour les documents générés + par le serveur (messages d'erreur, listings de répertoires ftp de + <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, sorties de <code class="module"><a href="../mod/mod_info.html">mod_info</a></code>, + etc...). Dans le cas d'une chaîne de mandataires, l'utilisateur n'a + souvent aucun moyen de déterminer lequel des mandataires chaînés a + généré un message d'erreur, et c'est une des raisons pour lesquelles + on peut être amené à ajouter un tel pied de page.</p> + + <p>La valeur par défaut <code>Off</code> supprime la ligne de pied + de page. la valeur <code>On</code> + ajoute simplement une ligne contenant le numéro de version du + serveur ainsi que le nom du serveur virtuel issu de la directive + <code class="directive"><a href="#servername">ServerName</a></code>, alors que la valeur + <code>EMail</code> ajoute en plus une référence "mailto:" à + l'administrateur du document référencé issu la directive + <code class="directive"><a href="#serveradmin">ServerAdmin</a></code>.</p> + + <p>Les détails à propos du numéro de + version du serveur sont contrôlés à l'aide de la directive + <code class="directive"><a href="#servertokens">ServerTokens</a></code>.</p> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="servertokens" id="servertokens">Directive</a> <a name="ServerTokens" id="ServerTokens">ServerTokens</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure l'en-tête <code>Server</code> de la réponse +HTTP</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>ServerTokens Full</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive permet de contrôler le contenu de l'en-tête + <code>Server</code> inclus dans la réponse envoyée au client : cet + en-tête peut contenir le type de système d'exploitation du serveur, + ainsi que des informations à propos des modules compilés avec le + serveur.</p> + + <dl> + <dt><code>ServerTokens Full</code> (ou non spécifié)</dt> + + <dd>Le serveur envoie par exemple : <code>Server: Apache/2.4.2 + (Unix) PHP/4.2.2 MyMod/1.2</code></dd> + + <dt><code>ServerTokens Prod[uctOnly]</code></dt> + + <dd>Le serveur renvoie (<em>par exemple</em>): <code>Server: + Apache</code></dd> + + <dt><code>ServerTokens Major</code></dt> + + <dd>Le serveur renvoie (<em>par exemple</em>): <code>Server: + Apache/2</code></dd> + + <dt><code>ServerTokens Minor</code></dt> + + <dd>Le serveur renvoie (<em>par exemple</em>): <code>Server: + Apache/2.4</code></dd> + + <dt><code>ServerTokens Min[imal]</code></dt> + + <dd>Le serveur renvoie (<em>par exemple</em>): <code>Server: + Apache/2.4.2</code></dd> + + <dt><code>ServerTokens OS</code></dt> + + <dd>Le serveur renvoie (<em>par exemple</em>): <code>Server: + Apache/2.4.2 (Unix)</code></dd> + + + + </dl> + + <p>Cette définition s'applique à l'ensemble du serveur et ne peut + être activée ou désactivée pour tel ou tel serveur virtuel.</p> + + <p>Cette directive contrôle + aussi les informations fournies par la directive <code class="directive"><a href="#serversignature">ServerSignature</a></code>.</p> + + <div class="note">Définir <code class="directive">ServerTokens</code> à une + valeur inférieure à <code>minimal</code> n'est pas + recommandé car le débogage des problèmes + interopérationnels n'en sera alors que plus difficile. Notez + aussi que la désactivation de l'en-tête Server: + n'améliore en rien la sécurité de votre + serveur ; le concept de "sécurité par + l'obscurité" est un mythe et conduit à + une mauvaise perception de ce qu'est la sécurité.</div> + + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="sethandler" id="sethandler">Directive</a> <a name="SetHandler" id="SetHandler">SetHandler</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Force le traitement des fichiers spécifiés par un +gestionnaire particulier</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SetHandler <var>handler-name</var>|none|<var>expression</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>L'argument expression est disponible à partir de la version +2.4.19 su serveur HTTP Apache</td></tr> +</table> + <p>Lorsqu'elle se situe à l'intérieur d'un fichier + <code>.htaccess</code>, ou d'une section <code class="directive"><a href="#directory"><Directory></a></code> ou <code class="directive"><a href="#location"><Location></a></code>, cette directive force le + traitement de tous les fichiers spécifiés par le <a href="../handler.html">gestionnaire</a> défini par l'argument + <var>nom gestionnaire</var>. Par exemple, dans le cas d'un + répertoire dont vous voulez interpréter le contenu comme des + fichiers de règles d'images cliquables, sans tenir compte des + extensions, vous pouvez ajouter la ligne suivante dans un fichier + <code>.htaccess</code> de ce répertoire :</p> + + <pre class="prettyprint lang-config">SetHandler imap-file</pre> + + + <p>Autre exemple : si vous voulez que le serveur affiche un + compte-rendu d'état chaque fois qu'une URL du type <code>http://nom + serveur/status</code> est appelée, vous pouvez ajouter ceci dans + <code>httpd.conf</code> :</p> + + <pre class="prettyprint lang-config"><Location "/status"> + SetHandler server-status +</Location></pre> + + + <p>Vous pouvez aussi utiliser cette directive pour associer un + gestionnaire à des fichiers possèdant une extension de nom de + fichier particulière. Par exemple :</p> + + <pre class="prettyprint lang-config"><FilesMatch "\.php$"> + SetHandler application/x-httpd-php +</FilesMatch></pre> + + + <p>Pour référencer des variables spécifiques à une requête, y compris les + références arrières vers des expressions rationnelles nommées, vous pouvez + utiliser des expressions ayant pour valeur une chaîne : </p> + + <pre class="prettyprint lang-config"><LocationMatch ^/app/(?<sub>[^/]+)/> + SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080" +</LocationMatch></pre> + + + <p>Vous pouvez écraser la définition antérieure d'une directive + <code class="directive">SetHandler</code> en utilisant la valeur + <code>None</code>.</p> + + <div class="note"><h3>Note</h3> + <p>Comme <code class="directive">SetHandler</code> l'emporte sur la + définition des gestionnaires par défaut, le comportement habituel + consistant à traiter les URLs se terminant par un slash (/) comme + des répertoires ou des fichiers index est désactivé.</p></div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="setinputfilter" id="setinputfilter">Directive</a> <a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit les filtres par lesquels vont passer les requêtes +client et les données POST</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SetInputFilter <var>filtre</var>[;<var>filtre</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">SetInputFilter</code> permet de + définir le ou les filtres par lesquels vont passer les requêtes + client et les données POST au moment où le serveur les reçoit. Cette + définition vient en ajout à tout autre filtre défini en + quelqu'endroit que ce soit, y compris via la directive <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>.</p> + + <p>Si la directive comporte plusieurs filtres, ils doivent être + séparés par des points-virgules, et spécifiés selon l'ordre dans + lequel vous souhaitez les voir agir sur les contenus.</p> + +<h3>Voir aussi</h3> +<ul> +<li>documentation des <a href="../filter.html">Filtres</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="setoutputfilter" id="setoutputfilter">Directive</a> <a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit les filtres par lesquels vont passer les réponses +du serveur</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SetOutputFilter <var>filtre</var>[;<var>filtre</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">SetOutputFilter</code> permet de + définir les filtres par lesquels vont passer les réponses du serveur + avant d'être envoyées au client. Cette définition vient en ajout à + tout autre filtre défini en quelqu'endroit que ce soit, y compris + via la directive <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>.</p> + + <p>Par exemple, la configuration suivante va traiter tous les + fichiers du répertoire <code>/www/data/</code> comme des inclusions + côté serveur (SSI) :</p> + + <pre class="prettyprint lang-config"><Directory "/www/data/"> + SetOutputFilter INCLUDES +</Directory></pre> + + + <p>Si la directive comporte plusieurs filtres, ils doivent être + séparés par des points-virgules, et spécifiés selon l'ordre dans + lequel vous souhaitez les voir agir sur les contenus.</p> + +<h3>Voir aussi</h3> +<ul> +<li><a href="../filter.html">Filters</a> documentation</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="stricthostcheck" id="stricthostcheck">Directive</a> <a name="StrictHostCheck" id="StrictHostCheck">StrictHostCheck</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Détermine si le nom d'hôte contenu dans une requête doit être +explicitement spécifié au niveau du serveur virtuel qui a pris en compte cette +dernière. + </td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>StrictHostCheck ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>StrictHostCheck OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.4.49 du serveur HTTP Apache.</td></tr> +</table> + <p>Par défaut, le serveur répond aux requêtes quel que soit le nom d'hôte + qu'elles contiennent, y compris un nom d'hôte non prévu dans la + configuration. Bien que cela soit pratique, il peut s'avérer souhaitable de + restreindre les noms d'hôte qu'une application sous-jacente devra prendre en + compte car elle va souvent générer des réponses en se référençant elle-même.</p> + + <p>Si la directive <code class="directive">StrictHostCheck</code> est définie à + <em>ON</em>, le serveur générera une erreur HTTP 400 si le nom d'hôte que + contient la requête n'a pas été explicitement spécifié par une directive + <code class="directive"><a href="#servername">ServerName</a></code> ou <code class="directive"><a href="#serveralias">ServerAlias</a></code> au niveau du serveur virtuel qui + correspond le mieux aux caractéristiques de la connexion entrante.</p> + + <p>Cette directive permet aussi de rechercher une correspondance entre le nom + d'hôte de la requête et les noms d'hôte spécifiés au sein de la balise + ouvrante <code class="directive"><a href="#virtualhost">VirtualHost</a></code>. Il s'agit + cependant d'un mécanisme de configuration relativement obscur qui agit comme + une directive <code class="directive"><a href="#serveralias">ServerAlias</a></code> + supplémentaire.</p> + + <p>Cette directive n'a aucun effet dans les serveurs virtuels qui ne sont pas + des serveurs par défaut. La valeur héritée de la configuration globale du + serveur ou le serveur virtuel par défaut pour l'adresse IP/port de la + connexion sous-jacente déterminent la valeur effective.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="timeout" id="timeout">Directive</a> <a name="TimeOut" id="TimeOut">TimeOut</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Temps pendant lequel le serveur va attendre certains +évènements avant de considérer qu'une requête a échoué</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>TimeOut <var>secondes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>TimeOut 60</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>La directive <code class="directive">TimeOut</code> permet de définir le + temps maximum pendant lequel Apache httpd va attendre des entrées/sorties + selon les circonstances :</p> + + <ul> + <li><p>Lors de la lecture de données en provenance du client, le + temps maximum jusqu'à l'arrivée d'un paquet TCP si le tampon est + vide.</p> + <p>Pour les données initiales d'une nouvelle connexion, et tant qu'une + directive <code class="directive"><a href="#acceptfilter">AcceptFilter</a></code> n'aura pas + transmis cette nouvelle connexion au serveur, cette directive n'aura aucun + effet.</p> + </li> + + <li>Lors de l'écriture de données destinées au client, le temps + maximum jusqu'à l'arrivée de l'accusé-réception d'un paquet si le + tampon d'envoi est plein.</li> + + <li>Avec <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> et <code class="module"><a href="../mod/mod_cgid.html">mod_cgid</a></code>, le temps + d'attente maximum pour un bloc individuel en sortie d'un script CGI.</li> + + <li>Avec <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>, le temps d'attente + maximum des sorties d'un processus de filtrage.</li> + + <li>Avec <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, la valeur du délai par défaut + si <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> n'est + pas défini.</li> + </ul> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="traceenable" id="traceenable">Directive</a> <a name="TraceEnable" id="TraceEnable">TraceEnable</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Détermine le comportement des requêtes +<code>TRACE</code></td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>TraceEnable on</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Cette directive l'emporte sur le comportement de + <code>TRACE</code> pour le noyau du serveur et + <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>. La définition par défaut + <code>TraceEnable on</code> permet des requêtes <code>TRACE</code> + selon la RFC 2616, qui interdit d'ajouter tout corps à la requête. + La définition <code>TraceEnable off</code> indique au noyau du + serveur et à <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> de retourner un code + d'erreur <code>405</code> (Méthode non autorisée) au client.</p> + + <p>En fait, et à des fins de test et de diagnostic seulement, on + peut autoriser l'ajout d'un corps de requête à l'aide de la + définition non standard <code>TraceEnable extended</code>. Le noyau + du serveur (dans le cas d'un serveur d'origine) va limiter la taille + du corps de requête à 64Kb (plus 8Kb pour les en-têtes de + fractionnement si <code>Transfer-Encoding: chunked</code> est + utilisé). Le noyau du serveur va reproduire l'ensemble des en-têtes, + y compris les en-têtes de fractionnement avec le corps de la + réponse. Dans le cas d'un serveur mandataire, la taille du corps de + requête n'est pas limitée à 64Kb.</p> + + <div class="note"><h3>Note</h3> + <p>Bien que certains prétendent le contraire, activer la méthode + <code>TRACE</code> ne constitue pas un problème de sécurité dans Apache + httpd. La méthode <code>TRACE</code> est définie par la spécification + HTTP/1.1 et les différentes implémentations sont censées la supporter.</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="undefine" id="undefine">Directive</a> <a name="UnDefine" id="UnDefine">UnDefine</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Invalide la définition d'une variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>UnDefine <var>nom-variable</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Annule l'effet d'une directive <code class="directive"><a href="#define">Define</a></code> ou d'un argument <code>-D</code> de + <code class="program"><a href="../programs/httpd.html">httpd</a></code> en invalidant l'existence de la variable + correspondante.</p> + <p>On peut utiliser cette directive pour inverser l'effet d'une + section <code class="directive"><a href="#ifdefine"><IfDefine></a></code> + sans avoir à modifier les arguments <code>-D</code> dans les scripts + de démarrage.</p> + + <p>Afin d'éviter tout risque de collision avec la syntaxe de la directive + <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>, les noms de + variables ne doivent pas contenir de caractère ":".</p> + + <div class="note"><h3>Piège de la portée de cette directive</h3> + <p>Si cette directive est définie au sein d'un bloc VirtualHost, les + changements qu'elle induit sont visibles de toute directive + ultérieure, au delà de tout bloc VirtualHost.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#define">Define</a></code></li> +<li><code class="directive"><a href="#ifdefine">IfDefine</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="usecanonicalname" id="usecanonicalname">Directive</a> <a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit la manière dont le serveur détermine son propre nom +et son port</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>UseCanonicalName Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Dans de nombreuses situations, Apache httpd doit construire une URL + <em>auto-identifiante</em> -- c'est à dire une URL qui fait + référence au serveur lui-même. Avec <code>UseCanonicalName + On</code>, Apache httpd va utiliser le nom d'hôte et le port spécifiés par + la directive <code class="directive"><a href="#servername">ServerName</a></code> pour + construire le nom canonique du serveur. Ce nom est utilisé dans + toutes les URLs auto-identifiantes, et affecté aux variables + <code>SERVER_NAME</code> et <code>SERVER_PORT</code> dans les + programmes CGI.</p> + + <p>Avec <code>UseCanonicalName Off</code>, Apache httpd va construire ses + URLs auto-identifiantes à l'aide du nom d'hôte et du port fournis + par le client, si ce dernier en a fourni un (dans la négative, + Apache utilisera le nom canonique, de la même manière que + ci-dessus). Ces valeurs sont les mêmes que celles qui sont utilisées + pour implémenter les <a href="../vhosts/name-based.html">serveurs virtuels à base de + nom</a>, et sont disponibles avec les mêmes clients. De même, les + variables CGI <code>SERVER_NAME</code> et <code>SERVER_PORT</code> + seront affectées des valeurs fournies par le client.</p> + + <p>Cette directive peut s'avérer utile, par exemple, sur un serveur + intranet auquel les utilisateurs se connectent en utilisant des noms + courts tels que <code>www</code>. Si les utilisateurs tapent un nom + court suivi d'une URL qui fait référence à un répertoire, comme + <code>http://www/splat</code>, <em>sans le slash terminal</em>, vous + remarquerez qu'Apache httpd va les rediriger vers + <code>http://www.example.com/splat/</code>. Si vous avez activé + l'authentification, ceci va obliger l'utilisateur à s'authentifier + deux fois (une première fois pour <code>www</code> et une seconde + fois pour <code>www.example.com</code> -- voir <a href="http://wiki.apache.org/httpd/FAQ#Why_does_Apache_ask_for_my_password_twice_before_serving_a_file.3F">la + foire aux questions sur ce sujet pour plus d'informations</a>). + Par contre, si <code class="directive">UseCanonicalName</code> est définie à + <code>Off</code>, Apache httpd redirigera l'utilisateur vers + <code>http://www/splat/</code>.</p> + + <p>Pour l'hébergement virtuel en masse à base d'adresse IP, on + utilise une troisième option, <code>UseCanonicalName + DNS</code>, pour supporter les clients anciens qui ne + fournissent pas d'en-tête <code>Host:</code>. Apache httpd effectue alors + une recherche DNS inverse sur l'adresse IP du serveur auquel le + client s'est connecté afin de construire ses URLs + auto-identifiantes.</p> + + <div class="warning"><h3>Avertissement</h3> + <p>Les programmes CGI risquent d'être perturbés par cette option + s'ils tiennent compte de la variable <code>SERVER_NAME</code>. Le + client est pratiquement libre de fournir la valeur qu'il veut comme + nom d'hôte. Mais si le programme CGI n'utilise + <code>SERVER_NAME</code> que pour construire des URLs + auto-identifiantes, il ne devrait pas y avoir de problème.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a> <a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit la manière dont le serveur +détermine son propre port</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Dans de nombreuses situations, Apache httpd doit construire une URL + <em>auto-identifiante</em> -- c'est à dire une URL qui fait + référence au serveur lui-même. Avec <code>UseCanonicalPhysicalPort + On</code>, Apache httpd va fournir le numéro de port physique réel utilisé + par la requête en tant que port potentiel, pour construire le port + canonique afin que le serveur puisse alimenter la directive + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>. Avec + <code>UseCanonicalPhysicalPort Off</code>, Apache httpd n'utilisera pas le + numéro de port physique réel, mais au contraire se référera aux + informations de configuration pour construire un numéro de port + valide.</p> + + <div class="note"><h3>Note</h3> + <p>L'ordre dans lequel s'effectue la recherche quand on utilise le + port physique est le suivant :</p> + <dl> + <dt><code>UseCanonicalName On</code></dt> + <dd> + <ol> + <li>Port indiqué dans <code class="directive"><a href="#servername">Servername</a></code></li> + <li>Port physique</li> + <li>Port par défaut</li> + </ol> + </dd> + <dt><code>UseCanonicalName Off | DNS</code></dt> + <dd> + <ol> + <li>Port spécifié dans l'en-tête <code>Host:</code></li> + <li>Port physique</li> + <li>Port spécifié par <code class="directive"><a href="#servername">Servername</a></code></li> + <li>Port par défaut</li> + </ol> + </dd> + </dl> + + <p>Avec <code>UseCanonicalPhysicalPort Off</code>, on reprend + l'ordre ci-dessus en supprimant "Port physique".</p> + </div> + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="virtualhost" id="virtualhost">Directive</a> <a name="VirtualHost" id="VirtualHost"><VirtualHost></a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contient des directives qui ne s'appliquent qu'à un nom +d'hôte spécifique ou à une adresse IP</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code><VirtualHost + <var>adresse IP</var>[:<var>port</var>] [<var>adresse + IP</var>[:<var>port</var>]] ...> ... + </VirtualHost></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Noyau httpd</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>Les balises <code class="directive"><VirtualHost></code> et + <code></VirtualHost></code> permettent de rassembler un groupe + de directives qui ne s'appliquent qu'à un serveur virtuel + particulier. Toute directive autorisée dans un contexte de serveur + virtuel peut être utilisée. Lorsque le serveur reçoit un requête + pour un document hébergé par un serveur virtuel particulier, il + applique les directives de configuration rassemblées dans la section + <code class="directive"><VirtualHost></code>. <var>adresse + IP</var> peut être une des entités suivantes, éventuellement suivies + d'un caractère ':' et d'un numéro de port (ou *) :</p> + + <ul> + <li>L'adresse IP du serveur virtuel ;</li> + + <li>Un nom de domaine entièrement qualifié correspondant à + l'adresse IP du serveur virtuel (non recommandé) ;</li> + + <li>Le caractère <code>*</code>, qui agit comme un + caractère générique, et correspond à toute adresse IP.</li> + + <li>La chaîne <code>_default_</code>, dont la signification est + identique à celle du caractère <code>*</code></li> + + </ul> + + <pre class="prettyprint lang-config"><VirtualHost 10.1.2.3:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost></pre> + + + + <p>Les adresses IPv6 doivent être entourées de crochets car dans le + cas contraire, un éventuel port optionnel ne pourrait pas être + déterminé. Voici un exemple de serveur virtuel avec adresse IPv6 + :</p> + + <pre class="prettyprint lang-config"><VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost></pre> + + + <p>Chaque serveur virtuel doit correspondre à une adresse IP, un + port ou un nom d'hôte spécifique ; dans le premier cas, le serveur + doit être configuré pour recevoir les paquets IP de plusieurs + adresses (si le serveur n'a qu'une interface réseau, on peut + utiliser à cet effet la commande <code>ifconfig alias</code> -- si + votre système d'exploitation le permet).</p> + + <div class="note"><h3>Note</h3> + <p>L'utilisation de la directive <code class="directive"><VirtualHost></code> n'affecte en rien les + adresses IP sur lesquelles Apache httpd est en écoute. Vous devez vous + assurer que les adresses des serveurs virtuels sont bien incluses + dans la liste des adresses précisées par la directive <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p> + </div> + + <p>Tout bloc <code class="directive"><VirtualHost></code> doit comporter une directive + <code class="directive"><a href="#servername">ServerName</a></code>. Dans le cas + contraire, le serveur virtuel héritera de la valeur de la directive + <code class="directive"><a href="#servername">ServerName</a></code> issue de la + configuration du serveur principal.</p> + + <p>A l'arrivée d'une requête, le serveur tente de la + faire prendre en compte par la section <code class="directive"><VirtualHost></code> qui correspond le mieux en ne + se basant que sur la paire adresse IP/port. Les chaînes sans + caractères génériques l'emportent sur celles qui en contiennent. Si + aucune correspondance du point de vue de l'adresse IP/port n'est + trouvée, c'est la configuration du serveur "principal" qui sera + utilisée.</p> + + <p>Si plusieurs serveurs virtuels correspondent du point de vue de + l'adresse IP/port, le serveur sélectionne celui qui correspond le + mieux du point de vue du nom d'hôte de la requête. Si aucune + correspondance du point de vue du nom d'hôte n'est trouvée, c'est le + premier serveur virtuel dont l'adresse IP/port correspond qui sera + utilisé. Par voie de conséquence, le premier serveur virtuel + comportant une certaine paire adresse IP/port est le serveur virtuel + par défaut pour cette paire adresse IP/port.</p> + + <div class="warning"><h3>Sécurité</h3> + <p>Voir le document sur les <a href="../misc/security_tips.html">conseils à propos de sécurité</a> + pour une description détaillée des raisons pour lesquelles la + sécurité de votre serveur pourrait être compromise, si le répertoire + contenant les fichiers journaux est inscriptible par tout autre + utilisateur que celui qui démarre le serveur.</p> + </div> + +<h3>Voir aussi</h3> +<ul> +<li><a href="../vhosts/">Documentation des serveurs virtuels +du serveur HTTP Apache</a></li> +<li><a href="../dns-caveats.html">Problèmes concernant le DNS et +le serveur HTTP Apache</a></li> +<li><a href="../bind.html">Définition des adresses et ports +qu'utilise le serveur HTTP Apache</a></li> +<li><a href="../sections.html">Comment fonctionnent les sections +<Directory>, <Location> et <Files></a> pour une +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête</li> +</ul> +</div> +</div> +<div class="bottomlang"> +<p><span>Langues Disponibles: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/core.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Autorisé sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/mod/core.html.ja.utf8 b/docs/manual/mod/core.html.ja.utf8 new file mode 100644 index 0000000..8c1be70 --- /dev/null +++ b/docs/manual/mod/core.html.ja.utf8 @@ -0,0 +1,3825 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>core - Apache HTTP サーバ バージョン 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p> +<p class="apache">Apache HTTP サーバ バージョン 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP サーバ</a> > <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> > <a href="../">バージョン 2.4</a> > <a href="./">モジュール</a></div> +<div id="page-content"> +<div id="preamble"><h1>Apache コア機能</h1> +<div class="toplang"> +<p><span>翻訳済み言語: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate">この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 + </div> +<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>常に使用可能な Apache HTTP サーバのコア機能</td></tr> +<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Core</td></tr></table> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">ディレクティブ</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgivar">CGIVar</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxpipelined">FlushMaxPipelined</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxthreshold">FlushMaxThreshold</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#httpprotocoloptions">HttpProtocolOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#if"><If></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdirective"><IfDirective></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#iffile"><IfFile></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifsection"><IfSection></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergeslashes">MergeSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocols">Protocols</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocolshonororder">ProtocolsHonorOrder</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#qualifyredirecturl">QualifyRedirectURL</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#readbuffersize">ReadBufferSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#regexdefaultoptions">RegexDefaultOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#stricthostcheck">StrictHostCheck</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li> +</ul> +<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=core">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=core">Report a bug</a></li></ul><h3>参照</h3> +<ul class="seealso"> +<li><a href="#comments_section">コメント</a></li></ul></div> + +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>プロトコルを Listen しているソケットの最適化を設定する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.1.5 以降</td></tr> +</table> + <p>Listen しているソケットに対して、OS が固有に持っているプロトコルについての最適化を + 有効にするディレクティブです。大前提となる条件は、データが受信されるか + HTTP リクエスト全体がバッファされるかするまで、カーネルがサーバプロセスに + ソケットを送らないようになっている、ということです。現在サポートされているのは、 + <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9"> + FreeBSD の Accept Filter</a> と Linux のプリミティブな + <code>TCP_DEFER_ACCEPT</code> のみです。</p> + + <p>FreeBSD のデフォルト値は :</p> + <div class="example"><p><code> + AcceptFilter http httpready <br /> + AcceptFilter https dataready + </code></p></div> + + <p><code>httpready</code> Accept Filter は HTTP リクエスト全体を、 + カーネルレベルでバッファリングします。リクエスト全体を受信し終わると、 + その後サーバプロセスにそれを送ります。詳細については <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9">accf_http(9)</a> + を参照してください。HTTPS のリクエストは暗号化されているので <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">accf_data(9)</a> + フィルタのみが使用されます。</p> + + <p>Linux でのデフォルト値は :</p> + <div class="example"><p><code> + AcceptFilter http data <br /> + AcceptFilter https data + </code></p></div> + + <p>Linux の <code>TCP_DEFER_ACCEPT</code> は HTTP リクエストのバッファリングを + サポートしていません。<code>none</code> 以外の値で + <code>TCP_DEFER_ACCEPT</code> が有効になります。詳細については Linux + man ページ <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">tcp(7)</a> + を参照してください。</p> + + <p>引数に <code>none</code> を指定すると、プロトコルに対する全ての Accept + Filter が無効になります。<code>nntp</code> といった、先にサーバにデータを + 送る必要のあるプロトコルに有効です :</p> + <div class="example"><p><code>AcceptFilter nntp none</code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>後に続くパス名情報を受け付けるリソースの指定</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AcceptPathInfo Default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.30 以降で使用可能</td></tr> +</table> + + <p>このディレクティブは実際のファイル名 (もしくは存在するディレクトリの + 存在しないファイル) の後に続くパス名情報があるリクエストを受け付けるか + 拒否するかを制御します。続きのパス名情報はスクリプトには <code>PATH_INFO</code> + 環境変数として利用可能になります。</p> + + <p>例えば、<code>/test/</code> が、<code>here.html</code> というファイル + 一つのみがあるディレクトリを指しているとします。そうすると、 + <code>/test/here.html/more</code> と <code>/test/nothere.html/more</code> + へのリクエストは両方とも <code>/more</code> を <code>PATH_INFO</code> とします。</p> + + <p><code class="directive">AcceptPathInfo</code> ディレクティブに指定可能な + 三つの引数は:</p> + + <dl> + <dt><code>Off</code></dt><dd>リクエストは存在するパスにそのまま + マップされる場合にのみ受け付けられます。ですから、上の例の + <code>/test/here.html/more</code> のように、本当のファイル名の + 後にパス名情報が続くリクエストには 404 NOT FOUND エラーが返ります。</dd> + + <dt><code>On</code></dt><dd>前の方のパスが存在するファイルにマップする場合は + リクエストが受け付けられます。上の例の <code>/test/here.html/more</code> + は <code>/test/here.html</code> が有効なファイルにマップすれば + 受け付けられます。</dd> + + <dt><code>Default</code></dt><dd>続きのパス名情報の扱いはリクエストの + <a href="../handler.html">ハンドラ</a>で決まります。 + 普通のファイルのためのコアハンドラのデフォルトは <code>PATH_INFO</code> を拒否します。 + <a href="mod_cgi.html">cgi-script</a> や <a href="mod_isapi.html">isapi-handler</a> のようにスクリプトを扱うハンドラは + 一般的にデフォルトで <code>PATH_INFO</code> を受け付けます。</dd> + </dl> + + <p><code>AcceptPathInfo</code> の主な目的はハンドラの <code>PATH_INFO</code> を + 受け付けるか拒否するかの選択を上書きできるようにすることです。 + 例えば、これは例えば <a href="mod_include.html">INCLUDES</a> のような + <a href="../filter.html">フィルタ</a>を使って <code>PATH_INFO</code> に + 基づいてコンテンツを生成しているときに必要になります。 + コアハンドラでは通常拒否されるので、そういったスクリプトを動作させるには + 次のような設定を使います。</p> + + <div class="example"><p><code> + <Files "mypaths.shtml"><br /> + <span class="indent"> + Options +Includes<br /> + SetOutputFilter INCLUDES<br /> + AcceptPathInfo On<br /> + </span> + </Files> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>分散設定ファイルの名前</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AccessFileName .htaccess</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>リクエストを処理するとき、サーバはディレクトリに + 対して分散設定ファイルが<a href="#allowoverride">有効になっていれば</a>、 + そのドキュメントへの + パス上にある全てのディレクトリから、ここで指定された名前の一覧の中で + 最初に見つかったファイルをそれぞれ設定ファイルとして読み込みます。例えば:</p> + + <div class="example"><p><code> + AccessFileName .acl + </code></p></div> + + <p>という設定があると、以下のようにして無効にされていない限り、 + ドキュメント <code>/usr/local/web/index.html</code> + を返す前に、サーバは <code>/.acl</code>, <code>/usr/.acl</code>, + <code>/usr/local/.acl</code>, <code>/usr/local/web/.acl</code> から + ディレクティブを読み込みます。</p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + AllowOverride None<br /> + </span> + </Directory> + </code></p></div> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">設定ファイル</a></li> +<li><a href="../howto/htaccess.html">.htaccess ファイル</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>レスポンスのコンテントタイプが <code>text/plain</code> あるいは +<code>text/html</code> の場合に追加するデフォルトの charset パラメータ</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AddDefaultCharset Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>レスポンスのコンテントタイプが <code>text/plain</code> + あるいは <code>text/html</code> + の場合に限りますが、レスポンスに追加するメディアタイプの文字セットパラメータ + (文字エンコーディングの名前) のデフォルト値を、このディレクティブで指定します。 + これはレスポンス <span class="transnote">(<em>訳注:</em> レスポンスの HTML)</span> 内で <code>META</code> + 要素で指定された、どのような文字セットも無効にしますが、 + 最終的な挙動はユーザのクライアント側の設定で決まります。 + この機能は <code>AddDefaultCharset Off</code> という設定で無効になります。 + <code>AddDefaultCharset On</code> にすれば、 + Apache 内部のデフォルト文字セット <code>iso-8859-1</code> に設定されます。 + その他 <var>charset</var> に指定できる値であれば、どんな値でも使えます。 + 指定する値は、MIME メディアタイプとして使われる + <a href="http://www.iana.org/assignments/character-sets">IANA + に登録されている文字セット名</a>のうちの一つにすべきです。 + 例えば:</p> + + <div class="example"><p><code> + AddDefaultCharset utf-8 + </code></p></div> + + <p><code class="directive">AddDefaultCharset</code> を使うときは、全てのテキストリソースが + 指定する文字エンコードになっていると分かっていて、かつ、 + リソースの個々に文字セットを指定するのが大変な場合のみです。 + 例を挙げると、レガシーな CGI スクリプトなどの、動的に生成される + コンテンツを含むリソースに文字セットパラメータを追加する場合で、 + ユーザの入力データが出力に入り、クロスサイトスクリプティングが + 引き起こされうる場合です。デフォルト文字セットをセットしたとしても、 + ブラウザの "文字エンコードの自動選択" 機能が有効になっているユーザを + 守ることにはならないので、もちろんより良い解決策は単にスクリプトを修正 + (あるいは削除) することです。</p> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>URL 中の符号化されたパス分離文字が先に伝えられるのを許可するかどうかを +決定する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.46 以降で使用可能</td></tr> +</table> + <p><code class="directive">AllowEncodedSlashes</code> ディレクティブは符号化された + パス分離文字 (<code>/</code> は <code>%2F</code>、さらにシステムによっては + <code>\</code> に対応する <code>%5C</code>) が存在する URL の使用を + 許可するかどうかを決定します。通常はそのような URL は 404 (Not found) エラー + で拒否されます。</p> + + <p><code class="directive">AllowEncodedSlashes</code> <code>On</code> による + パス分離文字の使用は、<code>PATH_INFO</code> と合わせて + 使うときに一番役に立ちます。</p> + + <div class="note"><h3>注</h3> + <p>符号化されたスラッシュを許可することは、<em>復号</em>をすることを + 意味<em>しません</em>。<code>%2F</code> や (関係するシステムでの) + <code>%5C</code> は、他の部分が復号された URL の中でもそのままの形式で + 残されます。</p> + </div> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>.htaccess</code> で許可されるディレクティブの種類</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AllowOverride All|None|<var>directive-type</var> +[<var>directive-type</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AllowOverride All</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>サーバが (<code class="directive"><a href="#accessfilename">AccessFileName</a></code> によって指定された) + <code>.htaccess</code> ファイルを見つけた時、そのファイルの中で + 宣言されたどのディレクティブがより前に定義された設定ディレクティブを + 上書きできるかを知る必要があります。</p> + + <div class="note"><h3><Directory> セクションでのみ使用可能</h3> + <code class="directive">AllowOverride</code> は正規表現無しの<code class="directive"><a href="#directory"><Directory></a></code> + セクションでのみ有効で、<code class="directive"><a href="#location"><Location></a></code> や <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> + や <code class="directive"><a href="#files"><Files></a></code> セクションでは無効です。 + </div> + + <p>このディレクティブを <code>None</code> に設定すると、<a href="#accessfilename">.htaccess</a> ファイルは完全に + 無視されます。 + この場合、サーバはファイルシステムの <code>.htaccess</code> ファイルを読むことを + 試みさえしません。</p> + + <p>このディレクティブが <code>All</code> に設定されている時には、 + <code>.htaccess</code> という <a href="directive-dict.html#Context">コンテキスト</a> を持つ + 全てのディレクティブが利用できます。</p> + + <p><var>directive-type</var> には、以下のディレクティブ群の + キーワードのどれかを指定します。</p> + + <dl> + <dt>AuthConfig</dt> + + <dd> + + 認証に関するディレクティブの使用を許可する (<code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>, + <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>, + <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>など</em>)。</dd> + + <dt>FileInfo</dt> + + <dd> + ドキュメントタイプを制御するためのディレクティブの使用を許可する (<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>, + <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>, + <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> の Add* と Remove* + ディレクティブ<em>など</em>), + ドキュメントのメタデータ (<code class="directive"><a href="../mod/mod_headers.html#header">Header</a></code>, <code class="directive"><a href="../mod/mod_headers.html#requestheader">RequestHeader</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvif">SetEnvIf</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookieexpires">CookieExpires</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiedomain">CookieDomain</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiestyle">CookieStyle</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookietracking">CookieTracking</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiename">CookieName</a></code>), + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> のディレクティブ <code class="directive"><a href="../mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>) と + <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code> の + <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> + ディレクティブ。 + </dd> + + <dt>Indexes</dt> + + <dd> + ディレクトリインデックスを制御するためのディレクティブの使用を許可する + (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#fancyindexing">FancyIndexing</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code> + <em>など</em>)。</dd> + + <dt>Limit</dt> + + <dd> + ホストへのアクセス制御を行うためのディレクティブの使用を許可する (<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>, <code class="directive"><a href="../mod/mod_authz_host.html#order">Order</a></code>).</dd> + + <dt>Options[=<var>Option</var>,...]</dt> + + <dd> + 特定のディレクトリにおける機能を指定するためのディレクティブの使用を許可する + (<code class="directive"><a href="#options">Options</a></code> と + <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>)。 + <code class="directive"><a href="#options">Options</a></code> で設定するオプション + を、(空白を含めない) コンマ区切りのリストにして等号の後に続けることで + 設定できます。</dd> + </dl> + + <p>例:</p> + + <div class="example"><p><code> + AllowOverride AuthConfig Indexes + </code></p></div> + + <p>上の例では <code>AuthConfig</code> と <code>Indexes</code> のどちらにも + 属さないディレクティブはすべて内部サーバエラーを引き起こします。</p> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><a href="../configuring.html">設定ファイル</a></li> +<li><a href="../howto/htaccess.html">.htaccess ファイル</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Individual directives that are allowed in +<code>.htaccess</code> files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AllowOverrideList None|<var>directive</var> +[<var>directive-type</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AllowOverrideList None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Configuration Files</a></li> +<li><a href="../howto/htaccess.html">.htaccess Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>CGI スクリプトのインタープリタの位置を調べるための手法</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>NetWare のみ</td></tr> +</table> + <p>このディレクティブは Apache が CGI スクリプトを実行するための + インタープリタを探す方法を制御します。 + 例えば、<code>CGIMapExtension sys:\foo.nlm .foo</code> と設定すると + <code>.foo</code> という拡張子のすべての CGI スクリプトは FOO インタープリタに + 渡されます。</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a> <a name="cgipassauth" id="cgipassauth">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Enables passing HTTP authorization headers to scripts as CGI +variables</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>CGIPassAuth On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>CGIPassAuth Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>AuthConfig</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.4.13 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIVar" id="CGIVar">CGIVar</a> <a name="cgivar" id="cgivar">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Controls how some CGI variables are set</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>CGIVar <var>variable</var> <var>rule</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.4.21 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>Content-MD5</code> HTTP 応答ヘッダの生成を有効にする</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ContentDigest On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ContentDigest Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>このディレクティブは、RFC1864 及び RFC2616 において定義されている + <code>Content-MD5</code> ヘッダーの生成を有効にします。</p> + + <p>MD5 は、任意長のデータの「メッセージダイジェスト」(「指紋」 + と表現されることもある) を計算するアルゴリズムで、 + データの変更があった場合には非常に高い信頼度でメッセージダイジェストに変更が + 反映されます。</p> + + <p><code>Content-MD5</code> ヘッダは、エンドツーエンドで + エンティティボディーに含まれるメッセージの完全性チェック + (Message Integrity Check - MIC)を提供します。 + このヘッダを調べることで、プロキシやクライアントは、 + 途中経路におけるエンティティボディの予期せぬ変更などを + 検出することができます。ヘッダの例:</p> + + <div class="example"><p><code> + Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== + </code></p></div> + + <p>リクエスト毎にメッセージダイジェストを計算する (値はキャッシュされません) + ことから、 + サーバパフォーマンスが低下することについて注意してください。</p> + + <p><code>Content-MD5</code>は、<code class="module"><a href="../mod/core.html">core</a></code> 機能により処理された + ドキュメントを送るときのみ有効であり、 + SSI ドキュメントや CGI スクリプトの出力、バイトレンジを指定した + 応答の場合にはこのヘッダは付与されません。 + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Base directory for the server run-time files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache 2.4.2 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><a href="../misc/security_tips.html#serverroot">the + security tips</a> for information on how to properly set + permissions on the <code class="directive">ServerRoot</code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバがコンテントタイプを決定できないときに +送られる MIME コンテントタイプ</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DefaultType <var>MIME-type|none</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DefaultType text/plain</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>引数 <code>none</code> は Apache 2.2.7 以降で利用可能</td></tr> +</table> + <p>サーバは、<a class="glossarylink" href="../glossary.html#mime-type" title="用語集を参照">MIME タイプ</a> + のマップからは決定できないドキュメントの送信を要求されることがあります。</p> + + <p>サーバは、ドキュメントのコンテントタイプをクライアントに通知するべきです。 + サーバで通常の方法ではこれが判定できない場合は、 + <code>DefaultType</code> で指定されたタイプを利用します。 + 例:</p> + + <div class="example"><p><code> + DefaultType image/gif + </code></p></div> + + <p>これは <code>.gif</code> という拡張子がファイル名に含まれていない + 多くの GIF 画像が含まれているディレクトリに適しているでしょう。</p> + + <p>サーバでも管理者でも判定することができない (例えばプロクシの) 場合、 + 誤った情報を与えるよりは MIME タイプの指定がない状態が望ましいことも + あります。この場合は次のようにします :</p> + <div class="example"><p><code> + DefaultType None + </code></p></div> + <p><code>DefaultType None</code> は httpd-2.2.7 + 以降でのみ利用できます。</p> + + <p><code class="directive"><a href="#forcetype">ForceType</a></code> ディレクティブと + 違って、このディレクティブはデフォルトの MIME タイプを提供するだけで + あることに注意してください。ファイル名の拡張子を含め、 + メディアタイプを決定できる他の MIME タイプの定義があれば + このデフォルトは上書きされます。</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>変数の存在を宣言する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Define <var>parameter-name</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="program"><a href="../programs/httpd.html">httpd</a></code> の <code>-D</code> + 引数と同じものです。</p> + <p>このディレクティブを使うと、スタートアップスクリプトに + 記載されている <code>-D</code> 引数を書き換える必要なく、 + <code class="directive"><a href="#ifdefine"><IfDefine></a></code> + セクションを切り替えることができます。</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>指定のファイルシステムのディレクトリとサブディレクトリとのみに +適用されるディレクティブを囲む</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Directory <var>directory-path</var>> +... </Directory></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>指定されたディレクトリとそのサブディレクトリにのみ + ディレクティブを適用させるためには、 + <code class="directive"><Directory></code> と + <code></Directory></code> を対として、ディレクティブ群を囲います。 + その中には、ディレクトリコンテキストで許可された全てのディレクティブを + 利用できます。 + <var>directive-path</var> は、フルパスもしくは Unix のシェル形式の + ワイルドカードを指定します。 + <code>?</code> は任意の 1 文字、<code>*</code> は任意の文字列にマッチします。 + シェルにおける指定同様、文字の範囲を <code>[]</code> で指定できます。 + ワイルドカードは `/' 文字にはマッチしませんので、 + <code>/home/user/public_html</code> には + <code><Directory /*/public_html></code> はマッチしませんが、 + <code><Directory /home/*/public_html></code> はマッチします。 + 例:</p> + + <div class="example"><p><code> + <Directory /usr/local/httpd/htdocs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory> + </code></p></div> + + <div class="note"> + <p><var>directory-path</var> 引数には注意してください: その引数は + Apache がファイルをアクセスするために使うファイルシステムのパスに + そのままマッチする必要があります。ある <code><Directory></code> に + 適用されるディレクティブは、別のシンボリックリンクをたどったりして + 同じディレクトリを違うパスでアクセスした場合には適用されません。</p> + </div> + + <p><code>~</code> という文字を + 付加することで<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>を利用することもできます。 + 例えば:</p> + + <div class="example"><p><code> + <Directory ~ "^/www/.*/[0-9]{3}"> + </code></p></div> + + <p>といった指定の場合、<code>/www/</code> 以下にある数字 + 3 文字のディレクトリにマッチします。</p> + + <p>もし複数の (正規表現以外の) <code class="directive"><Directory></code>セクションが + ドキュメントを含むディレクトリ (やその上位ディレクトリのどれか) とマッチしたならば、 + <a href="#accessfilename">.htaccess</a> ファイルのディレクティブも読み込みつつ、 + 短いパスから順に適用されます。 + 例えば、</p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + AllowOverride None<br /> + </span> + </Directory><br /> + <br /> + <Directory /home/><br /> + <span class="indent"> + AllowOverride FileInfo<br /> + </span> + </Directory> + </code></p></div> + + <p>と設定し、ドキュメント <code>/home/web/dir/doc.html</code> への + アクセスがあった場合には以下のように動作します:</p> + + <ul> + <li><code>AllowOverride None</code> が適用される。 + (<code>.htaccess</code> ファイルは無効になる)</li> + + <li><code>AllowOverride FileInfo</code> が適用される + (<code>/home</code> ディレクトリに対して)。</li> + + <li><code>/home/.htaccess</code>, <code>/home/web/.htaccess</code>, + <code>/home/web/dir/.htaccess</code> の順にそれらのファイル中の + FileInfo ディレクティブが適用される。</li> + </ul> + + <p>正規表現は、通常のセクションがすべて適用されるまで + 考慮されません。 + その後、全ての正規表現が設定ファイルに現れた順で試されます。 + 例えば、以下のような場合に</p> + + <div class="example"><p><code> + <Directory ~ abc$><br /> + <span class="indent"> + # ... directives here ...<br /> + </span> + </Directory> + </code></p></div> + + <p>正規表現のセクションはすべての通常の <code class="directive"><Directory></code> と + <code>.htaccess</code> の適用が終わるまで考慮されません。 + その後で、正規表現は <code>/home/abc/public_html/abc</code> にマッチし、 + 対応する <code class="directive"><Directory></code> が適用されます。</p> + + <p><strong>Apache のデフォルトでは <code><Directory /></code> へのアクセスは + <code>Allow from All</code> になっていることに注意してください。 + これは、URL からマップされたどのファイルでも Apache は送るということです。 + これは以下のようにして変更することが推奨されています。</strong></p> + + <div class="example"><p><code> + <Directory /><br /> + <span class="indent"> + Order Deny,Allow<br /> + Deny from All<br /> + </span> + </Directory> + </code></p></div> + + <p><strong>そしてアクセスを<em>可能にしたい</em>ディレクトリに対して + 個別に設定すればよいでしょう。 + このあたりについては、<a href="../misc/security_tips.html">セキュリティに関するコツ</a>を + 参照してください。</strong></p> + + <p>ディレクトリセクションは <code>httpd.conf</code> ファイルに書きます。 + <code class="directive"><Directory></code> + ディレクティブは入れ子にすることができず、 + <code class="directive"><a href="#limit"><Limit></a></code> や <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> セクションの中にも + 記述できません。</p> + + +<h3>参照</h3> +<ul> +<li>リクエストを受けた際にこれらの異なるセクションが + 組み合わされる方法については <a href="../sections.html"> + <Directory>, <Location>, <Files> セクションの動作法</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>正規表現にマッチするファイルシステムのディレクトリと +サブディレクトリとのみに適用されるディレクティブを囲む</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><DirectoryMatch <var>regex</var>> +... </DirectoryMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><a href="#directory"><Directory></a></code> + ディレクティブと同様に、<code class="directive"><DirectoryMatch></code> + と <code></DirectoryMatch></code> は指定されたディレクトリと + そのサブディレクトリにのみ適用されるディレクティブ群を囲います。 + しかし、このディレクティブは引数として<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>をとります。例えば:</p> + + <div class="example"><p><code> + <DirectoryMatch "^/www/(.+/)?[0-9]{3}"> + </code></p></div> + + <p>は <code>/www/</code> 以下にある数字 3 文字のディレクトリにマッチします。</p> + + +<h3>参照</h3> +<ul> +<li>通常の <code class="directive"><Directory></code> と正規表現の指定が +適用される順番については <code class="directive"><a href="#directory"><Directory></a></code></li> +<li>リクエストを受けた際にこれらの異なるセクションが + 組み合わされる方法については <a href="../sections.html"> + <Directory>, <Location>, <Files> セクションの動作法</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ウェブから見えるメインのドキュメントツリーになる +ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>このディレクティブは、<code class="program"><a href="../programs/httpd.html">httpd</a></code> + がファイルを提供するディレクトリを設定します。 + <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code> のようなディレクティブにマッチしない場合には、 + ドキュメントの (訳注:ファイルシステム上の) パスを生成するために、 + リクエストされた URL のパス部分をドキュメントルートに付与します。 + 例:</p> + + <div class="example"><p><code> + DocumentRoot /usr/web + </code></p></div> + + <p>この場合、 + <code>http://www.my.host.com/index.html</code> へのアクセスがあれば + <code>/usr/web/index.html</code> が返されます。 + <var>directory-path</var> が絶対パスでない場合は、 + <code class="directive"><a href="#serverroot">ServerRoot</a></code> + からの相対パスとみなされます。</p> + + <p><code class="directive">DocumentRoot</code> は最後のスラッシュ無しで + 指定する必要があります。</p> + +<h3>参照</h3> +<ul> +<li><a href="../urlmapping.html#documentroot">URL をファイルシステムの位置に +マップする</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Else" id="Else"><Else></a> <a name="else" id="else">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Contains directives that apply only if the condition of a +previous <code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><a href="#elseif"><ElseIf></a></code> section is not +satisfied by a request at runtime</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Else> ... </Else></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ElseIf" id="ElseIf"><ElseIf></a> <a name="elseif" id="elseif">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Contains directives that apply only if a condition is satisfied +by a request at runtime while the condition of a previous +<code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><ElseIf></code> section is not +satisfied</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><a href="../expr.html">Expressions in Apache HTTP Server</a>, +for a complete reference and more examples.</li> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>配送中にファイルを読み込むためにメモリマッピングを +使うかどうか</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>EnableMMAP On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>EnableMMAP On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>このディレクティブは配送中にファイルの内容を読み込む必要があるときに + <code class="program"><a href="../programs/httpd.html">httpd</a></code> がメモリマッピングを使うかどうかを制御します。 + デフォルトでは、 + 例えば、<code class="module"><a href="../mod/mod_include.html">mod_include</a></code> を使って SSI ファイルを配送 + するときのように、ファイルの途中のデータをアクセスする必要があるときには + Apache は OS がサポートしていればファイルをメモリにマップします。</p> + + <p> + このメモリマップは性能の向上をもたらすことがあります。 + しかし、環境によっては運用上の問題を防ぐためにメモリマッピングを + 使用しないようにした方が良い場合もあります:</p> + + <ul> + <li>マルチプロセッサシステムの中にはメモリマッピングをすると + <code class="program"><a href="../programs/httpd.html">httpd</a></code> の性能が落ちるものがあります。</li> + <li>NFS マウントされた <code class="directive"><a href="#documentroot">DocumentRoot</a></code> + では、<code class="program"><a href="../programs/httpd.html">httpd</a></code> がメモリマップしている間にファイルが削除されたり + 短くなったりしたときに起こるセグメンテーションフォールトのために + <code class="program"><a href="../programs/httpd.html">httpd</a></code> がクラッシュする可能性があります。</li> + </ul> + + <p>これらの問題に当てはまるサーバの設定の場合は、以下のようにして + ファイルの配送時のメモリマッピングを使用不可にしてください:</p> + + <div class="example"><p><code> + EnableMMAP Off + </code></p></div> + + <p>NFS マウントされたファイルには、問題のあるファイルにのみ明示的に + この機能を使用不可にします:</p> + + <div class="example"><p><code> + <Directory "/path-to-nfs-files"> + <span class="indent"> + EnableMMAP Off + </span> + </Directory> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ファイルのクライアントへの配送時にカーネルの sendfile サポートを +使うかどうか</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>EnableSendfile On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>EnableSendfile On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>バージョン 2.0.44 以降で使用可能</td></tr> +</table> + <p>このディレクティブはクライアントにファイルの内容を送るときに + <code class="program"><a href="../programs/httpd.html">httpd</a></code> がカーネルの + sendfile サポートを使うかどうかを制御します。デフォルトでは、 + 例えば静的なファイルの配送のように、リクエストの処理にファイルの + 途中のデータのアクセスを必要としないときには、Apache は OS が + サポートしていればファイルを読み込むことなく sendfile を使って + ファイルの内容を送ります。</p> + + <p>sendfile は read と send を別々に行なうことと、バッファの割り当てを + 回避します。しかし、プラットフォームやファイルシステムの中には + 運用上の問題を避けるためにこの機能を使用不可にした方が良い場合があります:</p> + + <ul> + <li>プラットフォームの中にはビルドシステムが検知できなかった、壊れた + sendfile のサポートが存在するものがあります。これは特に + バイナリが別のマシンでビルドされ、壊れた sendfile のあるマシンに + 移動したときに起こります。</li> + <li>Linux では、sendfile を用いると、 + IPv6 使用時に存在する特定ネットワークカードの TCP-checksum + オフロードのバグを踏んでしまいます。</li> + <li>Itanium 上の Linux では、sendfile では 2GB 以上の + ファイルを扱うことができません。</li> + <li>ネットワークマウントされた <code class="directive"><a href="#documentroot">DocumentRoot</a></code> + (例えば NFS や SMB) + では、カーネルは自身のキャッシュを使ってネットワークからのファイルを + 送ることができないことがあります。</li> + </ul> + + <p>これらの問題に当てはまるサーバの設定の場合は、以下のようにして + この機能を使用不可にしてください:</p> + + + <div class="example"><p><code> + EnableSendfile Off + </code></p></div> + + <p>NFS や SMB マウントされたファイルには、問題のあるファイルにのみ明示的に + この機能を使用不可にします:</p> + + <div class="example"><p><code> + <Directory "/path-to-nfs-files"> + <span class="indent"> + EnableSendfile Off + </span> + </Directory> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Abort configuration parsing with a custom error message</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Error <var>message</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.3.9 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>エラーが発生したときにサーバがクライアントに送るもの</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ErrorDocument <var>error-code document</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>問題やエラーが発生したときの動作として、 + Apache には以下の四つのうち一つの動作を設定することができます。</p> + + <ol> + <li>Apache 標準の簡単なエラーメッセージを表示</li> + + <li>自分で指定したメッセージを表示</li> + + <li>問題やエラーの処理をする為に、自サーバ内の + <var>URL-path</var> へリダイレクト</li> + + <li>問題やエラーの処理をする為に、外部の <var>URL</var> へリダイレクト</li> + </ol> + + <p>最初のものがデフォルトの動作で、2 番目から 4 番目は、 + <code class="directive">ErrorDocument</code>ディレクティブにより、 + HTTP のレスポンスコードと、メッセージか URL を指定することで設定します。 + Apache が問題もしくはエラーに関する追加情報を提供することがあります。</p> + + <p>URL の場合は、スラッシュで始まる (/) ローカルの web-path ( + <code class="directive"><a href="#documentroot">DocumentRoot</a></code> からの相対パス + ) か、クライアントが解決できる完全な URL を指定します。 + もしくは、ブラウザに表示されるメッセージを指定できます。 + 例:</p> + + <div class="example"><p><code> + ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br /> + ErrorDocument 404 /cgi-bin/bad_urls.pl<br /> + ErrorDocument 401 /subscription_info.html<br /> + ErrorDocument 403 "Sorry can't allow you access today" + </code></p></div> + + <p>加えて、特別な値 <code>default</code> を使って Apache に + ハードコードされている簡単なメッセージを指定することができます。 + 通常は必要ではありませんが、<code>default</code> を使うと + 既存の <code class="directive">ErrorDocument</code> ディレクティブの設定を + 継承するところで、Apache のハードコードされた簡単なメッセージに + 戻すことができます。</p> + + <div class="example"><p><code> + ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br /> + <Directory /web/docs><br /> + <span class="indent"> + ErrorDocument 404 default<br /> + </span> + </Directory> + </code></p></div> + + <p>リモート URL (例えば、頭に <code>http</code> と付与した方法) を + <code class="directive">ErrorDocument</code> に指定するとき、 + たとえ文書が同じサーバにあろうとも、ドキュメントがどこにあるかを通知するために、 + Apache はリダイレクトをクライアントに送出するということに、注意してください。 + これにはいろいろと関連して起こる問題があります。 + 中でも最も重要なのは、クライアントは元々のエラーステータスコードを受け取らず、 + 代わりにリダイレクトのステータスコードを受け取るということです。 + これにより、ステータスコードを使って URL が有効であるかどうかを決定しようとする + ウェブロボットやその他クライアントを、混乱させるかもしれません。 + さらに、<code>ErrorDocument 401</code> にリモートの URL を指定すると、 + クライアントは 401 というステータスコードを受け取らないため、 + パスワードをユーザーに入力要求しなければならないことがわかりません。 + 従って、<strong><code>ErrorDocument 401</code> というディレクティブを使う場合は、 + 必ずローカルな文書を参照しなければなりません。</strong></p> + + <p>Microsoft Internet Explorer (MSIE) はデフォルトではサーバが生成したエラーメッセージが + 「小さすぎる」ときには無視をして自分自身の「やさしい」エラーメッセージで + 置換します。サイズのしきい値はエラーの種類によって異なりますが、 + 一般的にはエラーの文書を 512 バイトよりも大きくすると、MSIE は + サーバが生成したエラーを隠さずに表示します。詳しい情報は Microsoft + Knowledge Base の記事 <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a> + にあります。</p> + + <p>ほとんどのエラーメッセージを上書きすることができますが、特定の状況下では + <code class="directive"><a href="#errordocument">ErrorDocument</a></code> の設定にかかわらず + 内蔵のメッセージが使われます。 + 特に、不正な形式のリクエストが検出された場合、通常のリクエスト処理は + 即座に中止され、内蔵のエラーメッセージが返されます。 + この処置は不正なリクエストによって引き起こされる、セキュリティ問題から + 守るために必要な措置です。</p> + + <p>2.0 より前のバージョンでは、対になっていない二重引用符を + 先頭に付けることによりメッセージであることを指定していました。</p> + + +<h3>参照</h3> +<ul> +<li><a href="../custom-error.html">カスタマイズ可能な +エラー応答のドキュメンテーション</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバがエラーをログ収集する場所</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ErrorLog</code> ディレクティブは、 + サーバに生じたさまざまなエラーを + 記録する為のファイルの名前を設定します。 + <var>file-path</var> が絶対パスでないときは、<code class="directive"><a href="#serverroot">ServerRoot</a></code> からの相対パスとみなされます。</p> + + <div class="example"><h3>例</h3><p><code> + ErrorLog /var/log/httpd/error_log + </code></p></div> + + <p><var>file-path</var> がパイプ (|) から始まる場合は、 + エラーログを処理するために実行されるコマンドが + 指定されていると解釈されます。</p> + + <div class="example"><h3>例</h3><p><code> + ErrorLog "|/usr/local/bin/httpd_errors" + </code></p></div> + + <p>ファイル名の変わりに <code>syslog</code> と指定することによって、 + システムがサポートしていれば syslogd(8) を利用したロギングが有効になります。 + デフォルトでは、<code>local7</code> ファシリティとなりますが、 + <code>syslog:<var>facility</var></code> といった形で記述することにより、 + 通常 syslog(1) のドキュメントで説明されているファシリティの一つを使うように + することができます。</p> + + <div class="example"><h3>例</h3><p><code> + ErrorLog syslog:user + </code></p></div> + + <p>セキュリティ: + ログファイルを格納するディレクトリが、サーバを起動したユーザ以外の + ユーザによって書き込める場合にセキュリティが破られる可能性があることに + 関する詳細は <a href="../misc/security_tips.html#serverroot">セキュリティに関するコツ</a> を + 参照してください。</p> + <div class="warning"><h3>注</h3> + <p>Unix 以外のプラットフォームでファイルのパスを入力するときは、 + プラットフォームがバックスラッシュの使用を許していたとしても、 + 確実にスラッシュのみが使用されるように注意してください。一般的には、 + 設定ファイル全般でスラッシュのみを使う方が良いでしょう。</p> + </div> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache ログファイル</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Format specification for error log entries</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache HTTP Server Log Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Keep track of extended status information for each +request</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ExtendedStatus On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ETag HTTP 応答ヘッダを作成するために使用される +ファイルの属性</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>FileETag INode MTime Size</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p> + <code class="directive">FileETag</code> ディレクティブは + ドキュメントがファイルに基づいたものであるときに、 + <code>ETag</code> (エンティティタグ) 応答ヘッダフィールドを作成するときに使用する + ファイルの属性を設定します。 (<code>ETag</code> の値はネットワークの帯域を節約するための + キャッシュの管理で使われます。) Apache 1.3.22 以前では、<code>ETag</code> の値は + <em>常に</em>ファイルの inode, サイズ、最終修正時刻 (mtime) から作成 + されていました。<code class="directive">FileETag</code> ディレクティブにより、これらのどれを使うかを + 選ぶことができます。認識されるキーワードは: + </p> + + <dl> + <dt><strong>INode</strong></dt> + <dd>ファイルの inode 番号を計算に使います</dd> + <dt><strong>MTime</strong></dt> + <dd>ファイルの最終修正時刻を使います</dd> + <dt><strong>Size</strong></dt> + <dd>ファイルの中身のバイト数を使います</dd> + <dt><strong>All</strong></dt> + <dd>使用可能なすべてのフィールドを使います。 + これは <div class="example"><p><code>FileETag INode MTime Size</code></p></div> と等価です。</dd> + <dt><strong>None</strong></dt> + <dd>ドキュメントがファイルに基づいたものでも、<code>ETag</code> フィールドを + 応答に付加しません</dd> + </dl> + + <p><code>INode</code>, <code>MTime</code>, <code>Size</code> キーワードには + <code>+</code> や <code>-</code> を前に付けて + 指定することもできます。この場合は、より広い範囲から継承された + デフォルトの設定に変更を加えるようになります。そのような接頭辞の + 無いキーワードを指定すると、即座に継承した設定を無効にします。</p> + + <p>あるディレクトリの設定に + <code>FileETag INode MTime Size</code> があり、 + サブディレクトリの設定に <code>FileETag -INode</code> があるときは、 + そのサブディレクトリの設定は (設定が上書きされなければサブディレクトリの + サブディレクトリにも継承されます) <code>FileETag MTime Size</code> + と同じになります。</p> + <div class="warning"><h3>警告</h3> + WebDAV を使っていて、<code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> をストレージプロバイダとして + 使っているような Directory や Location では、デフォルト値を変更しないでください。 + <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> では、条件付リクエストでの比較演算に + <code>INode MTime Size</code> + の固定フォーマットを使っています。 + <code class="directive">FileETag</code> で <code>ETag</code> フォーマットを + 変更してしまうと、条件付リクエストでうまく動作しなくなります。 + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Files" id="Files"><Files></a> <a name="files" id="files">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>マッチするファイル名に適用されるディレクティブを囲む</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Files <var>filename</var>> ... </Files></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><Files></code> ディレクティブは、 + その中にあるディレクティブの適用範囲をファイル名で制限します。 + <code class="directive"><a href="#directory"><Directory></a></code> ディレクティブや <code class="directive"><a href="#location"><Location></a></code> ディレクティブと + 同じような機能を持ちます。 + これは、<code></Files></code> ディレクティブと対に + なっていなければなりません。 + このセクション中のディレクティブは、ベース名 (ファイル名の最後の部分) + が指定されたファイル名にマッチするすべてのオブジェクトに適用されます。 + <code class="directive"><Files></code> セクションは + <code class="directive"><Directory></code> セクションと + <code>.htaccess</code> が読み込まれた後、 + <code class="directive"><Location></code> セクションよりは先に + 設定ファイルに現れた順に適用されます。 + <code class="directive"><Files></code> は、 + <code class="directive"><Directory></code> セクション内に + ネストさせることができ、 + ファイルシステムの一部にのみ限定して適用させることができます。</p> + + <p><var>filename</var> 引数は、ファイル名かワイルドカード文字列 + で、ワイルドカードでは <code>?</code> は一つの文字、<code>*</code> は任意の文字列にマッチします。 + <code>~</code> という文字を付加することで<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>を使うこともできます。 + 例えば、</p> + + <div class="example"><p><code> + <Files ~ "\.(gif|jpe?g|png)$"> + </code></p></div> + + <p>とすることにより、一般的なインターネットの画像フォーマットにマッチします。 + ただし、 + <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> を使う方が + 推奨されています。</p> + + <p>ちなみに、<code class="directive"><a href="#directory"><Directory></a></code> と <code class="directive"><a href="#location"><Location></a></code> セクションとは異なり、 + <code class="directive"><Files></code> + は <code>.htaccess</code> ファイル内で利用することができます。 + これにより、ユーザがファイル毎にアクセスの制御を行なうことができるように + なっています。</p> + + +<h3>参照</h3> +<ul> +<li>リクエストを受けた際にこれらの異なるセクションが + 組み合わされる方法については <a href="../sections.html"> + <Directory>, <Location>, <Files> セクションの動作法</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a> <a name="filesmatch" id="filesmatch">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>正規表現にマッチするファイル名に適用される +ディレクティブを囲む</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><FilesMatch></code> ディレクティブは、 + <code class="directive"><a href="#files"><Files></a></code> + ディレクティブ同様にその中にあるディレクティブの適用範囲をファイル名で制限します。ただし、 + このディレクティブには<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>を指定します。 + 例えば:</p> + + <div class="example"><p><code> + <FilesMatch "\.(gif|jpe?g|png)$"> + </code></p></div> + + <p>は一般的なインターネットの画像形式にマッチします。</p> + +<h3>参照</h3> +<ul> +<li>リクエストを受けた際にこれらの異なるセクションが + 組み合わされる方法については <a href="../sections.html"> + <Directory>, <Location>, <Files> セクションの動作法</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FlushMaxPipelined" id="FlushMaxPipelined">FlushMaxPipelined</a> <a name="flushmaxpipelined" id="flushmaxpipelined">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Maximum number of pipelined responses above which they are flushed +to the network</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>FlushMaxPipelined <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>FlushMaxPipelined 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.4.47 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FlushMaxThreshold" id="FlushMaxThreshold">FlushMaxThreshold</a> <a name="flushmaxthreshold" id="flushmaxthreshold">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Threshold above which pending data are flushed to the +network</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>FlushMaxThreshold <var>number-of-bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>FlushMaxThreshold 65536</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.4.47 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>すべてのマッチするファイルが指定の MIME コンテントタイプで +送られるようにする</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ForceType <var>MIME-type</var>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0 で core に移動</td></tr> +</table> + <p><code>.htaccess</code> や <code class="directive"><a href="#directory"><Directory></a></code> セクション、 + <code class="directive"><a href="#location"><Location></a></code> セクション、 + <code class="directive"><a href="#files"><Files></a></code> セクションに + 書かれた場合、このディレクティブはそこにあるすべてのファイルが + <var>MIME-type</var> + で指定されたコンテントタイプとして扱われるようにします。たとえば、 + GIF ファイルばかりのディレクトリがあって、すべてのファイルを <code>.gif</code> + で終わらせたくはないときに、以下のものを使用します:</p> + + <div class="example"><p><code> + ForceType image/gif + </code></p></div> + + <p><code class="directive"><a href="#defaulttype">DefaultType</a></code> と違って + このディレクティブはメディアタイプを決めることができるかもしれない + ファイルの拡張子も含め、すべての MIME タイプの関連付けを + 上書きすることに注意してください。</p> + + <p><code>None</code> という値を使うことで <code class="directive">ForceType</code> の + 設定を無効にできます:</p> + + <div class="example"><p><code> + # force all files to be image/gif:<br /> + <Location /images><br /> + <span class="indent"> + ForceType image/gif<br /> + </span> + </Location><br /> + <br /> + # but normal mime-type associations here:<br /> + <Location /images/mixed><br /> + <span class="indent"> + ForceType None<br /> + </span> + </Location> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Directory to write gmon.out profiling data to. </td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントの IP アドレスの DNS ルックアップを +有効にする</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>HostnameLookups Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>このディレクティブは、ホスト名をログ収集できるように + DNS ルックアップを有効にします + (さらに、CGI/SSI に <code>REMOTE_HOST</code> 変数として渡します)。 + <code>Double</code>を指定した場合、2 重の逆引きを行ないます。 + つまり、逆引きの後に、その結果に対して正引きを行ないます。正引きの + 結果の IP アドレスの中にオリジナルのアドレスと一致するものがなければ + なりません。("tcpwrappers" の用語では <code>PARANOID</code> と呼ばれています。)</p> + + <p><code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> でホスト名によるアクセス + 制御を行なう場合には、 + 設定の如何によらず 2 重の逆引きが実行されます。 + これは、セキュリティを保つために必要です。 + <code>HostnameLookups Double</code> を設定しない限り、 + 他の部分はこの 2 重逆引きの結果を使うことはできません。 + 例えば、<code>HostnameLookups On</code> と設定してある状態で、 + ホスト名によるアクセス制限を行なったオブジェクトへの + リクエストを受けたとすると、2 重の逆引きが成功するか否かによらず、 + <code>REMOTE_HOST</code> には通常の逆引き結果が渡されます。</p> + + <p>ディレクティブのデフォルトは + 本当に逆引きを必要としているわけではないサイトの + ネットワークトラフィックを低減させるために、<code>Off</code> になっています。 + ルックアップによる余計な遅延がなくなるため、 + エンドユーザにとっても良いでしょう。 + DNS のルックアップには、かなりの時間が必要となる場合が多く、 + 負荷の高いサイトではこのディレクティブは <code>Off</code> にすべきです。 + なお、<var>/support</var> ディレクトリに含まれ、デフォルトでは + インストールディレクトリの <code>bin</code> サブディレクトリに + インストールされる <code class="program"><a href="../programs/logresolve.html">logresolve</a></code> ユーティリティにより、 + Apache の動作とは別に、ログに残されている IP アドレスからホスト名を + ルックアップすることが可能です。</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="HttpProtocolOptions" id="HttpProtocolOptions">HttpProtocolOptions</a> <a name="httpprotocoloptions" id="httpprotocoloptions">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Modify restrictions on HTTP Request Messages</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>HttpProtocolOptions Strict LenientMethods Allow0.9</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.2.32 or 2.4.24 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="If" id="If"><If></a> <a name="if" id="if">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>実行時、リクエストが条件を満たした場合にのみ適用される +ディレクティブを包含する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><If></code> ディレクティブは + 実行時に式を評価し、条件式が真になるときにのみ + 内包するディレクティブを適用します。 + 例えば</p> + + <div class="example"><p><code> + <If "$req{Host} = ''"> + </code></p></div> + + <p>上記例は <var>Host:</var> ヘッダの存在しない HTTP/1.0 のリクエストに + マッチします。</p> + +<h3>参照</h3> +<ul> +<li><a href="../sections.html">どのように <Directory>, <Location>, + <Files> セクションが動作するか</a> では、リクエストを受けたときに、 + これらの異なるセクションがどのように組み合わさるかについて記載されています。 + <code class="directive"><If></code> は + <code class="directive"><Files></code> + と同じ処理順と用法になっています。</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a> <a name="ifdefine" id="ifdefine">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>起動時にテストが真であるときのみに処理されるディレクティブを +囲む</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ... + </IfDefine></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code><IfDefine <var>test</var>>...</IfDefine></code> + セクションは、 + ディレクティブを条件付きで指定するために利用します。 + <code class="directive"><IfDefine></code> セクションに + 含まれるディレクティブは、<var>test</var>が + 定義されているときのみ処理されます。 + もし <var>test</var> が定義されていなければ、 + 開始と終了の指定の間のディレクティブは無視されます。</p> + + <p><code class="directive"><IfDefine></code> セクションディレクティブに + 指定する <var>test</var> は、 + 次の二つの形式のうちの一つをとります:</p> + + <ul> + <li><var>parameter-name</var></li> + + <li><code>!</code><var>parameter-name</var></li> + </ul> + + <p>前者の場合には、<var>parameter-name</var> と名付けられたパラメータが + 定義されていれば開始と終了の間のディレクティブが処理されます。 + 後者の場合は逆で、<em>parameter-name</em> が指定されて<strong>いない</strong> + 場合に処理されます。</p> + + <p><var>parameter-name</var> 引数は、サーバを起動する際に + <code class="program"><a href="../programs/httpd.html">httpd</a></code> のコマンドラインに + <code>-D<var>parameter</var></code> という形で指定するか + あるいは <code class="directive"><a href="#define">Define</a></code> + ディレクティブで指定されると定義されます。 </p> + + <p><code class="directive"><IfDefine></code> セクションは + 入れ子にすることができ、複数のパラメータによるテストをするために使用できます。 + 例:</p> + + <div class="example"><p><code> + httpd -DReverseProxy -DUseCache -DMemCache ...<br /> + <br /> + # httpd.conf<br /> + <IfDefine ReverseProxy><br /> + <span class="indent"> + LoadModule proxy_module modules/mod_proxy.so<br /> + LoadModule proxy_http_module modules/mod_proxy_http.so<br /> + <IfDefine UseCache><br /> + <span class="indent"> + LoadModule cache_module modules/mod_cache.so<br /> + <IfDefine MemCache><br /> + <span class="indent"> + LoadModule mem_cache_module modules/mod_mem_cache.so<br /> + </span> + </IfDefine><br /> + <IfDefine !MemCache><br /> + <span class="indent"> + LoadModule cache_disk_module modules/mod_cache_disk.so<br /> + </span> + </IfDefine> + </span> + </IfDefine> + </span> + </IfDefine> + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfDirective" id="IfDirective"><IfDirective></a> <a name="ifdirective" id="ifdirective">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific directive</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfDirective [!]<var>directive-name</var>> ... + </IfDirective></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#ifsection"><IfSection></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfFile" id="IfFile"><IfFile></a> <a name="iffile" id="iffile">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Encloses directives that will be processed only +if file exists at startup</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfFile [!]<var>filename</var>> ... + </IfFile></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a> <a name="ifmodule" id="ifmodule">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>モジュールの存在するかしないかに応じて処理される +ディレクティブを囲む</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ... + </IfModule></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>モジュール識別子はバージョン 2.1 以降で使用可能。</td></tr> +</table> + <p><code><IfModule <var>test</var>>...</IfModule></code> + セクションは、モジュールが存在するときに処理されるディレクティブを + 指定するために利用します。 + <code class="directive"><IfModule></code> セクションに + 含まれるディレクティブは、<var>test</var> + で指定するモジュールが組み込まれているときのみ処理されます。 + もし <var>test</var> が組み込まれていなければ、開始と終了の間のディレクティブ + は無視されます。</p> + + <p><code class="directive"><IfModule></code> セクションディレクティブに + 指定する <var>test</var> は、 + 次の二つの形式のうちの一つをとります。</p> + + <ul> + <li><var>module</var></li> + + <li>!<var>module</var></li> + </ul> + + <p>前者の場合は、<var>module</var> と名付けられたモジュールが + Apache に組み込まれていれば + (コンパイル済みのものと、<code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code> を利用して + 動的に読み込んだものの両方)、 + 開始と終了の間のディレクティブが処理されます。 + 後者の場合は逆で、<var>module</var> が組み込まれて<strong>いない</strong> + 場合に処理されます。</p> + + <p><var>module</var> 引数は、モジュール識別子か + コンパイルをした時のモジュールのファイル名です。 + 例えば、<code>rewrite_module</code> は識別子で + <code>mod_rewrite.c</code> はファイル名です。 + モジュールが複数のソースファイルから構成されている場合は、文字列 + <code>STANDARD20_MODULE_STUFF</code> があるファイルの名前を + 使ってください。</p> + + <p><code class="directive"><IfModule></code> セクションは + 入れ子にすることが可能であり、 + 複数のモジュールのテストを行なうために使用できます。</p> + + <div class="note">特定のモジュールの存在に関わらず動作する + 設定ファイルの原本が必要なときにのみこのセクションを使用してください。 + 通常の動作では、ディレクティブを + <code class="directive"><IfModule></code> セクションの中に + 入れる必要はありません。</div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfSection" id="IfSection"><IfSection></a> <a name="ifsection" id="ifsection">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Encloses directives that are processed conditional on the +presence or absence of a specific section directive</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfSection [!]<var>section-name</var>> ... + </IfSection></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in 2.4.34 and later.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#ifdirective"><IfDirective></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバ設定ファイル中から他の設定ファイルを取り込む</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>ワイルドカードによるマッチは 2.0.41 以降で使用可能</td></tr> +</table> + <p>このディレクティブにより、サーバの設定ファイルから + 他の設定ファイルをインクルードすることができます。</p> + + <p>複数のファイルをアルファベット順に一度に読み込むために、 + シェル形式 (<code>fnmatch</code>) のワイルドカード文字を使うことができます。 + さらに、<code class="directive">Include</code> にディレクトリを指定した場合は、 + ディレクトリとそのサブディレクトリ内の全てのファイルを + アルファベット順に読み込んで、設定ファイルとして処理します。 + しかし、ディレクトリ全体を読み込むのはお勧めできません。 + ふとしたことから <code>httpd</code> が読み込みに失敗するような + 一時ファイルをディレクトリに残してしまうようなことがよくあるからです。</p> + + <p>指定するファイルパスは絶対パスか、 + <code class="directive"><a href="#serverroot">ServerRoot</a></code> ディレクトリからの + 相対パスか、のどちらかです。</p> + + <p>例:</p> + + <div class="example"><p><code> + Include /usr/local/apache2/conf/ssl.conf<br /> + Include /usr/local/apache2/conf/vhosts/*.conf + </code></p></div> + + <p><code class="directive"><a href="#serverroot">ServerRoot</a></code> からの相対パスの場合は:</p> + + <div class="example"><p><code> + Include conf/ssl.conf<br /> + Include conf/vhosts/*.conf + </code></p></div> + +<h3>参照</h3> +<ul> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Includes other configuration files from within +the server configuration files</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in 2.3.6 and later. Not existent file paths without wildcards + do not cause SyntaxError after 2.4.30</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#include">Include</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>HTTP の持続的な接続を有効にする</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>KeepAlive On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>KeepAlive On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>HTTP/1.0 の Keep-Alive 拡張と HTTP/1.1 の持続的接続の機能は、 + 複数のリクエストが同じ TCP の接続で送られる、長時間持続する + HTTP セッションを提供します。たくさんの画像が + 含まれる HTML ドキュメントでは場合によっては遅延時間が 50% 短縮される結果も + でています。Keep-Alive 接続を有効にするには + <code>KeepAlive On</code> と設定します。</p> + + <p>HTTP/1.0 に対応したクライアントの際には、 + クライアントより特に要求があった場合のみ Keep-Alive 接続となります。 + さらに、HTTP/1.0 クライアントでは、コンテンツの容量が先に + (訳注: 要求に対して応答を返す前に) わかる場合のみ Keep-Alive + 接続を利用できます。 + これは、CGI の出力や SSI のページ、 + サーバが生成したディレクトリのリストのような動的コンテンツを + HTTP/1.0 クライアントに送る場合には Keep-Alive 接続を使えないことを意味します。 + HTTP/1.1 に対応したクライアントの際には、 + 特に指定されない限りはデフォルトとして持続的な接続が行なわれます。 + クライアントが要求すれば、コンテンツの容量を判別できないものを + 持続的な接続を通して送るために、チャンクエンコーディングが用いられます。</p> + + <p>クライアントが Keep-Alive コネクションを使用している場合、 + そのコネクションを通してどれだけたくさんのリクエストが処理されても、 + それは「リクエスト」1 つとして、MaxRequestsPerChild ディレクティブでは + 数えられます。</p> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>持続的な接続で次のリクエストが来るまでサーバが待つ時間</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>KeepAliveTimeout <var>seconds</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>KeepAliveTimeout 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>接続を閉じる前に、Apache が次のリクエストを何秒待つかを指定します。 + リクエストを受け付けた後は、<code class="directive"><a href="#timeout">Timeout</a></code> ディレクティブによって + 指定されたタイムアウト値が使われます。</p> + + <p><code class="directive">KeepAliveTimeout</code> を大きな値に設定すると、 + 負荷の高いサーバにおいてはパフォーマンスの問題を引き起こす場合があります。 + タイムアウトが長ければ長いほど、より多くのサーバプロセスが + 活性でないクライアントからの接続の終了を待ち続けることになります。</p> + + <p>名前ベースのバーチャルホストコンテキストでは、 + <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> + のセットの中で最初に定義されたバーチャルホストの値 + (デフォルトホスト) が使われます。 + その他の値は無視されます。</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>囲いの中にあるアクセス制御の適用を特定の HTTP メソッドのみに +制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ... + </Limit></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>アクセス制御は、通常<strong>全ての</strong>アクセスメソッドに対して + 影響し、普通はこれが望ましい挙動です。 + <strong>そうしたことから、大部分の場合にはアクセス制御に関わるディレクティブを + <code class="directive"><Limit></code> セクション内に + 書くべきではありません。 </strong></p> + + <p><code class="directive"><Limit></code> ディレクティブの + 目的は、アクセス制御の範囲を + 指定された HTTP メソッドに限定するためです。 + それ以外のメソッドは、<code class="directive"><Limit></code> で囲われたアクセス制御の + <strong>影響を受けません</strong>。 + 以下の例は、<code>POST</code>, <code>PUT</code>, <code>DELETE</code> のメソッドに対してのみアクセスの制御を行ない、 + それ以外のメソッドについては制限しません:</p> + + <div class="example"><p><code> + <Limit POST PUT DELETE><br /> + <span class="indent"> + Require valid-user<br /> + </span> + </Limit> + </code></p></div> + + <p>メソッド名には以下の中から一つ以上を列挙することができます: + <code>GET</code>, + <code>POST</code>, <code>PUT</code>, <code>DELETE</code>, + <code>CONNECT</code>, <code>OPTIONS</code>, + <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>, + <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>, + <code>LOCK</code>, <code>UNLOCK</code>. <strong>メソッド名は + 大文字小文字を区別します。</strong> <code>GET</code> を指定した場合には + <code>HEAD</code> リクエストにも制限がかかります。<code>TRACE</code> + メソッドに制限をかけることはできません + (<code class="directive"><a href="#traceenable"><TraceEnable></a></code> 参照)。</p> + + <div class="warning">アクセス制御が目的の場合は + <code class="directive"><a href="#limit"><Limit></a></code> + セクションの代わりに <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> セクションを使用した方が良いでしょう。 + <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> + セクションでは不特定のメソッドに対しても防御できるからです。</div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>指定されたもの以外の HTTP メソッドにアクセス制御を +制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ... + </LimitExcept></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><LimitExcept></code> と + <code></LimitExcept></code> は、引数に + <strong>含まれていない</strong> + HTTP のアクセスメソッドに適用するためのアクセス制御 + ディレクティブを括るために利用します。 + つまり、<code class="directive"><a href="#limit"><Limit></a></code> セクションの反対の動作をし、 + 標準のメソッドと標準外や未認識のメソッドの場合の両方を設定できます。 + <code class="directive"><a href="#limit"><Limit></a></code> のドキュメントも + 併せて参照してください。</p> + + <p>例:</p> + + <div class="example"><p><code> + <LimitExcept POST GET><br /> + <span class="indent"> + Require valid-user<br /> + </span> + </LimitExcept> + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>内部リダイレクトと入れ子になったサブリクエストの最大数を決定する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitInternalRecursion 10</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.47 以降で使用可能</td></tr> +</table> + <p>内部リダイレクトは例えば <code class="directive">Action</code> ディレクティブを + 使っているときに起こります。<code class="directive">Action</code> ディレクティブは + 元々のリクエストを CGI スクリプトに内部リダイレクトを行ないます。 + サブリクエストはいくつかの URI に対して、リクエストされたときに + 何が起こるかを調べるための Apache の機構です。例えば、<code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> + は <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> ディレクティブ + がリストするファイルを調べるためにサブリクエストを使います。</p> + + <p><code class="directive">LimitInternalRecursion</code> は内部リダイレクトや + サブリクエストが無限ループに陥ったときのサーバクラッシュを防ぎます。 + 普通、そのようなループは設定に失敗したときに発生します。</p> + + <p>このディレクティブは、リクエスト毎に評価される、二つの違う限界値を + 設定します。最初の <var>number</var> は、起こり得る + 内部リクエストの最大値を設定します。二つめの <var>number</var> は + サブリクエストが入れ子にできる深さを設定します。<var>number</var> を + 一つだけ指定したときは、両方の限界値にその値が設定されます。</p> + + <div class="example"><h3>例</h3><p><code> + LimitInternalRecursion 5 + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントから送られる HTTP リクエストのボディの +総量を制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitRequestBody 0</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>このディレクティブは、リクエストボディに許されるバイト数、<var>bytes</var> + を 0 (無制限を意味します) から 2147483647 (2GB) までの数値で指定します。</p> + + <p><code class="directive">LimitRequestBody</code> ディレクティブは、 + ディレクティブが書かれたコンテキスト + (サーバ全体、ディレクトリ、ファイル、ロケーション) 内で + 許容する HTTP リクエストメッセージボディのサイズに制限をかけることができます。 + クライアントのリクエストがその制限値を越えていれば、 + サーバはリクエストを処理せずにエラーを返します。 + 普通のリクエストメッセージボディのサイズは、リソースの種類や + 許可されているメソッドによって大きく変わります。 + CGI スクリプトは、よく情報を受信するために + メッセージボディを使います。 + <code>PUT</code> メソッドの実装は、このディレクティブの値として + 少なくともあるリソースに対してサーバが受け付けようとする + 表現の大きさほどの値を必要とします。</p> + + <p>このディレクティブは、 + 管理者にクライアントからの異常なリクエストを制御できるようにし、 + 何らかの形のサービス拒否攻撃 (訳注:DoS) を避けるのに有効です。</p> + + <p>ある場所へのファイルアップロードを許可する場合に、 + アップロードできるファイルのサイズを 100K に制限したければ、 + 以下のように指定します:</p> + + <div class="example"><p><code> + LimitRequestBody 102400 + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントからの HTTP リクエストのヘッダフィールドの数を +制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitRequestFields 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><var>number</var> には、0 (無制限を意味します) から 32767 + までの整数を指定します。 + デフォルト値は、定数 <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> + によりコンパイル時に定義されます (配布時には 100 と指定されています)。</p> + + <p><code class="directive">LimitRequestBody</code> ディレクティブは、 + サーバ管理者が HTTP リクエスト中において許可するリクエストヘッダフィールド数を + 指定します。 + サーバはこの値には通常のクライアントからのリクエストに含まれるであろう + フィールドの数より大きな値が必要とします。 + クライアントにより使われた要求ヘッダーフィールドの数が + 20 を超えることはほとんどありませんが、 + これは種々のクライアントの実装によって変わり、 + 詳細なコンテントネゴシエーションをするためのブラウザの設定までにも + 影響されることがあります。 + オプションの HTTP 拡張はリクエストヘッダフィールドを使って表される場合が + 多くあります。</p> + + <p>このディレクティブは、 + 管理者にクライアントからの異常なリクエストを制御できるようにし、 + 何らかの形のサービス拒否攻撃 (訳注:DoS) を避けるのに有効です。 + リクエストのフィールドが多過ぎることを意味するエラー応答が + 普通のクライアントに返されるような時はこの値を増やしてください。</p> + + <p>例:</p> + + <div class="example"><p><code> + LimitRequestFields 50 + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントからの HTTP リクエストのヘッダの +サイズを制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>このディレクティブは、HTTP リクエストヘッダ一つで受付ける + バイト数 <var>bytes</var> を指定します。</p> + + <p><code class="directive">LimitRequestFieldSize</code> ディレクティブは、 + HTTP リクエストヘッダで許容されるサイズを増減させることができます。 + サーバは、このディレクティブの値として、 + 一般的なクライアントからリクエストが送られた際に、そのリクエストに + 付属しているどのヘッダフィールドについても、 + 十分足りる大きさになっていなければなりません。 + 一般的なリクエストヘッダのサイズといっても、その大きさは個々の + クライアントの実装によって大きく異なり、 + 詳細なコンテントネゴシエーションをサポートするかどうかの、 + ブラウザの設定にも影響されたりします。 + SPNEGO 認証ヘッダでは 12392 バイトにまで及ぶことすらあります。</p> + + <p>このディレクティブは、 + 管理者にクライアントからの異常なリクエストを制御できるようにし、 + 何らかの形のサービス拒否攻撃 (訳注:DoS) を避けるのに有効です。</p> + + <p>例:</p> + + <div class="example"><p><code> + LimitRequestFieldSize 4094 + </code></p></div> + + <div class="note">通常はデフォルトから変更する必要はありません。</div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントからの HTTP リクエスト行のサイズを制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitRequestLine 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>このディレクティブは、HTTP リクエスト行内で許容されるバイト数 + <var>bytes</var> を指定します。</p> + + <p><code class="directive">LimitRequestLine</code> ディレクティブにより、 + クライアントからの HTTP リクエスト行の許容サイズを増減できます。 + リクエスト行は、HTTPメソッド、URI、プロトコルバージョンから成っており、 + <code class="directive">LimitRequestLine</code> はサーバへのリクエストに対して + 許容するリクエスト URI の長さを制限することになります。 + サーバは、<code>GET</code> リクエストのクエリ部分も含めて、リソースの名前が入るに足る + 大きさを必要とします。</p> + + <p>このディレクティブは、 + 管理者にクライアントからの異常なリクエストを制御できるようにし、 + 何らかの形のサービス拒否攻撃 (訳注:DoS) を避けるのに有効です。</p> + + <p>例:</p> + + <div class="example"><p><code> + LimitRequestLine 4094 + </code></p></div> + + <div class="note">通常はデフォルトから変更する必要はありません。</div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>XML 形式のリクエストのボディのサイズを制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>XML 形式のリクエストのボディの最大値を (バイト単位で) 制限します。 + 値に <code>0</code> を指定するとチェックを無効にします。</p> + + <p>例:</p> + + <div class="example"><p><code> + LimitXMLRequestBody 0 + </code></p></div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Location" id="Location"><Location></a> <a name="location" id="location">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>囲んだディレクティブをマッチする URL のみに適用</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Location + <var>URL-path</var>|<var>URL</var>> ... </Location></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><Location></code> ディレクティブは、 + URL により中に書かれたディレクティブの適用範囲を制限します。 + <code class="directive"><a href="#directory"><Directory></a></code> + ディレクティブと似ていて、 + <code></Location></code> ディレクティブで終了する + サブセクションを開始します。 + <code class="directive"><Location></code> セクションは、 + <code class="directive"><a href="#directory"><Directory></a></code> セクションと + <code>.htaccess</code> の読み込みの後、 + <code class="directive"><a href="#files"><Files></a></code> セクションを + 適用した後に、設定ファイルに現れた順に処理されます。</p> + + <p><code class="directive"><Location></code> セクションは + 完全にファイルシステムと関連せずに動作します。このことから導かれる + 結果にはいくつか注意する点があります。最も重要なものは、 + ファイルシステムの位置へのアクセス制御に <code class="directive"><Location></code> ディレクティブを使うべきではない + ということです。複数の URL がファイルシステムの同じ位置にマップされる + 可能がありますので、そのようなアクセス制御は回避されてしまう可能性が + あります。</p> + + <div class="note"><h3>いつ <code class="directive"><Location></code> を使うか</h3> + + <p><code class="directive"><Location></code> ディレクティブは + ファイルシステム外のコンテンツにディレクティブを適用するときに + 使用してください。ファイルシステムに存在するコンテンツに対しては、 + <code class="directive"><a href="#directory"><Directory></a></code> と <code class="directive"><a href="#files"><Files></a></code> を使ってください。 + 例外は、<code><Location /></code> で、これはサーバ全体に対して + 設定を適用する簡単な方法です。</p> + </div> + + <p>全ての (プロキシ以外の) リクエストに対し、 + URL は <code>/path/</code> という、 + 接頭辞 <code>http://servername</code> を含まない形でマッチします。 + プロキシリクエストの場合には、<code>scheme://servername/path</code> + という接頭辞を含む形でマッチし、接頭辞を含めて指定する必要があります。</p> + + <p>URL にはワイルドカードを利用することができます。 + <code>?</code> は任意の一文字、<code>*</code> は任意の文字列にマッチします。 + どちらのワイルドカードも URL パス中の / にはマッチしません。</p> + + <p><code>~</code> という文字を追加することで、<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>を + 利用することもできます。 + 例えば:</p> + + <div class="example"><p><code> + <Location ~ "/(extra|special)/data"> + </code></p></div> + + <p>は URL に <code>/extra/data</code> か <code>/special/data</code> という文字列が + 含まれている場合にマッチします。 + <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> ディレクティブは + <code class="directive"><Location></code> の正規表現 + 版とまったく同じ動作をします。</p> + + <p><code class="directive"><Location></code> 機能は、<code class="directive"><a href="#sethandler">SetHandler</a></code> ディレクティブと + 組合わせて利用すると特に便利です。 + 例えば、<code>example.com</code> のブラウザからのみステータスの参照を有効にしたければ、 + 次のようにすれば良いでしょう。</p> + + <div class="example"><p><code> + <Location /status><br /> + <span class="indent"> + SetHandler server-status<br /> + Order Deny,Allow<br /> + Deny from all<br /> + Allow from .example.com<br /> + </span> + </Location> + </code></p></div> + +<div class="note"><h3>/ (スラッシュ) に関する注</h3> + <p>スラッシュ文字は、URL 内に現れる場所に応じて変化する + 特別な意味を持っています。 + ファイルシステムにおいて利用する場合には複数のスラッシュでも一つの + スラッシュとして扱われることが多いですが、 + (<em>すなわち</em>、<code>/home///foo</code> は + <code>/home/foo</code> と同じといったように) + URL においては必ずしもそうなるわけではありません。 + <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> + ディレクティブや正規表現を利用した + <code class="directive"><Location></code> ディレクティブで、 + 複数のスラッシュにマッチさせたいときには、明示的に記述する + 必要があります。</p> + + <p>例えば、<code><LocationMatch ^/abc></code> は、 + <code>/abc</code> というリクエスト URL にマッチしますが、 + <code>//abc</code> というリクエスト URL にはマッチしません。 + (正規表現でない) <code class="directive"><Location></code> + ディレクティブは、 + proxy リクエストに対して利用する際には同様の振る舞いをしますが、 + (正規表現でない) <code class="directive"><Location></code> を proxy + でないリクエストに対して利用する際には、 + 一つのスラッシュで複数のスラッシュにマッチします。 + 例えば、<code><Location /abc/def></code> と指定し、 + <code>/abc//def</code> というリクエストがあれば、 + マッチすることになります。</p></div> + + +<h3>参照</h3> +<ul> +<li>リクエストを受けた際にこれらの異なるセクションが + 組み合わされる方法については <a href="../sections.html"> + <Directory>, <Location>, <Files> セクションの動作法</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>囲んだディレクティブを正規表現にマッチする URL のみに +適用</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><LocationMatch + <var>regex</var>> ... </LocationMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><LocationMatch></code> ディレクティブは、 + <code class="directive"><a href="#location"><Location></a></code> と同じ様に + URL により中に書かれたディレクティブの適用範囲を制限します。 + 但し、引数は普通の文字列ではなく、<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>となります。 + 例えば、</p> + + <div class="example"><p><code> + <LocationMatch "/(extra|special)/data"> + </code></p></div> + + <p>は URL に <code>/extra/data</code> か <code>/special/data</code> + という文字列が含まれている場合にマッチします。</p> + +<h3>参照</h3> +<ul> +<li>リクエストを受けた際にこれらの異なるセクションが + 組み合わされる方法については <a href="../sections.html"> + <Directory>, <Location>, <Files> セクションの動作法</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ErrorLog の冗長性を制御する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LogLevel <var>level</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LogLevel warn</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">LogLevel</code> は、エラーログ (<code class="directive"><a href="#errorlog">ErrorLog</a></code> ディレクティブを + 見てください) へ記録するメッセージの冗長性を調整します。 + 以下の <var>level</var> を指定でき、順に重要度が下がっていきます。</p> + + <table class="bordered"> + <tr> + <th><strong>レベル</strong> </th> + + <th><strong>説明</strong> </th> + + <th><strong>例</strong> </th> + </tr> + + <tr> + <td><code>emerg</code> </td> + + <td>緊急 - システムが利用できない</td> + + <td>Child cannot open lock file. Exiting + (子プロセスがロックファイルを開けないため終了した)</td> + </tr> + + <tr> + <td><code>alert</code> </td> + + <td>直ちに対処が必要</td> + + <td>getpwuid: couldn't determine user name from uid + (getpwuid: UID からユーザ名を特定できなかった)</td> + </tr> + + <tr> + <td><code>crit</code> </td> + + <td>致命的な状態</td> + + <td>socket: Failed to get a socket, exiting child + (socket: ソケットが得られないため、子プロセスを終了させた)</td> + </tr> + + <tr> + <td><code>error</code> </td> + + <td>エラー</td> + + <td>Premature end of script headers + (スクリプトのヘッダが足りないままで終わった)</td> + </tr> + + <tr> + <td><code>warn</code> </td> + + <td>警告</td> + + <td>child process 1234 did not exit, sending another SIGHUP + (子プロセス 1234 が終了しなかった。もう一度 SIGHUP を送る)</td> + </tr> + + <tr> + <td><code>notice</code> </td> + + <td>普通だが、重要な情報</td> + + <td>httpd: caught SIGBUS, attempting to dump core in ... + (httpd: SIGBUS シグナルを受け、... へコアダンプをした)</td> + </tr> + + <tr> + <td><code>info</code> </td> + + <td>追加情報</td> + + <td>"Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..." (「サーバは負荷が高い、 + (StartServers や Min/MaxSpareServers の値を増やす必要があるかも)」)</td> + </tr> + + <tr> + <td><code>debug</code> </td> + + <td>デバッグメッセージ</td> + + <td>"Opening config file ..." (設定ファイルを開いている...)</td> + </tr> + </table> + + <p>特定のレベルが指定された場合、それより高いレベルの全てのメッセージが + 報告されます。 + <em>例えば</em>、<code>LogLevel info</code> に指定すると、 + <code>notice</code> と <code>warn</code> も報告されます。</p> + + <p>なお <code>crit</code> 以上のレベルを指定することが推奨されます。</p> + + <p>例:</p> + + <div class="example"><p><code> + LogLevel notice + </code></p></div> + + <div class="note"><h3>注</h3> + <p>ファイルにログを出力する場合、<code>notice</code> + レベルのメッセージは抑制されず、すべてログに出力されます。 + しかし <code>syslog</code> を使用している場合は、 + これは当てはまりません。</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>持続的な接続上で許可されるリクエストの数</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">MaxKeepAliveRequests</code> ディレクティブは、 + <code class="directive"><a href="#keepalive">KeepAlive</a></code> が有効な場合に、 + 一回の接続で受け付け可能なリクエストの数を制限します。 + <code>0</code> に設定していれば、受け付けるリクエストは無制限になります。 + この設定は、サーバ性能を向上させるために、大きな数値を指定することを勧めます。 + </p> + + <p>例:</p> + + <div class="example"><p><code> + MaxKeepAliveRequests 500 + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Number of overlapping ranges (eg: <code>100-200,150-300</code>) allowed before returning the complete + resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Number of range reversals (eg: <code>100-200,50-70</code>) allowed before returning the complete + resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxRangeReversals default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MaxRangeReversals 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Number of ranges allowed before returning the complete +resource </td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MaxRanges default | unlimited | none | <var>number-of-ranges</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MaxRanges 200</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MergeSlashes" id="MergeSlashes">MergeSlashes</a> <a name="mergeslashes" id="mergeslashes">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Controls whether the server merges consecutive slashes in URLs. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MergeSlashes ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MergeSlashes ON</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Added in 2.4.39</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a> <a name="mergetrailers" id="mergetrailers">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Determines whether trailers are merged into headers</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>MergeTrailers [on|off]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>MergeTrailers off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.4.11 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Configures mutex mechanism and lock file directory for all +or specified mutexes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>Mutex default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>名前ベースのバーチャルホストのための IP アドレスを指定</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">NameVirtualHost</code> ディレクティブは、 + <a href="../vhosts/">名前ベースのバーチャルホスト</a>の設定を行ないたい場合に + 必要となるものです。</p> + + <p><var>addr</var> にはホスト名を指定できますが、 + 常に IP アドレスを指定するのが推奨されます。 + 例えば、</p> + + <div class="example"><p><code> + NameVirtualHost 111.22.33.44 + </code></p></div> + + <p><code class="directive">NameVirtualHost</code> ディレクティブは、 + 名前ベースのバーチャルホストを + 利用してリクエストを受け付ける IP アドレスを指定します。 + これは、普通は名前ベースのバーチャルホストアドレスです。 + ただし、ファイアーウォールや他のプロキシがリクエストを受け付け、 + 違う IP アドレスのサーバにフォワードするという場合は、 + リクエストを提供したいマシン上の物理インターフェースの + IP アドレスを指定する必要があります。 + 複数のアドレスで複数の名前ベースのバーチャルホストを指定する場合は + 各アドレスに対してディレクティブを書いてください。</p> + + <div class="note"><h3>中</h3> + <p>「主サーバ」や、どの <code>_default_</code> サーバも、 + <code class="directive">NameVirtualHost</code> で指定した IP アドレスへのリクエスト + を処理することは<strong>ありません</strong> (なぜか + <code class="directive">NameVirtualHost</code> を + 指定したけどそのアドレスに <code class="directive">VirtualHost</code> を定義しなかった場合を除く)。</p> + </div> + + <p>名前ベースのバーチャルホストにポート番号を指定することも可能です。 + 例えば</p> + + <div class="example"><p><code> + NameVirtualHost 111.22.33.44:8080 + </code></p></div> + + <p>IPV6 のアドレスは次の例のように角括弧で囲む必要があります:</p> + + <div class="example"><p><code> + NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080 + </code></p></div> + + <p>すべてのインタフェースへのリクエストを受け取るようにするためには、 + 引数として <code>*</code> を使います。</p> + + <div class="example"><p><code> + NameVirtualHost * + </code></p></div> + + <div class="note"><h3><code class="directive"><VirtualHost></code> ディレクティブの引数</h3> + <p><code class="directive"><VirtualHost></code> ディレクティブの引数は <code class="directive">NameVirtualHost</code> ディレクティブの引数に正確に + 合っている必要があることに注意してください。</p> + + <div class="example"><p><code> + NameVirtualHost 1.2.3.4<br /> + <VirtualHost 1.2.3.4><br /> + # ...<br /> + </VirtualHost><br /> + </code></p></div> + </div> + + +<h3>参照</h3> +<ul> +<li><a href="../vhosts/">バーチャルホスト説明書 +</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ディレクトリに対して使用可能な機能を設定する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Options + [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>Options All</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">Options</code> ディレクティブは、特定のディレクトリに対して + どの機能が使用可能かを制御します。</p> + + <p><var>option</var> を <code>None</code>に指定すると、 + 特別な機能は全て無効になります。 + また、以下の示す 1 個以上のものを指定できます。</p> + + <dl> + <dt><code>All</code></dt> + + <dd><code>MultiViews</code> を除いた全ての機能が有効となります。 + これがデフォルトです。</dd> + + <dt><code>ExecCGI</code></dt> + + <dd> + <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> による CGI スクリプトの実行を許可します。</dd> + + <dt><code>FollowSymLinks</code></dt> + + <dd> + サーバが、このディレクトリ内でシンボリックリンクをたどれるようにします。 + <div class="note"><p>サーバがシンボリックリンクをたどる場合でも、 + <code class="directive"><a href="#directory"><Directory></a></code> セクションに + マッチさせるための + パス名は<em>変更されません</em>。</p> + <p><code class="directive"><a href="#location"><Location></a></code> 内に + このオプションを指定しても<strong>無視される</strong>ことに + 注意してください。</p> + <p>このオプションを省略したからといってセキュリティの強化にはなりません。 + なぜなら symlink の検査はレースコンディションを引き起こす可能性があり、 + そのため回避可能になるからです。</p> + </div></dd> + + <dt><code>Includes</code></dt> + + <dd> + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> が提供する SSI を有効にします。</dd> + + <dt><code>IncludesNOEXEC</code></dt> + + <dd> + SSI は有効になりますが、<code>#exec</code> コマンド と <code>#exec CGI</code> は無効になります。 + ただし、<code>#include virtual</code> により、<code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> されたディレクトリで + CGI を実行することは可能です。</dd> + + <dt><code>Indexes</code></dt> + + <dd> + もし、URL がディレクトリにマップするリクエストであって、 + 且つ <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> で指定したファイル (例えば、<code>index.html</code>) が + ディレクトリ内に無ければ、<code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> が + ディレクトリ内の一覧を整形して返します。</dd> + + <dt><code>MultiViews</code></dt> + + <dd> + <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> による + <a href="../content-negotiation.html">コンテントネゴシエーション</a> + された "MultiViews" を許可します。</dd> + + <dt><code>SymLinksIfOwnerMatch</code></dt> + + <dd> + シンボリック先のファイルまたはディレクトリが、 + シンボリックリンクの所有ユーザ ID と同じ場合にのみシンボリックリンクを + たどれるようにします。 + + <div class="note"><h3>注</h3> <p><code class="directive"><a href="#location"><Location></a></code> 内にこのオプションを + 指定しても無視されます。</p> + <p>このオプションはセキュリティの強化にはなりません。 + なぜなら symlink の検査はレースコンディションを引き起こす可能性があり、 + そのため回避可能になるからです。</p> + </div> + </dd> + </dl> + + <p>通常、ディレクトリに対して複数の <code class="directive">Options</code> が + 適用可能な場合、 + 最も近いもの一つのみが適用され、他のものは無視されます。 + 複数の指定がマージされるわけではありません。(<a href="../sections.html#mergin">セクションのマージ方法</a>を参照してください。) + しかし、すべての <code class="directive">Options</code> ディレクティブが <code>+</code> や <code>-</code> 付きで + 指定された場合はオプションの値はマージされます。 + <code>+</code> を頭につければ現在の設定に加えられ、 + <code>-</code> を付ければ現在の設定から削除されます。</p> + + <div class="warning"><h3>警告</h3> + <p><code class="directive">Options</code> で <code>+</code> や + <code>-</code> のついたものを、つけないものと組み合わせて + 指定する構文は正しい構文ではありませんので、期待する結果に + ならないことがあります。</p> + </div> + + <p>例えば、<code>+</code> や <code>-</code> を利用しない場合は:</p> + + <div class="example"><p><code> + <Directory /web/docs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory><br /> + <br /> + <Directory /web/docs/spec><br /> + <span class="indent"> + Options Includes<br /> + </span> + </Directory> + </code></p></div> + + <p><code>/web/docs/spec</code> というディレクトリには、 + <code>Includes</code> だけが適用されます。 + しかし、2 番目の <code class="directive">Options</code> で <code>+</code> や <code>-</code> を利用してみると:</p> + + <div class="example"><p><code> + <Directory /web/docs><br /> + <span class="indent"> + Options Indexes FollowSymLinks<br /> + </span> + </Directory><br /> + <br /> + <Directory /web/docs/spec><br /> + <span class="indent"> + Options +Includes -Indexes<br /> + </span> + </Directory> + </code></p></div> + + <p><code>/web/docs/spec</code> というディレクトリには、 <code>FollowSymLinks</code> と + <code>Includes</code> が適用されます。</p> + + <div class="note"><h3>注</h3> + <p><code>-IncludesNOEXEC</code> もしくは + <code>-Includes</code> を指定すると、 + 前の設定がどのようになっていようとも SSI は無効となります。</p> + </div> + + <p>どのような設定もされていなければ、デフォルトでは <code>All</code> に + なります。</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Protocol for a listening socket</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Protocol <var>protocol</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache 2.1.5 and later. +On Windows, from Apache 2.3.3 and later.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Protocols" id="Protocols">Protocols</a> <a name="protocols" id="protocols">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Protocols available for a server/virtual host</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Protocols <var>protocol</var> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>Protocols http/1.1</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#protocolshonororder">ProtocolsHonorOrder</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ProtocolsHonorOrder" id="ProtocolsHonorOrder">ProtocolsHonorOrder</a> <a name="protocolshonororder" id="protocolshonororder">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Determines if order of Protocols determines precedence during negotiation</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProtocolsHonorOrder On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ProtocolsHonorOrder On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#protocols">Protocols</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="QualifyRedirectURL" id="QualifyRedirectURL">QualifyRedirectURL</a> <a name="qualifyredirecturl" id="qualifyredirecturl">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Controls whether the REDIRECT_URL environment variable is + fully qualified</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>QualifyRedirectURL On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>QualifyRedirectURL Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL On' was configured.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ReadBufferSize" id="ReadBufferSize">ReadBufferSize</a> <a name="readbuffersize" id="readbuffersize">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Size of the buffers used to read data</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ReadBufferSize <var>bytes</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ReadBufferSize 8192</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.4.27 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RegexDefaultOptions" id="RegexDefaultOptions">RegexDefaultOptions</a> <a name="regexdefaultoptions" id="regexdefaultoptions">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Allow to configure global/default options for regexes</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>RegexDefaultOptions [none] [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>RegexDefaultOptions DOTALL DOLLAR_ENDONLY</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Only available from Apache 2.4.30 and later.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a> <a name="registerhttpmethod" id="registerhttpmethod">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Register non-standard HTTP methods</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.4.24 and later</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#httpprotocoloptions">HTTPProtocolOptions</a></code></li> +<li><code class="directive"><a href="../mod/mod_allowmethods.html#allowmethods">AllowMethods</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Apache の子プロセスから起動されたプロセスの CPU 消費量を +制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>未設定。オペレーティングシステムのデフォルトを使用</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>一つか二つのパラメータをとります。 + 最初のパラメータは全プロセスに対するリソースのソフトリミットを設定し、 + 2 番目のパラメータは最大のリソースリミットを設定します。 + パラメータには数字か、オペレーティングシステムの最大となる + <code>max</code> のどちらかを指定することができます。 + 最大のリソースリミットを上げるためには、サーバを + <code>root</code> で実行するか起動されなければいけません。</p> + + <p>ちなみに、この設定は Apache の子プロセス自体ではなく、 + リクエストを受け付けた Apache の子プロセスから fork されたプロセスに + 適用されます。 + これには CGI や SSI から実行されたコマンドが含まれますが、Apache の + 親プロセスから fork されたログのパイププロセスなどには適用されません。</p> + + <p>CPU リソースのリミットはプロセスあたりの秒数で表わされます。</p> + + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Apache の子プロセスから起動されたプロセスのメモリ消費量を +制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>未設定。オペレーティングシステムのデフォルトを使用</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>一つか二つのパラメータをとります。 + 最初のパラメータは全プロセスに対するリソースのソフトリミットを設定し、 + 2 番目のパラメータは最大のリソースリミットを設定します。 + パラメータには数字か、オペレーティングシステムの最大となる + <code>max</code> のどちらかを指定することができます。 + 最大のリソースリミットを上げるためには、サーバを + <code>root</code> で実行するか起動されなければいけません。</p> + + <p>この設定は Apache の子プロセス自体ではなく、 + リクエストを受け付けた Apache の子プロセスから fork されたプロセスに + 適用されます。 + これには CGI や SSI から実行されたコマンドが含まれますが、Apache の + 親プロセスから fork されたログのパイププロセスなどには適用されません。</p> + + <p>メモリリソースのリミットはプロセスあたりのバイト数で表わされます。</p> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Apache の子プロセスから起動されたプロセスが起動するプロセスの +数を制限する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>未設定。オペレーティングシステムのデフォルトを使用</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>一つか二つのパラメータをとります。 + 最初のパラメータは全プロセスに対するリソースのソフトリミットを設定し、 + 2 番目のパラメータは最大のリソースリミットを設定します。 + パラメータには数字か、オペレーティングシステムの最大となる + <code>max</code> のどちらかを指定することができます。 + 最大のリソースリミットを上げるためには、サーバを + <code>root</code> で実行するか起動されなければいけません。</p> + + <p>この設定は Apache の子プロセス自体ではなく、 + リクエストを受け付けた Apache の子プロセスから fork されたプロセスに + 適用されます。 + これには CGI や SSI から実行されたコマンドが含まれますが、Apache の + 親プロセスから fork されたログのパイププロセスなどには適用されません。</p> + + <p>プロセスの制限は、ユーザあたりのプロセス数で制御されます。</p> + + <div class="note"><h3>注</h3> + <p> CGI プロセスがウェブサーバのユーザ ID 以外で実行されるので + <strong>無ければ</strong>、 + このディレクティブは、サーバ自身が生成できるプロセスの数を制限することになります。 + そのような状況になっているかどうかは、<code>error_log</code> 中の + <strong><code>cannot fork</code></strong> というメッセージにより + 確認することができます。</p> + </div> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>CGI スクリプトのインタープリタの位置を調べるための手法</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Win32 のみ。 +オプション <code>Registry-Strict</code> は Apache 2.0 以降で使用可能</td></tr> +</table> + <p>このディレクティブは、Apache で CGI スクリプトを + 実行する場合に利用するインタープリタを、 + どのように探し出すかについて制御するために使用します。 + デフォルトの設定は <code>Script</code> です。これはスクリプトの + shebang 行 (最初の行で <code>#!</code> から始まるもの) + に指されているインタープリタを使用します。Win32 ではその行は + 以下の様になります。</p> + + <div class="example"><p><code> + #!C:/Perl/bin/perl.exe + </code></p></div> + + <p>もしくは、<code>perl</code> が <code>PATH</code> にある場合は単に:</p> + + <div class="example"><p><code> + #!perl + </code></p></div> + + <p><code>ScriptInterpreterSource Registry</code> を指定すると、 + スクリプトファイルの拡張子 (例えば、<code>.pl</code>) を + キーとして、Windows のレジストリツリー <code>HKEY_CLASSES_ROOT</code> + を検索するようになります。レジストリのサブキー + <code>Shell\ExecCGI\Command</code> か、それが存在しない場合は + <code>Shell\Open\Command</code> がスクリプトファイルを開くために + 使われます。レジストリキーが見つからないときは、Apache は <code>Script</code> + オプションが指定されたときの動作に戻ります。</p> + + <div class="warning"><h3>セキュリティ</h3> + <p><code>ScriptInterpreterSource Registry</code> を <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> されたディレクトリで使うときは + 注意してください。Apache はそのディレクトリ中の<em>すべての</em>ファイルを + 実行しようとします。<code>Registry</code> という設定は通常は実行されない + ファイルに対して望ましくないプログラムの実行が発生する可能性があります。 + 例えば、ほとんどの Windows システムで、 + <code>.htm</code> ファイルのデフォルトの「開く」コマンドは + Microsoft Internet Explorer を実行しますので、スクリプトに指定された + ディレクトリにある <code>.htm</code> ファイルへのリクエストはサーバの + バックグラウンドでブラウザを実行することになります。これは、一分内くらいで + システムをクラッシュさるための良い方法です。</p> + </div> + + <p>Apache 2.0 から導入されたオプション <code>Registry-Strict</code> は + <code>Registry</code> と同じことを行ないますが、サブキー + <code>Shell\ExecCGI\Command</code> のみを使います。 + <code>ExecCGI</code> キーは普通に使われるキーではありません。Windows + レジストリに手動で設定する必要がありますので、システムでの偶発的なプログラムの + 実行を防ぐことができます。</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Determine if mod_status displays the first 63 characters +of a request or the last 63, assuming the request itself is greater than +63 chars.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>SeeRequestTail On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SeeRequestTail Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache httpd 2.2.7 and later.</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバがクライアントに送るエラーメッセージに含める電子メールの +アドレス</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerAdmin</code> は、クライアントに返すさまざまな + エラーメッセージ中に記述する、 + 問合せアドレスを設定します。与えられた引数を <code>httpd</code> が + URL と認識しない場合は、<var>email-address</var> だと解釈して、 + ハイパーリンクのターゲットに <code>mailto:</code> を付けます。 + 実際には、ここには電子メールアドレスを使うことが推奨されています。 + 多くの CGI スクリプトはそうなっていることを仮定しています。 + URL を使う場合は、あなたの管理下にある別サーバを指すようにしてください。 + そうでないと、エラーが起こったときに連絡をすることができなくなって + しまいます。 +</p> + + <p>その際、これのために専用のアドレスを設定するのが良いでしょう。 + 例えば、</p> + + <div class="example"><p><code> + ServerAdmin www-admin@foo.example.com + </code></p></div> + + <p>といったようにします。ユーザはいつもサーバに関する話であるということを + 明記してくるわけではありませんので。</p> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>リクエストを名前ベースのバーチャルホストにマッチさせているときに +使用されるホストの別名</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerAlias</code> ディレクティブは、<a href="../vhosts/name-based.html">ネームベースのバーチャルホスト</a>において + 使用するホストの別名を指定します。 + 適切であれば、<code class="directive">ServerAlias</code> ディレクティブでは + ワイルドカードを使うこともできます。</p> + + <div class="example"><p><code> + <VirtualHost *><br /> + ServerName server.domain.com<br /> + ServerAlias server server2.domain.com server2<br /> + # ...<br /> + </VirtualHost> + </code></p></div> + +<h3>参照</h3> +<ul> +<li><a href="../vhosts/">Apache バーチャルホスト説明書</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバが自分自身を示すときに使うホスト名とポート</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>このディレクティブはバージョン 2.0 ではバージョン 1.3 の + <code class="directive">Port</code> ディレクティブの機能も含みます。</td></tr> +</table> + <p><code class="directive">ServerName</code> ディレクティブは、 + サーバが自分自身を示すスキーム名、ホスト名とポート番号を設定します。 + これは、リダイレクトする URL を生成する際に利用されます。 + 例えば、ウェブサーバを動かしているマシンは <code>simple.example.com</code> + で、DNS のエイリアス <code>www.example.com</code> もあるときに、 + ウェブサーバが後者として認識されて欲しいときは、以下のようにディレクティブを + 使います。</p> + + <div class="example"><p><code> + ServerName www.example.com:80 + </code></p></div> + + <p><code class="directive">ServerName</code> が指定されていないときは、 + サーバは IP アドレスから逆引きを行なうことでホスト名を知ろうとします。 + <code class="directive">ServerName</code> にポートが指定されていないときは、 + サーバはリクエストが来ている + ポートを使います。最高の信頼性と確実性をもたらすためには、 + <code class="directive">ServerName</code> を使ってホスト名とポートを明示的に + 指定してください。</p> + + <p><a href="../vhosts/name-based.html">名前ベースのバーチャルホスト</a> + を利用している場合、<code class="directive"><a href="#virtualhost"><VirtualHost></a></code> セクション内の + <code class="directive">ServerName</code> はこのバーチャルホストにマッチするために + 何がリクエストの Host: ヘッダに現れる必要があるのかを指定します。</p> + + <p>SSL を処理するデバイス、例えばリバースプロクシやロードバランサや + SSL 処理軽減アプライアンスの裏側でサーバが稼動する場合もあるでしょう。 + そういった場合では、クライアントが接続するときに使う + <code>https://</code> スキームとポート番号を <code class="directive">ServerName</code> + ディレクティブで指定して、自己参照 URL が正しく生成できるようにします。</p> + + <p>自己参照 URL (例えば <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> モジュールによるものなど) + が指定されたポートを使うか、クライアントのリクエストのポート番号を使うかを + 決定する設定は <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> + ディレクティブと <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> + ディレクティブを参照してください。</p> + + +<h3>参照</h3> +<ul> +<li><a href="../dns-caveats.html">DNS と Apache に関する話</a></li> +<li><a href="../vhosts/">Apache バーチャルホスト説明書</a></li> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li> +<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>非互換のブラウザが名前ベースのバーチャルホストにアクセスしたときの +ための互換用 URL パス名</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerPath</code> ディレクティブは、<a href="../vhosts/">ネームベースのバーチャルホスト</a>において利用する + 互換用 URL パス名を設定します。</p> + +<h3>参照</h3> +<ul> +<li><a href="../vhosts/">Apache バーチャルホスト説明書</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>インストールされたサーバのベースディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerRoot</code> ディレクティブは、 + サーバが存在するディレクトリを設定します。 + 通常、<code>conf/</code> や <code>logs/</code> といったサブディレクトリが + 存在します。 + また、他の設定ディレクティブ (例えば <code class="directive"><a href="#include">Include</a></code> や <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code> など) における相対パスは、 + このディレクトリからの相対位置となります。</p> + + <div class="example"><h3>例</h3><p><code> + ServerRoot /home/httpd + </code></p></div> + + + +<h3>参照</h3> +<ul> +<li><a href="../invoking.html"><code>httpd</code> の <code>-d</code> + オプション</a></li> +<li><code class="directive">ServerRoot</code> の権限を適切に設定する方法は<a href="../misc/security_tips.html#serverroot">セキュリティのこつ</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバが生成するドキュメントのフッタを設定</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ServerSignature Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerSignature</code> ディレクティブは、 + サーバが生成するドキュメント + (エラーメッセージ、<code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> における FTP のディレクトリリスト、 + <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> の出力、等々) + の最下行に付与するフッタの設定を行ないます。 + そのようなフッタ行を有効にしたい理由には、 + プロキシが複数連なっている場合に、ユーザはどのサーバが返した + エラーメッセージかを知る手段がほとんど無いというものがあります。</p> + + + <p>デフォルトである <code>Off</code> に設定をすると、フッタ行が抑制されます + (そして、Apache-1.2 以前と互換の動作をします)。 + <code>On</code> に設定した場合は、単にドキュメントの中に、サーバのバージョン、 + 稼動中のバーチャルホストの <a href="#servername">ServerName</a> の書かれた行を追加し、 + <code>EMail</code> にした場合はさらに参照されたドキュメントに対する <a href="#serveradmin">ServerAdmin</a> を指す "mailto:" が追加されます。</p> + + <p>バージョン 2.0.44 以降では、表示されるサーバーのバージョン番号の詳細は<code class="directive"><a href="#servertokens">ServerTokens</a></code> + ディレクティブにより制御されます。</p> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>Server</code> HTTP 応答ヘッダを設定する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ServerTokens Full</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>このディレクティブは、クライアントに送り返す <code>Server</code> + 応答ヘッダ内に、サーバの一般的な OS 種別や、 + コンパイルされて組み込まれているモジュールの情報を + 含めるかどうかを指定します。</p> + + <dl> + <dt><code>ServerTokens Prod[uctOnly]</code></dt> + + <dd>サーバは (例えば): <code>Server: + Apache</code> といったように送ります。</dd> + + <dt><code>ServerTokens Major</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache/2</code></dd> + + <dt><code>ServerTokens Minor</code></dt> + + <dd>Server sends (<em>e.g.</em>): <code>Server: + Apache/2.0</code></dd> + + <dt><code>ServerTokens Min[imal]</code></dt> + + <dd>サーバは (例えば): <code>Server: + Apache/2.0.41</code> といったように送ります。</dd> + + <dt><code>ServerTokens OS</code></dt> + + <dd>サーバは (例えば): <code>Server: Apache/2.0.41 + (Unix)</code> といったように送ります。</dd> + + <dt><code>ServerTokens Full</code> (もしくは未指定)</dt> + + <dd>サーバは (例えば): <code>Server: Apache/2.0.41 + (Unix) PHP/4.2.2 MyMod/1.2</code> といったように送ります。</dd> + </dl> + + <p>この設定はサーバ全体に適用され、バーチャルホスト上で有効にしたり + 無効にしたりはできません。</p> + + <p>バージョン 2.0.44 以降ではこのディレクティブは <code class="directive"><a href="#serversignature">ServerSignature</a></code> + ディレクティブにより表示される情報も制御します。</p> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>マッチするファイルがハンドラで処理されるようにする</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0 で core に移動</td></tr> +</table> + <p><code>.htaccess</code> や <code class="directive"><a href="#directory"><Directory></a></code> + セクション、<code class="directive"><a href="#location"><Location></a></code> + セクションに書かれた場合、 + このディレクティブはそこにあるすべてのファイルが + <var>handler-name</var> で指定された<a href="../handler.html">ハンドラ</a>で扱われることを強制します。例えば、拡張子に関わらず、 + ディレクトリ全体がイメージマップファイルとして解析して欲しい場合には、 + 以下をそのディレクトリの <code>.htaccess</code> + ファイルに記述します:</p> + + <div class="example"><p><code> + SetHandler imap-file + </code></p></div> + + <p>別の例: URL <code>http://servername/status</code> + が指定されたときにサーバが状態報告をするようにしたいときは、以下を + <code>httpd.conf</code> に記述します:</p> + + <div class="example"><p><code> + <Location /status><br /> + <span class="indent"> + SetHandler server-status<br /> + </span> + </Location> + </code></p></div> + + <p><code>None</code> という値を設定することで、 + 前の方の <code class="directive">SetHandler</code> で定義された設定を無効にすることが + できます。</p> + <p><strong>注意:</strong>SetHandler はデフォルトのハンドラをオーバーライド + しますので、通常の挙動、たとえば、スラッシュ (/) で終わる URL が + リクエストされたときにディレクトリやインデックスファイルを返すよう取り扱う挙動は、 + 行われなくなります。 + </p> + + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントのリクエストや POST の入力を処理するフィルタを設定する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">SetInputFilter</code> ディレクティブはクライアントの + リクエストや POST の入力をサーバが受け取ったときに処理するフィルタを + 設定します。これは <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code> + ディレクティブを含め、他の場所で定義されているフィルタの設定に + 追加されます。</p> + + <p>複数のフィルタを指定するときは、データを処理する順番に + セミコロンで区切る必要があります。</p> + + +<h3>参照</h3> +<ul> +<li><a href="../filter.html">フィルタ</a>説明書</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバの応答を処理するフィルタを設定する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">SetOutputFilter</code> ディレクティブは + サーバの応答をクライアントに送り返される前に処理するフィルタを設定します。 + これは <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code> + ディレクティブを含め、他の場所で定義されているフィルタの設定に + 追加されます。</p> + + <p>例えば、以下の設定は <code>/www/data/</code> ディレクトリのすべての + ファイルを SSI で処理します。</p> + + <div class="example"><p><code> + <Directory /www/data/><br /> + <span class="indent"> + SetOutputFilter INCLUDES<br /> + </span> + </Directory> + </code></p></div> + + <p>複数のフィルタを指定するときは、データを処理する順番に + セミコロンで区切る必要があります。</p> + +<h3>参照</h3> +<ul> +<li><a href="../filter.html">フィルタ</a>説明書</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="StrictHostCheck" id="StrictHostCheck">StrictHostCheck</a> <a name="stricthostcheck" id="stricthostcheck">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Controls whether the server requires the requested hostname be + listed enumerated in the virtual host handling the request + </td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>StrictHostCheck ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>StrictHostCheck OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Added in 2.4.49</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>各イベントについて、リクエストを失敗させるまでにサーバが +待つ時間を設定</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>TimeOut 60</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive">TimeOut</code> ディレクティブは、 + 様々な条件下での I/O 待ち時間を定義します:</p> + + <ol> + <li>クライアントからのデータを読み込む時。 + 受信バッファが空になっていて、TCP パケットが届くまで + 待つ時間の長さ</li> + + <li>クライアントに対してデータを送り出す時。 + 送信バッファがいっぱいで、パケットの受信完了 <span class="transnote">(<em>訳注:</em> ACK)</span> + が届くまで待つ時間の長さ</li> + + <li><code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> 内で、CGI スクリプトが出力を + 返すまでの待ち時間の長さ</li> + + <li><code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code> 内で、フィルタ処理で出力を + 待つ時間の長さ</li> + + <li><code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> 内で、 + <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> + が設定されていない場合のデフォルトの待ち時間</li> + </ol> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>TRACE</code> メソッドのリクエストに対する応答方法を決める +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>TraceEnable on</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 1.3.34, 2.0.55 以降</td></tr> +</table> + <p>Apache のコア機能<span class="transnote">(<em>訳注:</em> <code class="module"><a href="../mod/core.html">core</a></code>)</span>と + <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> 両方の <code>TRACE</code> + の挙動をオーバーライドします。デフォルトの <code>TraceEnable on</code> + は、リクエストボディを受け入れないような、RFC2616 に準拠した + <code>TRACE</code> リクエストを受け付けます。 + <code>TraceEnable off</code> と設定すると、コアサーバと + <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> は <code>405</code> (メソッド不許可) + エラーをクライアントに返します。</p> + + <p>最後に、テストや調査目的などの限定用途として、仕様に準拠しない + <code>TraceEnable extended</code> を使って、リクエストボディを + 受け付けるように挙動を変更できます。(オリジンサーバとしての) + Apache のコアでは、リクエストボディのサイズは 64k ( + <code>Transfer-Encoding: chunked</code> が使われている場合は + chunk ヘッダ用に +8k) に制限されます。 + Apache のコアは、ヘッダと全ての chunk ヘッダをレスポンスの + ボディとして返却します。 + proxy サーバとしては、リクエストボディのサイズは 64k に制限されません。</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Undefine the existence of a variable</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table><p>このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + </p><h3>参照</h3> +<ul> +<li><code class="directive"><a href="#define">Define</a></code></li> +<li><code class="directive"><a href="#ifdefine">IfDefine</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバが自分自身の名前とポートを決定する方法を設定する</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>UseCanonicalName On|Off|Dns</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>UseCanonicalName Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>多くの状況で Apache は<em>自己参照</em> URL、すなわち + 同じサーバを指す URL、を作成する必要があります。 + <code>UseCanonicalName On</code> の場合は、<code class="directive"><a href="#servername">ServerName</a></code> ディレクティブで指定されている + ホスト名とポート番号を使って、その正規名 (自己参照の名前) を生成します。 + この名前は、すべての自己参照 URL で使われますし、CGI の + <code>SERVER_NAME</code> と <code>SERVER_PORT</code> でも使われます。</p> + + <p><code>UseCanonicalName Off</code> の場合、 + クライアントがホスト名とポートを指定したときには、 + それらを元に自己参照 URL を作成します (指定がなかったときは + 上の定義と同様にして正規名を解決します)。 + これらの値は<a href="../vhosts/name-based.html">名前ベースの + バーチャルホスト</a>を実装で使われているのと同じ値で、 + 同じクライアントで取得できる値になっています。 + CGI 変数 <code>SERVER_NAME</code> と <code>SERVER_PORT</code> + もクライアントから与えられた値から作成されます。</p> + + <p>このような挙動が便利な例は、イントラネットのサーバで <code>www</code> + のような短い名前でユーザがマシンに接続するときです。 + ユーザの入力で短いホスト名が使われていて、URL が<em>最後のスラッシュ無しの</em> + ディレクトリになっている <code>http://www/splat</code> のようなとき、 + Apache はリクエストを <code>http://www.domain.com/splat/</code> + へリダイレクトします。 + 認証をするように設定していると、この場合 + ユーザは 2 回認証をしなければならなくなります (<code>www</code> に + 対して 1 回、<code>www.domain.com</code> に対してもう 1 回 -- + 詳細は <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">この話題の + FAQ</a> を参照してください)。 + しかし <code class="directive">UseCanonicalName</code> が <code>Off</code> になっていると、 + Apache は <code>http://www/splat/</code> にリダイレクトします。</p> + + <p>三つ目のオプション <code>UseCanonicalName DNS</code> は、 + 大規模な IP ベースのバーチャルホスティングで、 + <code>Host:</code> ヘッダを提供しない古いクライアントを + サポートする場合を想定しています。 + このオプションでは Apache は、クライアントが接続した IP アドレスに対して + DNS の逆引きを行なって、自己参照 URL を作成します。</p> + + <div class="warning"><h3>警告</h3> + <p>CGI が <code>SERVER_NAME</code> に関して何らかの前提条件を + 仮定しているときには、このオプションの設定によっては動作しなく + なるかもしれません。クライアントは実質的にはホスト名として + 何でも望みの値を指定することができます。CGI が + <code>SERVER_NAME</code> を使って自己参照 URL を作成することしかしない + 場合は、どの設定を行なっても大丈夫なはずです。</p></div> + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>自分自身の名前とポート番号を解決する方法を設定する +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p>さまざまな局面で <em>自己参照</em> URL -- それ自体のサーバを参照する URL + を作ることになります。<code>UseCanonicalPhysicalPort On</code> と設定すると、 + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> に従って別名を + 生成する場合に、実際の物理ポート番号を使って構成するようになります。 + <code>UseCanonicalPhysicalPort Off</code> の場合は、実際の物理ポート番号は + 使用せず、設定された情報を元にポート番号を決めます。</p> + + <div class="note"><h3>注意</h3> + <p>物理ポートが使われる場合の順番は次のようになっています:<br /><br /> + <code>UseCanonicalName On</code></p> + <ul> + <li><code>ServerName</code> で指定されているポート番号</li> + <li>物理ポート番号</li> + <li>デフォルトのポート番号</li> + </ul> + <code>UseCanonicalName Off | DNS</code> + <ul> + <li><code>Host:</code> ヘッダをパースして取得されるポート番号</li> + <li>物理ポート番号</li> + <li><code>ServerName</code> で指定されているポート番号</li> + <li>デフォルトのポート番号</li> + </ul> + + <p><code>UseCanonicalPhysicalPort Off</code> で、 + 物理ポート番号が上記の順序付けから除外されます。</p> + </div> + + +<h3>参照</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a> <a name="virtualhost" id="virtualhost">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>特定のホスト名や IP アドレスのみに適用されるディレクティブを +囲む</td></tr> +<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><VirtualHost + <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]] + ...> ... </VirtualHost></code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><VirtualHost></code> 及び + <code></VirtualHost></code> は、 + 特定のバーチャルホストに対してのみ適用されるディレクティブ群を括る + ために使われます。 + バーチャルホストコンテキストで許可される全てのディレクティブを指定可能です。 + サーバが、指定されたバーチャルホストにあるドキュメントへの + リクエストを受け付けた場合、 + <code class="directive"><VirtualHost></code> セクションの中にある + ディレクティブが適用されます。 + <var>Addr</var>は、次のものが利用できます:</p> + + <ul> + <li>バーチャルホストの IP アドレス</li> + + <li>バーチャルホストの IP に対応する完全なドメイン名 (非推奨)</li> + + <li><code>NameVirtualHost *</code> と共に使われる、 + すべての IP アドレスにマッチする文字 <code>*</code></li> + + <li>IP ベースのバーチャルホストで他のものにマッチしない IP アドレス + のための文字列 <code>_default_</code></li> + </ul> + + <div class="example"><h3>例</h3><p><code> + <VirtualHost 10.1.2.3><br /> + <span class="indent"> + ServerAdmin webmaster@host.example.com<br /> + DocumentRoot /www/docs/host.example.com<br /> + ServerName host.example.com<br /> + ErrorLog logs/host.example.com-error_log<br /> + TransferLog logs/host.example.com-access_log<br /> + </span> + </VirtualHost> + </code></p></div> + + <p>IPv6 アドレスはオプションのポート番号の指定と区別するために、 + 角括弧で括って指定する必要があります。次は IPv6 の例です:</p> + + <div class="example"><p><code> + <VirtualHost [2001:db8::a00:20ff:fea7:ccea]><br /> + <span class="indent"> + ServerAdmin webmaster@host.example.com<br /> + DocumentRoot /www/docs/host.example.com<br /> + ServerName host.example.com<br /> + ErrorLog logs/host.example.com-error_log<br /> + TransferLog logs/host.example.com-access_log<br /> + </span> + </VirtualHost> + </code></p></div> + + <p>各々のバーチャルホストにはそれぞれ違う IP アドレス、ポート番号 + もしくはホスト名に対応する必要があり、 + 1 番目の場合には複数のアドレスで IP パケットを受信できるように + サーバマシンを設定しなければなりません。 + (もし、マシンが複数のネットワークインターフェースを持たない場合は、 + (OSがサポートしていれば) <code>ifconfig alias</code> コマンドにより + 達成できます)。</p> + + <div class="note"><h3>注意点</h3> + <p><code class="directive"><VirtualHost></code> は Apache が Listen する + IP アドレスには影響を与え<strong>ません</strong>。 + <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> を + 使って Apache が正しいアドレスを listen するように設定する必要があります。</p> + </div> + + <p>IP ベースのバーチャルホストを使っている場合は、特別な名前 + <code>_default_</code> を指定することができます。その場合は + そのバーチャルホストは他のバーチャルホストで明示的に挙げられていない + すべての IP アドレスにマッチします。<code>_default_</code> バーチャルホストが無い + 場合に IP がバーチャルホストで指定されたものにマッチしないときは、 + VirtualHost セクションの外のすべての定義からなる「主」サーバ設定が + 使われます。(ただし、<code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> ディレクティブにマッチする + すべての IP アドレスは「主」サーバ設定も <code>_default_</code> バーチャルホストも + 使わないことに注意してください。詳しくは <a href="../vhosts/name-based.html">ネームベースのバーチャルホスト</a> を + 参照してください。)</p> + + <p><code>:port</code> といった形式で記述することにより、 + マッチさせるポートを変更可能です。 + この指定をしない場合には、主サーバ設定における + 一番最後に <code><a href="#port">Port</a></code> で指定されたポートが + デフォルトとなります。 + <code>:*</code> を指定することにより、 + アドレス上の全てのポートにマッチします。(<code>_default_</code> のときは + これを使うことが推奨されています。)</p> + + <p><code class="directive"><VirtualHost></code> ブロックごとに + <code class="directive"><a href="#servername">ServerName</a></code> を指定すべきです。 + もしなければ、メインサーバ設定の + <code class="directive"><a href="#servername">ServerName</a></code> + が継承されます</p> + + <div class="warning"><h3>セキュリティ</h3> + <p>サーバーを起動した以外のユーザがログファイルが保管されるディレクトリに + 書き込み可能なときになぜセキュリティが破られる可能性があるかの詳細は + <a href="../misc/security_tips.html">セキュリティに関するコツ</a> を + 参照してください。</p></div> + +<h3>参照</h3> +<ul> +<li><a href="../vhosts/">Apache バーチャルホスト説明書</a></li> +<li><a href="../dns-caveats.html">DNS と Apache に関する話</a></li> +<li><a href="../bind.html">Apache が使用するアドレスとポートの設定</a></li> +<li>リクエストを受けた際にこれらの異なるセクションが + 組み合わされる方法については <a href="../sections.html"> + <Directory>, <Location>, <Files> セクションの動作法</a></li> +</ul> +</div> +</div> +<div class="bottomlang"> +<p><span>翻訳済み言語: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/core.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/mod/core.html.tr.utf8 b/docs/manual/mod/core.html.tr.utf8 new file mode 100644 index 0000000..ed1dba5 --- /dev/null +++ b/docs/manual/mod/core.html.tr.utf8 @@ -0,0 +1,5245 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>core - Apache HTTP Sunucusu Sürüm 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p> +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Sunucusu</a> > <a href="http://httpd.apache.org/docs/">Belgeleme</a> > <a href="../">Sürüm 2.4</a> > <a href="./">Modüller</a></div> +<div id="page-content"> +<div id="preamble"><h1>Apache Temel Özellikleri</h1> +<div class="toplang"> +<p><span>Mevcut Diller: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Açıklama:</a></th><td>Apache HTTP Sunucusunda daima mevcut olan çekirdek + özellikler</td></tr> +<tr><th><a href="module-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr></table> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">Yönergeler</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#cgivar">CGIVar</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxpipelined">FlushMaxPipelined</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxthreshold">FlushMaxThreshold</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#httpprotocoloptions">HttpProtocolOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#if"><If></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifdirective"><IfDirective></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#iffile"><IfFile></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ifsection"><IfSection></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergeslashes">MergeSlashes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocols">Protocols</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#protocolshonororder">ProtocolsHonorOrder</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#qualifyredirecturl">QualifyRedirectURL</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#readbuffersize">ReadBufferSize</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#regexdefaultoptions">RegexDefaultOptions</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#stricthostcheck">StrictHostCheck</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li> +</ul> +<h3>Bulunan hatalar</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd günlüğü</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=core">Bilinenler</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=core">Hata bildir</a></li></ul><h3>Ayrıca bakınız:</h3> +<ul class="seealso"> +<li><a href="#comments_section">Yorumlar</a></li></ul></div> + +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir protokolün dinleyici soketleri için en iyilemeleri ayarlar +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>AcceptFilter <code>protocol</code> <code>kabul_süzgeci</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge <code class="directive"><a href="#protocol">Protocol</a></code> yönergesinde belirtilen + protokol türüne göre bir dinleme soketinin işletim + sistemine özgü en iyilemelerini etkin kılar. İşletim sistemi çekirdeği + için temel önerme veri alınıncaya kadar veya HTTP isteğinin tamamı + tamponlanana kadar sunucu sürecine bir soket tahsis etmemektir. + Şimdilik sadece <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9">FreeBSD’nin Kabul Süzgeçleri</a> ve Linux’un soket seçeneklerinden + <code>TCP_DEFER_ACCEPT</code> ve Windows'un en iyilenmiş + <code>AcceptEx()</code> işlevi desteklenmektedir.</p> + + <p>Değiştirge olarak <code>none</code> kullanımı, protokolün kabul + süzgeçlerini iptal edecektir. <code>ftp:</code> veya <code>nntp</code> + gibi sunucunun baştan bir veri göndermesinin gerekli olduğu + protokoller için kullanışlıdır. Örnek:</p> + + <pre class="prettyprint lang-config">AcceptFilter nntp none</pre> + + + <p>Öntanımlı protokol isimleri port 443 için <code>https</code> ve tüm + diğer portlar için <code>http</code>'dir. Dinlenmesi için başka bir port + ile ilgili bir protokol belirtmek isterseniz <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> yönergesine <code>protokol</code> + argümanını ekleyin.</p> + + <p>FreeBSD için öntanımlı değerler:</p> + <pre class="prettyprint lang-config">AcceptFilter http httpready +AcceptFilter https dataready</pre> + + + <p><code>httpready</code> kabul süzgeci HTTP isteklerinin tamamını + işletim sistemi çekirdeği seviyesinde tamponlar. Çekirdek isteğin + tamamını alır almaz sunucuya gönderir. Ayrıntılar için <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9">accf_http(9)</a> kılavuz sayfasına bakınız. HTTPS istekleri + şifrelenmiş olduğundan sadece <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">accf_data(9)</a> süzgeci kullanılır.</p> + + <p>Linux’taki öntanımlı değerler:</p> + <pre class="prettyprint lang-config">AcceptFilter http data +AcceptFilter https data</pre> + + + <p>Linux’un <code>TCP_DEFER_ACCEPT</code> soket seçeneği HTTP isteklerinin + tamponlanmasını desteklemez. <code>none</code> dahil her değer + dinleyici üzerinde <code>TCP_DEFER_ACCEPT</code> seçeneğini etkin kılar. + Daha ayrıntılı bilgi edinmek için Linux + <a href="http://man7.org/linux/man-pages/man7/tcp.7.html">tcp(7)</a> kılavuz sayfasına bakınız.</p> + + <p>Windows’taki öntanımlı değerler::</p> + + <pre class="prettyprint lang-config">AcceptFilter http connect +AcceptFilter https connect</pre> + + + <p>Windows'un <code>mpm_winnt</code> modülü <code>AcceptEx()</code> + arayüzünü açıp kapamak için <code>AcceptFilter</code>'i yorumlar ve + http protokol tamponlamasını desteklemez. <code>connect</code>, <code>AcceptEx()</code> arayüzünü kullanacak, ayrıca uç ağ adresleri de alınacak, fakat <code>none</code> gibi <code>connect</code> seçeneği de ilk veri aktarımını beklemeyecektir.</p> + + <p>Windows'ta <code>none</code> <code>AcceptEx()</code>'ten ziyade + <code>accept()</code> kullanır ve ağ soketlerini bağlantılar arasında + yer değiştirmez. Sürücü desteği bozuk ağ bağdaştırıcılarından başka + vpn sürücüleri gibi bazı sanal ağ sağlayıcılar veya spam, virus veya + casus yazılım süzgeçleri için kullanışlıdır.</p> + + <div class="warning"> + <h3><code>data</code> AcceptFilter (Windows)</h3> + + <p>2.4.23 ve öncesi sürümlerde, Windows <code>data</code> accept + süzgeci veri aktarılana kadar bekletildikten sonra ilk veri + tamponlanır ve uç ağ adresi için tek bir AcceptEx() çağrısı yapılır. + Bu gerçeklenim hizmet reddi saldırısına konu olduğundan iptal + edilmiştir.</p> + + <p>httpd'nin şu anki dağıtımları için Windows'da <code>connect</code> + süzgeci öntanımlıdır ve <code>data</code> belirtilmiş olsa dahi + <code>connect</code> belirtilmiş gibi davranılır. Önceki sürümleri + kullananların AcceptFilter satırını yukarıdaki gibi + <code>connect</code> süzgecine ayarlamaları gerekmektedir.</p> + </div> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#protocol">Protocol</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Dosya isminden sonra belirtilen yol verisini kabul veya + reddeder.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>AcceptPathInfo Default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge, istekte dosya isminden sonra (dizinde belirtilen dosya + bulunmayabilir) belirtilen yol verisinin kabul edilip edilmeyeceğini + denetler. Dosya isminden sonra belirtilen yol verisi + <code>PATH_INFO</code> ortam değişkeninde betiklerin kullanımına + sunulabilir.</p> + + <p>Örneğin, içinde sadece <code>here.html</code> dosyası bulunan bir + <code>/test/</code> dizinimiz olsun. <code>/test/here.html/more</code> + ve <code>/test/nothere.html/more</code> isteklerinin her ikisi de + <code>PATH_INFO</code> değişkenine <code>/more</code> verisinin + atanmasını sağlar.</p> + + <p><code class="directive">AcceptPathInfo</code> yönergesine atanabilecek argüman + sayısı üçtür:</p> + <dl> + <dt><code>Off</code></dt><dd>Sadece dosya isminden sonra yol verisi + bulunmayan istekler kabul edilir. Yukarıdaki örnekteki gibi + <code>/test/here.html/more</code> şeklindeki istekler bir 404 (Nesne + bulunamadı) hatasıyla sonuçlanır.</dd> + + <dt><code>On</code></dt><dd>Mevcut bir dosyaya ait bir dosya isminden + sonra bir yol verisinin de belirtildiği istekler kabul edilir. + Yukarıdaki örnekteki gibi <code>/test/here.html/more</code> şeklindeki + istekler, <code>/test/here.html</code> geçerli bir dosya olduğu + takdirde kabul edilir.</dd> + + <dt><code>Default</code></dt><dd>Dosya isminden sonra yol verisi + belirtilen isteklerin nasıl ele alınacağı istekten sorumlu <a href="../handler.html">eylemci</a> tarafından saptanır. Normal dosyalar + için çekirdek eylemci öntanımlı olarak <code>PATH_INFO</code> + isteklerini reddeder. <a href="mod_cgi.html"><code>cgi-script</code></a> ve <a href="mod_isapi.html"><code>isapi-handler</code></a> gibi betiklere + hizmet eden eylemciler ise genellikle <code>PATH_INFO</code> + isteklerini öntanımlı olarak kabul ederler.</dd> + </dl> + + <p><code>AcceptPathInfo</code> yönergesinin birincil amacı eylemcinin + <code>PATH_INFO</code> istekleri hakkında verdiği kabul veya red + kararını geçersiz kılabilmenizi sağlamaktır. Örneğin, + <code>PATH_INFO</code>’ya dayalı olarak içerik üretmek için <a href="mod_include.html"><code>INCLUDES</code></a> gibi bir <a href="../filter.html">süzgeç</a> kullandığınız takdirde bu + geçersizleştirme zorunlu olur. Normal dosyalar için çekirdek eylemci + normal olarak isteği reddederdi, böyle bir durumda bir betiği etkin + kılmak için aşağıdaki gibi bir yapılandırma kullanabilirsiniz:</p> + + <pre class="prettyprint lang-config"><Files "mypaths.shtml"> + Options +Includes + SetOutputFilter INCLUDES + AcceptPathInfo On +</Files></pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Dağıtık yapılandırma dosyasının ismi belirtilir.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>AccessFileName <code>filename</code> [<code>filename</code>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>AccessFileName .htaccess</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Belge yolu üzerindeki dizinlerde dağıtık yapılandırma dosyalarının <a href="#allowoverride">bulunmasına izin verilmişse</a> sunucu bir isteği + işlerken önce bu dizinlerde bu yönergede belirtilmiş yapılandırma + dosyasını arar. Örnek:</p> + + <pre class="prettyprint lang-config">AccessFileName .acl</pre> + + + <p>Sunucu, <code>/usr/local/web/index.html</code> belgesini döndürmeden + önce,</p> + + <pre class="prettyprint lang-config"><Directory "/"> + AllowOverride None +</Directory></pre> + + + <p>şeklinde bir yapılandırma ile iptal edilmiş olmadıkça yönergeler için + <code>/.acl</code>, <code>/usr/.acl</code>, + <code>/usr/local/.acl</code> ve <code>/usr/local/web/.acl</code> + dosyalarını okur.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Yapılandırma Dosyaları</a></li> +<li><a href="../howto/htaccess.html">.htaccess Dosyaları</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir yanıtın içerik türü <code>text/plain</code> veya + <code>text/html</code> olduğunda eklenecek öntanımlı karakter kümesi + parametresini belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>AddDefaultCharset On|Off|<code>karküm</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>AddDefaultCharset Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge, yanıtın içerik türü <code>text/plain</code> veya + <code>text/html</code> olmak şartıyla yanıta eklenecek karakter + kümesini (karakter kodlamasınının ismini) belirler. Bu, asıl davranış + çoğunlukla kullanıcının istemci yapılandırmasına bağlı olmakla + birlikte, yanıtın gövdesinde <code>META</code> elemanı vasıtasıyla + belirtilmiş karakter kümesini geçersiz kılar. <code>AddDefaultCharset + Off</code> şeklinde bir atama bu işlevselliği iptal eder. + <code>AddDefaultCharset On</code> ile bu işlevsellik etkin kılınmaktan + başka <code>iso-8859-1</code> karakter kümesini öntanımlı olarak yanıta + eklenir. Yönergede <code>karküm</code> olarak belirtilecek değerler, + Genel Ağ ortam türlerinde (MIME türlerinde) kullanmak üzere <a href="http://www.iana.org/assignments/character-sets">IANA’da kayıtlı + karakter kümesi değerleri</a>nden biri olmalıdır. Örnek:</p> + + <pre class="prettyprint lang-config">AddDefaultCharset utf-8</pre> + + + <p><code class="directive">AddDefaultCharset</code> yönergesi sadece, metin + kaynaklarının hepsinin aynı karakter kümesine sahip olduğu bilindiği + takdirde ve her birinde ayrı ayrı karakter kümesi belirtmek çok + külfetli olacaksa kullanılmalıdır. Buna bir örnek, CGI betikleri + tarafından üretilmiş içeriğe sahip kaynaklara karakter kümesinin + eklenmesidir; böyle kaynaklar çıktıda kullanıcı tarafından sağlanmış + veri içermeleri nedeniyle karşı siteden kaynaklanan betikli + saldırılardan zarar görebilir. Bununla birlikte, bir öntanımlı karakter + kümesi belirtmek, tarayıcılarında “karakter kodlamasını kendiliğinden + sapta” özelliğini etkin kılmış kullanıcıları korumayacağından daha iyi + bir çözüm bu betikleri bu tür saldırılara karşı düzeltmek veya en iyisi + silmektir.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Kodlanmış dosya yolu ayracı içeren URL’lere izin verilip + verilmeyeceğini belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>AllowEncodedSlashes On|Off|NoDecode</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>NoDecode seçeneği Apache httpd 2.3.12 ve sonrasında + mevcuttur.</td></tr> +</table> + <p><code class="directive">AllowEncodedSlashes</code> yönergesi kodlanmış dosya + yolu ayracı içeren URL’lere izin verir (<code>/</code> yerine + <code>%2F</code> ve ek olarak <code>\</code> için ilgili sistemlerde + <code>%5C</code> kullanılmış URL’ler).</p> + + <p><code>Off</code> öntanımlı değeriyle, böyle URL’ler bir 404 + (Nesne bulunamadı) hatasıyla reddedilirler.</p> + + <p><code>On</code> değeriyle, böyle URL’ler kabul edilir ve kodlanmış + dosya yolu ayraçları kodlanmış diğer karakterler gibi çözümlenir.</p> + + <p><code>NoDecode</code> değeriyle, böyle URL’ler kabul edilir fakat + kodlanmış dosya yolu ayraçları çözümlenmeden kodlanmış halde + bırakılır.</p> + + <p><code class="directive">AllowEncodedSlashes</code> <code>On</code>, çoğunlukla + <code>PATH_INFO</code> ile bir arada kullanıldığı zaman + kullanışlıdır.</p> + + <div class="note"><h3>Ek Bilgi</h3> + <p>Kodlanmış bölü çizgileri yol bilgisi için gerekliyse bir güvenlik + ölçütü olarak <code>NoDecode</code> kullanımı şiddetle önerilir. + Kodlanmış bölü çizgilerinin çözümlenmesine izin vermek güvensiz olması + olası yollara izin vermek olurdu.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td><code>.htaccess</code> dosyalarında bulunmasına izin verilen + yönerge türleri belirtilir.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>AllowOverride All|None|<code>yönerge-türü</code> +[<code>yönerge-türü</code>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>AllowOverride None (2.3.9 ve sonrası), AllowOverride All (2.3.8 ve öncesi)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Sunucu <code class="directive"><a href="#accessfilename">AccessFileName</a></code> yönergesi + ile belirtildiği şekilde bir <code>.htaccess</code> dosyasına rastlarsa + önceki yapılandırma yönergelerinin hangilerinin geçersiz kılınmak üzere + bildirildiğini bilmek ister.</p> + + <div class="note"><h3>Sadece <Directory> bölümlerinde geçerli</h3> + <code class="directive">AllowOverride</code> yönergesi, <code class="directive"><a href="#location"><Location></a></code>, <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> veya <code class="directive"><a href="#files"><Files></a></code> bölümlerinde değil, + sadece düzenli ifade içermeyen <code class="directive"><a href="#directory"><Directory></a></code> bölümlerinde geçerlidir. + </div> + + <p>Bu yönergeye ve <code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code> + yönergesine değer olarak <code>None</code> belirtilirse + <a href="#accessfilename">.htaccess</a> dosyaları tamamen yok sayılır. + Bu durumda, sunucu dosya sisteminde rastladığı <code>.htaccess</code> + dosyalarını okumaya dahi çalışmayacaktır.</p> + + <p>Bu yönergeye <code>All</code> değeri atanırsa, .htaccess <a href="directive-dict.html#Context">bağlamında</a> kullanılabilecek her + yönergeye <code>.htaccess</code> dosyalarında izin verilir. (Hangi + <code>yönerge-türü</code> türü için hangi yönergelerin etkin olduğunu görmek + için <a href="overrides.html">.htaccess için Geçersizleştirme Sınıfları</a> + sayfasına bakınız)</p> + + <p><code><code>yönerge-türü</code></code> olarak aşağıdaki yönerge grup + isimlerinden biri belirtilebilir:</p> + + <dl> + <dt><a href="overrides.html#override-authconfig">AuthConfig</a></dt> + + <dd><code class="directive"><a href="../mod/mod_authz_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>, + <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>, + <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>, + <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>ve benzeri</em> yetkilendirme yönergelerinin kullanımını izin + verilir.</dd> + + <dt><a href="overrides.html#override-fileinfo">FileInfo</a></dt> + + <dd>Belge türünü denetleyen <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> + <code>Add*</code> ve <code>Remove*</code> yönergeleri, + <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>, + <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> + yönergeleri ve benzerleri ile + <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> + belge meta veri yönergelerinin, + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> modülündeki + <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> + yönergelerinin, <code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code> modülündeki + <code class="directive"><a href="../mod/mod_alias.html#redirect">Redirect</a></code>, + <code class="directive"><a href="../mod/mod_alias.html#redirecttemp">RedirectTemp</a></code>, + <code class="directive"><a href="../mod/mod_alias.html#redirectpermanent">RedirectPermanent</a></code>, + <code class="directive"><a href="../mod/mod_alias.html#redirectmatch">RedirectMatch</a></code>) + yönergelerinin ve <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code> modülündeki + <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> + yönergesinin kullanımına izin verilir. + </dd> + + <dt><a href="overrides.html#override-indexes">Indexes</a></dt> + + <dd>Dizin içeriğinin listelenmesini denetleyen + <code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, + <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, + <a href="mod_autoindex.html#indexoptions.fancyindexing"><code>FancyIndexing</code></a>, + <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, + <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code> + yönergelerinin <em>ve benzerlerinin</em> kullanımına izin + verilir.</dd> + + <dt><a href="overrides.html#override-limit">Limit</a></dt> + + <dd>Konak erişimini denetleyen + <code class="directive"><a href="../mod/mod_access_compat.html#allow">Allow</a></code>, + <code class="directive"><a href="../mod/mod_access_compat.html#deny">Deny</a></code> ve + <code class="directive"><a href="../mod/mod_access_compat.html#order">Order</a></code> + yönergelerinin kullanımına izin verilir.</dd> + + <dt>Nonfatal=[Override|Unknown|All]</dt> + + <dd><a href="#accessfilename">.htaccess</a> dosyalarındaki sözdizimi + hatalarının ölümcül olarak ele alınmaması için + <code>AllowOverride</code> yönergesinin kullanımına izin verir; bunun + yerine bir dahili sunucu hatasına sebep olur, izin verilmeyen veya + tanınmayan yönergeler yoksayılır ve günlüğe bir uyarı çıktılanır: + <ul> + <li><strong>Nonfatal=Override</strong> ile + <code>AllowOverride</code> tarafından yasaklanmış yönergeler + ölümcül olarak ele alınmaz.</li> + <li><strong>Nonfatal=Unknown</strong> ile bilinmeyen yönergeler + ölümcül olarak ele alınmaz. Yazım hatalarını ve mevcut olmayan bir + modül tarafından gerçeklenmiş yönergeleri kapsar.</li> + <li><strong>Nonfatal=All</strong> ile yukarıdakilerin ikisi de + ölümcül olarak ele alınmaz.</li> + </ul> + <p>Geçerli bir yönergedeki yazım hatalarının hala dahili bir sunucu + hatasına sebep olacağına dikkat ediniz.</p> + <div class="warning"><h3>Güvenlik</h3> + Ölümcül olmayan hatalar <a href="#accessfilename">.htaccess</a> + kullanıcıları için güvenlikle ilgili sorunlara yol açabilir. Örneğin + <code>AllowOverride AuthConfig</code>'e izin vermezse kullanıcıların + siteye erişimini kısıtlayan yapılandırma iptal edilmiş olur. + </div> + </dd> + + <dt><a href="overrides.html#override-options">Options</a>[=<code>seçenek</code>,...]</dt> + + <dd>Dizinlere özgü özellikleri denetleyen + <code class="directive"><a href="#options">Options</a></code> ve + <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code> yönergelerinin + kullanımına izin verilir. <code class="directive"><a href="#options">Options</a></code> komutunda belirtilecek seçenekler + bir eşit işaretinden sonra aralarına sadece virgül konarak, + fakat virgülden sonra boşluk bırakmadan belirtilebilir. + + <div class="note"><h3>Options'ın örtük iptali</h3> + <p><a href="#accessfilename">.htaccess</a> dosyalarında kullanılabilen + seçenek listesi bu yönergeyle sınırlanabilirse de herhangi bir + <code class="directive"><a href="#options">Options</a></code> yönergesine izin + verildiği sürece miras alınmış diğer seçenekler göreli olmayan + sözdizimi kullanılarak iptal edilebilir. Başka bir deyişle, bu + mekanizma diğerlerinin değerlerini korumasına izin verirken belli bir + seçeneği değerini korumaya zorlayamaz. + </p></div> + + <div class="example"><p><code> + AllowOverride Options=Indexes,MultiViews + </code></p></div> + </dd> + </dl> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config">AllowOverride AuthConfig Indexes</pre> + + + <p>Bu örnekte <code>AuthConfig</code> ve <code>Indexes</code> grubundaki + yönergeler bir dahili sunucu hatasına yol açmayacaktır.</p> + + <div class="note"><p>Güvenlik ve başarımı arttırmak için + <code><Directory "/"></code> + bloğu içinde <code>AllowOverride</code> yönergesine <code>None</code> + dışında bir değer atamayın. Böyle yapmak yerine bir <code>.htaccess</code> + dosyası yerleştirmeyi düşündüğünüz dizine ait bir + <code><Directory></code> bloğu olması daha iyidir.</p></div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code></li> +<li><a href="../configuring.html">Yapılandırma Dosyaları</a></li> +<li><a href="../howto/htaccess.html">.htaccess Dosyaları</a></li> +<li><a href="overrides.html">.htaccess için Geçersizleştirme Sınıfları</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td><code>.htaccess</code> dosyalarında izin verilecek yönergeler tek tek belirtilir</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>AllowOverrideList None|<code>yönerge</code> +[<code>yönerge-türü</code>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>AllowOverrideList None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Sunucu bir <code>.htaccess</code> dosyası (<code class="directive"><a href="#accessfilename">AccessFileName</a></code> tarafından belirtildiği gibi) + bulduğunda önceki yapılandırma yönergelerini geçersiz kılabilen bu + dosyada hangi yönergelerin bildirildiğini bilmek ister.</p> + + <div class="note"><h3>Sadece <Directory> bölümlerinde kullanılabilir</h3> + <code class="directive">AllowOverrideList</code> sadece <code class="directive"><a href="#directory"><Directory></a></code> bölümlerinde düzenli + ifadeler olmaksızın belirtilmişse kullanılabilir; <code class="directive"><a href="#location"><Location></a></code>, <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> veya <code class="directive"><a href="#files"><Files></a></code> bölümlerinde değil. + </div> + + <p>Bu yönergeye ve <code class="directive"><a href="#allowoverride">AllowOverride</a></code> + yönergesine <code>None</code> atanmışsa + <a href="#accessfilename">.htaccess</a> dosyaları tamamen yoksayılır. Bu + durumda sunucu dosya sistemindeki <code>.htaccess</code> dosyalarını + okumaya bile çalışmayacaktır.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config">AllowOverride None +AllowOverrideList Redirect RedirectMatch</pre> + + + <p>Yukarıdaki örnekte sadece <code>Redirect</code> ve + <code>RedirectMatch</code> yönergelerine izin verilmektedir. Tüm + diğerleri dahili bir sunucu hatasına sebep olacaktır.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config">AllowOverride AuthConfig +AllowOverrideList CookieTracking CookieName</pre> + + + <p>Yukarıdaki örnekte <code class="directive"><a href="#allowoverride">AllowOverride</a></code> + yönergesi <code>AuthConfig</code> yönerge grubuna izin + verirken <code class="directive">AllowOverrideList</code> yönergesi + <code>FileInfo</code> yönerge grubundan yalnız iki yönergeye izin + vermektedir. Tüm diğerleri dahili bir sunucu hatasına sebep + olacaktır.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li> +<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li> +<li><a href="../configuring.html">Yapılandırma Dosyaları</a></li> +<li><a href="../howto/htaccess.html">.htaccess Dosyaları</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>CGI betik yorumlayıcısını saptama tekniğini belirler. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>CGIMapExtension <code>cgi-yolu</code> <code>.uzantı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Sadece NetWare’de geçerlidir.</td></tr> +</table> + <p>Bu yönerge Apache httpd’nin CGI bekitlerini çalıştırmak için + kullanacağı yorumlayıcıyı nasıl bulacağını denetlemek için kullanılır. + Örneğin, <code>CGIMapExtension sys:\foo.nlm .foo</code> satırı + <code>.foo</code> uzantılı CGI betik dosyalarının FOO yorumlayıcıya + aktarılmasını sağlar.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a> <a name="cgipassauth" id="cgipassauth">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>HTTP yetkilendirme başlıklarının betiklere CGI değişkenleri +olarak aktarılmasını etkin kılar</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>CGIPassAuth On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>CGIPassAuth Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>AuthConfig</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td> Apache HTTP Sunucusunun 2.4.13 ve sonraki sürümlerinde kullanılabilmektedir</td></tr> +</table> + <p><code class="directive">CGIPassAuth</code> yönergesi, HTTP Temel kimlik + doğrulamasını gerçekleştiren betikler için gereken + <code>Authorization</code> gibi HTTP yetkilendirme başlıklarına + betiklerin erişebilmesini sağlar. Normalde bu HTTP başlıkları + betiklerden gizli olup sunucuda HTTP Temel kimlik kanıtlaması etkin + kılındığında sunucuya erişmekte kullanılan kullanıcı kimliklerinin ve + parolalarının betikler tarafından görülmemesini mümkün kılar. Bu yönerge, + HTTP Temel kimlik kanıtlamasını betiklerin gerçekleştirmesini sağlamak + için kullanılmalıdır.</p> + + <p>Apache HTTP Sunucusunun önceki sürümlerinde derleme sırasında + kullanılabilen <code>SECURITY_HOLE_PASS_AUTHORIZATION</code> sabitinin + yerine bu yönerge kullanılabilir.</p> + + <p>Bu ayarlama <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, <code class="module"><a href="../mod/mod_cgid.html">mod_cgid</a></code>, + <code class="module"><a href="../mod/mod_proxy_fcgi.html">mod_proxy_fcgi</a></code>, <code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code> ve + benzerleri gibi <code>ap_add_common_vars()</code> kullanan modüller + tarafından kabul görür. Özellikle, isteği alışılmış tarzda işleme + sokmayıp bu arayüzü kullanan modülleri etkiler. Ayrıca, + <code>ap_add_common_vars()</code> kullanmayan üçüncü parti modüller de + bu ayarlamayı kullanmayı tercih edebilir.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="CGIVar" id="CGIVar">CGIVar</a> <a name="cgivar" id="cgivar">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bazı CGI değişkenlerinin nasıl atanacağını belirler</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>CGIVar <code>değişken</code> <code>kural</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache HTTP Server 2.4.21 ve sonrasında kullanılabilir</td></tr> +</table> + <p>Bu yönerge bazı CGI değişkenlerinin nasıl atanacağını belirler.</p> + + <p><strong>REQUEST_URI</strong> kuralları:</p> + <dl> + <dt><code>original-uri</code> (default)</dt> + <dd>Değer özgün istek satırından alınır ve dahili yöneldirmeler veya + istenen özkaynakları değiştiren alt istekler dikkate alınmaz.</dd> + <dt><code>current-uri</code></dt> + <dd>Değer özgün istek satırından farklı olabilecek dahili yönlendirmeleri + veya istenen özkaynakları değiştiren alt istekleri de yansıtır.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td><code>Content-MD5</code> HTTP yanıt başlıklarının üretimini + etkin kılar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ContentDigest On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ContentDigest Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge RFC2616 ve RFC1864’te tanımlandığı gibi + <code>Content-MD5</code> üretimini etkin kılar.</p> + + <p>MD5, verideki herhangi bir değişikliğin ileti özetinin değişmesi + olarak yansıması nedeniyle yüksek derecede itimat sağlayan keyfi + uzunlukta bir "ileti özeti" (bazen "parmakizi" dendiği de olur) + hesaplama algoritmasıdır.</p> + + <p><code>Content-MD5</code> başlığı öğe gövdesinin iki uç arasında ileti + bütünlük sınamasının yapılabilmesini sağlar. Bir istemci veya vekil + aktarılan öğe gövdesinde rastlantısal bir değişiklik olup olmadığını + saptamak için bu başlığın doğruluğunu sınayabilir. Başlık örneği:</p> + + <div class="example"><p><code> + Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== + </code></p></div> + + <p>Her istekte ileti özeti hesaplanacağından (değerler saklanmaz), bu + yönergenin sunucunuzda başarım sorunlarına yol açacağına dikkat + ediniz.</p> + + <p><code>Content-MD5</code>, herhangi bir modül değil, sadece + <code class="module"><a href="../mod/core.html">core</a></code> modülü tarafından sunulan belgeler için + gönderilir. Örneğin, SSI belgeleri CGI betikleri tarafından + çıktılanırlar ve bayt seviyesinden çıktılar bu başlığa sahip + olmazlar.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun çalışma anı dosyaları için temel dizin</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>DefaultRuntimeDir <code>dizin-yolu</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache 2.4.2 ve sonrasında kullanılabilmektedir. +</td></tr> +</table> + <p><code class="directive">DefaultRuntimeDir</code> yönergesi sunucunun çalışma + anında oluşturacağı dosyaların (paylaşımlı bellek, kilitler, vb.) + saklanacağı dizini belirtmekte kullanılır. Göreli bir yol belirtilirse + tam yol <code class="directive">ServerRoot</code> yönergesinde belirtilene + göreli olacaktır.</p> + + <p><strong>Örnek</strong></p> + <pre class="prettyprint lang-config">DefaultRuntimeDir scratch/</pre> + + + <p><code class="directive">DefaultRuntimeDir</code> için öntanımlı yer derleme + sırasında <code>DEFAULT_REL_RUNTIMEDIR</code> #define satırı ile + değiştirilebilir.</p> + + <p>Bilgi: <code class="directive">ServerRoot</code> bu yönergeden önce belirtilmiş + olmalıdır, aksi takdirde temel dizin için öntanımlı + <code class="directive">ServerRoot</code> kullanılır.</p> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive">ServerRoot</code> üzerindeki izinlerin düzgün olarak +nasıl ayarlanacağını öğrenmek için: +<a href="../misc/security_tips.html#serverroot">güvenlik ipuçları</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Değeri <code>none</code> olduğu takdirde, bu yönergenin bir +uyarı vermekten başka bir etkisi yoktur. Önceki sürümlerde, bu yönerge, +sunucunun ortam türünü saptayamadığı durumda göndereceği öntanımlı ortam +türünü belirlerdi.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>DefaultType <code>ortam-türü</code>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>DefaultType none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td><code>none</code> değeri Apache httpd 2.2.7 ve sonrasında +mevcuttur. Diğer tüm seçenekler Apache httpd'nin 2.3.x ve sonraki sürümleri +için iptal edilmiştir.</td></tr> +</table> + <p>Bu yönerge iptal edilmiştir. Yapılandırma dosyalarının geriye + uyumluluğunu sağlamak için, öntanımlı bir ortam türünün olmadığını + belirten <code>none</code> değeriyle belirtilebilir. Örnek:</p> + + <pre class="prettyprint lang-config">DefaultType None</pre> + + + <p><code>DefaultType None</code> sadece httpd-2.2.7 ve sonrasında + mevcuttur.</p> + + <p>Ortam türlerini dosya uzantıları üzerinden yapılandırmak için + <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> yönergesini ve + <code>mime.types</code> yapılandırma dosyasını veya belli özkaynak + türleri için ortam türlerini yapılandırmak için <code class="directive"><a href="#forcetype">ForceType</a></code> yönergesini kullanın.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir değişken tanımlar</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>Define <code>değişken-ismi</code> [<code>değişken-değeri</code>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Tek değiştirgeli biçemi <code class="program"><a href="../programs/httpd.html">httpd</a></code>’yi <code>-D</code> + seçeneğiyle çalıştırmaya eşdeğerdir. Bu yönerge, başlatma betiğinde + <code>-D</code> seçeneğinin argümanlarını değiştirme gereği duymaksızın + <code class="directive"><a href="#ifdefine"><IfDefine></a></code> bölümlerini + kullanıma sokmak için kullanılabilir.</p> + + <p>Buna ek olarak, ikinci değiştirge belirtilirse yapılandırma değişkenine + bu değer atanır. Değişken yapılandırmada <code>${VAR}</code> sözdizimi + ile kullanılabilir. Değişken daima küresel olarak tanımlı olup + yapılandırma bölümünü sarmalayan etki alanı ile sınırlanmaz.</p> + + <pre class="prettyprint lang-config"><IfDefine TEST> + Define servername test.example.com +</IfDefine> +<IfDefine !TEST> + Define servername www.example.com + Define SSL +</IfDefine> +DocumentRoot "/var/www/${servername}/htdocs"</pre> + + + <p><code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> sözdizimi ile + karışmalardan kaçınmak için değişken isimleri ikinokta ":" karakterleri + içeremez.</p> + <div class="note"><h3>Sanal konak bağlamı ve tuzaklar</h3> + <p>Bu yönerge sanal konakta ve dizin içeriğinde desteklendiğinden yapılan + değişiklikler (eşleşsin eşleşmesin) yönergeyi sarmalayan yapılandırma + bölümünden başka, sonraki yapılandırma yönergelerine de görünür olur.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#undefine">UnDefine</a></code></li> +<li><code class="directive"><a href="#ifdefine">IfDefine</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sadece ismi belirtilen dosya sistemi dizininde ve bunun + altdizinlerinde ve bunların içeriğinde uygulanacak bir yönerge grubunu + sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><Directory <code>dizin-yolu</code>> +... </Directory></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><Directory></code> ve + <code></Directory></code> sadece ismi belirtilen dosya sistemi + dizininde, bunun altdizinlerinde ve bu dizinlerin içindeki dosyalara + uygulanacak bir yönerge grubunu + sarmalamakta kullanılır. Bir dizin bağlamında kullanılabilecek her + yönergeye izin verilir. <code>dizin-yolu</code> bir dizinin tam yolu + olabileceği gibi Unix kabuk tarzı bir dosya ismi eşleştirme kalıbı da + olabilir. Kalıp dizgesinde, <code>?</code> herhangi bir tek karakterle, + <code>*</code> herhangi bir karakter dizisiyle eşleşir. Ayrıca + <code>[]</code> karakter aralıkları da kullanılabilir. ‘/’ karakteri + ile hiçbir kalıp karakteri eşleşmez, bu bakımdan <code><Directory + "/*/public_html"></code> ile <code>/home/user/public_html</code> + değil, ama <code><Directory "/home/*/public_html"></code> + eşleşecektir. Örnek:</p> + + <pre class="prettyprint lang-config"><Directory "/usr/local/httpd/htdocs"> + Options Indexes FollowSymLinks +</Directory></pre> + + + <p>Dizin yollarında isterseniz önceleme kullanabilirsiniz, ancak eğer yol + bazı boşluklar içeriyorsa mutlaka kullanmanız gerekir. Bir boşluk aksi + belirtilmedikçe bir ifadenin sonunu belirlediğinden bu gereklidir.</p> + + <div class="note"> + <p><code>dizin-yolu</code> argümanlarını belirtirken dikkatli + olmalısınız: Apache httpd’nin dosyalara erişmekte kullandığı dosya + sistemi yolu ile bire bir eşleşmelidir. Belli bir + <code><Directory></code> dizinine uygulanan yönergeler, aynı + dizine farklı bir yoldan, örneğin başka bir sembolik bağ üzerinden + erişilen dosyalara uygulanmayacaktır.</p> + </div> + + <p><code>~</code> karakterine ek olarak <a class="glossarylink" href="../glossary.html#regex" title="sözlüğe bakınız">düzenli + ifadeler</a> de kullanılabilir. Örnek:</p> + + <pre class="prettyprint lang-config"><Directory ~ "^/www/[0-9]{3}"> + +</Directory></pre> + + + <p>yönergesi <code>/www/</code> içindeki üç rakamdan oluşan dizinlerle + eşleşecektir.</p> + + <p>Eğer çok sayıda (düzenli ifade olmayan) <code class="directive"><Directory></code> bölümü, bir dosyayı içeren bir + dizinle veya üst dizinlerinden biri ile eşleşiyorsa, uygulama en kısa + eşleşmedeki yönergelerden başlayarak <a href="#accessfilename">.htaccess</a> dosyalarındaki yönergelere kadar + genişletilir. Örneğin,</p> + + <pre class="prettyprint lang-config"><Directory "/"> + AllowOverride None +</Directory> + +<Directory "/home"> + AllowOverride FileInfo +</Directory></pre> + + + <p>bölümleri ile <code>/home/web/dir/doc.html</code> belgesine erişirken + şu aşamalardan geçilir:</p> + + <ul> + <li><code>AllowOverride None</code> yönergesi uygulanır + (<code>.htaccess</code> dosyaları iptal edilir).</li> + + <li><code>AllowOverride FileInfo</code> yönergesi uygulanır + (<code>/home</code> dizini için).</li> + + <li>Sırayla <code>/home/.htaccess</code>, + <code>/home/web/.htaccess</code> ve + <code>/home/web/dir/.htaccess</code> dosyaları içindeki + <code>FileInfo</code> yönergeleri uygulanır.</li> + </ul> + + <p>Normal bölümlerin tamamı uygulanıncaya kadar düzenli ifadeler + değerlendirilmez. Düzenli ifadelerin tamamı yapılandırma dosyasında + görüldükleri sıraya göre sınanırlar. Örneğin,</p> + + <pre class="prettyprint lang-config"><Directory ~ "abc$"> + # ... yönergeler burada ... +</Directory></pre> + + + <p>düzenli ifadeli bölümü, tüm normal <code class="directive"><Directory></code> bölümleri ve + <code>.htaccess</code> dosyaları uygulanıncaya kadar + değerlendirilmeyecektir. Düzenli ifadeleri değerlendirmeye sıra gelince + düzenli ifade <code>/home/abc/public_html/abc</code> ile eşleştirilecek + ve buna ilişkin <code class="directive"><Directory></code> + uygulanacaktır.</p> + + <p><strong><code><Directory "/"></code> için öntanımlı erişimin tüm + erişime izin vermek oluşuna dikkat ediniz. Bunu şöyle bir blokla + değiştirmeniz,</strong></p> + + <pre class="prettyprint lang-config"><Directory "/"> + Require all denied +</Directory></pre> + + + <p><strong>ve erişilebilir olmasını istediğiniz dizinleri ayrıca + belirtmeniz önerilir. Daha ayrıntılı bilgi edinmek için <a href="../misc/security_tips.html">Güvenlik İpuçları</a> belgesine + bakınız.</strong></p> + + <p>Dizin bölümleri <code>httpd.conf</code> dosyasında yer alır. + <code class="directive"><Directory></code> yönergeleri iç içe + olamazlar ve bir <code class="directive"><a href="#limit"><Limit></a></code> veya <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> bölümü içinde bulunamazlar.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir düzenli ifade ile eşleşen dosya sistemi dizinlerinin içeriklerine uygulanacak bir yönerge grubunu sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><DirectoryMatch <code>düzifd</code>> +... </DirectoryMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><DirectoryMatch></code> and + <code></DirectoryMatch></code> yönergeleri <code class="directive"><a href="#directory"><Directory></a></code> gibi sadece ismi + belirtilen dosya sistemi dizininde ve içindeki dosyalarda uygulanacak + bir yönerge grubunu sarmalamakta kullanılır. Tek farkla argüman olarak + bir <a class="glossarylink" href="../glossary.html#regex" title="sözlüğe bakınız">düzenli ifade</a> alır. Örnek:</p> + + <pre class="prettyprint lang-config"><DirectoryMatch "^/www/(.+/)?[0-9]{3}/"> + # ... +</DirectoryMatch></pre> + + + <p>yönergesi <code>/www/</code> içindeki (veya alt dizinlerindeki) üç + rakamdan oluşan dizinlerle eşleşecektir.</p> + + <div class="note"><h3>Uyumluluk</h3> + 2.3.9 öncesinde, bu yönerge örtük olarak (<code class="directive"><a href="#directory"><Directory></a></code> gibi) alt dizinlere de uygulanırdı + ve satır sonu simgesi ($) ile eşleşemezdi. 2.3.9 ve sonrasında, sadece + ifade ile eşleşen dizinler sarmalanan yönerge grubundan etkilenmektedir. + </div> + + <div class="note"><h3>Sondaki bölü çizgileri</h3> + Bu yönerge bir bölü çizgisi ile sonlanan veya sonlanmayan dizinler için + yapılan isteklere uygulanır, dolayısıyla satır sonuna ($) çıpalanmış + ifadeler dikkatli yazılmalıdır. + </div> + + <p>2.4.8 itibariyle, isimli gruplar ve geriye başvurular elde edilmekte + olup ilgili isim büyük harfe çevrildikren sonra "MATCH_" ile + öncelendikten sonra ortama yazılmaktadır. Böylece yol elemanlarına + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> gibi modüllerden veya <a href="../expr.html">düzenli ifadelerden</a> başvurmak mümkün + kılınmıştır. Karışıklığı önlemek için, numaralı (isimsiz) geriye + başvurular yoksayılmaktadır. Bunların yerine isimli geriye başvurular + kullanılmalıdır.</p> + + <pre class="prettyprint lang-config"><DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)"> + require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</DirectoryMatch></pre> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li>Normal <code class="directive"><Directory></code> + bölümlerindeki yönergelerle düzenli ifadelerin nasıl karıştırıldığının bir + açıklaması için <code class="directive"><a href="#directory"><Directory></a></code> yönergesine bakınız.</li> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İstemciye görünür olan ana belge ağacının kök dizinini belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>DocumentRoot <code>dizin-yolu</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>DocumentRoot "/usr/local/apache/htdocs"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge <code class="program"><a href="../programs/httpd.html">httpd</a></code> tarafından dosyalarının sunulacağı + dizini belirler. <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code> + benzeri bir yönerge ile eşleşmedikçe, sunucu istenen URL’deki yolu, + belge yolu haline getirmek için belge kök dizinine ekler. Örnek:</p> + + <pre class="prettyprint lang-config">DocumentRoot "/usr/web"</pre> + + + <p>yapılandırması ile <code>http://my.example.com/index.html</code> + isteği <code>/usr/web/index.html</code> ile eşleştirilir. + <code>dizin-yolu</code> ile göreli dosya yolu belirtildiği takdirde belge + kök dizininin <code class="directive"><a href="#serverroot">ServerRoot</a></code> ile + belirtilen sunucu kök dizinine göre belirtildiği varsayılır.</p> + + <p><code class="directive">DocumentRoot</code> ile belirtilen dizin bir bölü + çizgisi ile bitirilmemelidir.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../urlmapping.html#documentroot">URL’lerin Dosya Sistemi + ile Eşlenmesi</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Else" id="Else"><Else></a> <a name="else" id="else">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Önceki bir <code class="directive"><a href="#if"><If></a></code> veya <code class="directive"><a href="#elseif"><ElseIf></a></code> bölümünün koşulu, çalışma anında bir istek tarafından yerine getirilmediği takdirde uygulanacak yönergeleri içerir</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><Else> ... </Else></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>İç içe geçmiş koşullar 2.4.26 ve sonrasında değerlendirilmeye alınır</td></tr> +</table> + <p><code class="directive"><Else></code> sadece ve sadece aynı etki + alanındaki en son <code class="directive"><If></code> veya + <code class="directive"><ElseIf></code> bölümü uygulanmamışsa + kapsadığı yönergeleri uygular. Örneğin:</p> + + <pre class="prettyprint lang-config"><If "-z req('Host')"> + # ... +</If> +<Else> + # ... +</Else></pre> + + + <p>Burada, <code class="directive"><If></code> yönergesi + <code>Host:</code> başlıksız HTTP/1.0 istekleriyle eşleşirken <code class="directive"><Else></code> <code>Host:</code> başlıklılarla + eşleşir.</p> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code> ve + <code class="directive"><Else></code> son olarak uygulanır.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ElseIf" id="ElseIf"><ElseIf></a> <a name="elseif" id="elseif">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İçerdiği koşulun bir istek tarafınan sağlandığı ancak daha önceki bir <code class="directive"><a href="#if"><If></a></code> veya +<code class="directive"><ElseIf></code> bölümlerininkilerin sağlanmadığı durumda kapsadığı yönergelerin uygulanmasını sağlar</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><ElseIf <code>ifade</code>> ... </ElseIf></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>İç içe geçmiş koşullar 2.4.26 ve sonrasında değerlendirilmeye alınır</td></tr> +</table> + <p><code class="directive"><ElseIf></code> kapsadığı yönergeleri + sadece ve sadece belirtilen koşulun doğrulandığı ancak aynı etki + alanında hemen önceki <code class="directive"><If></code> veya + <code class="directive"><ElseIf></code> yönergesinin uygulanmadığı + takdirde uygular. Örnek:</p> + + <pre class="prettyprint lang-config"><If "-R '10.1.0.0/16'"> + #... +</If> +<ElseIf "-R '10.0.0.0/8'"> + #... +</ElseIf> +<Else> + #... +</Else></pre> + + + <p><code class="directive"><ElseIf></code> bir isteğin uzak adresi + 10.0.0.0/8 ağına aitse ama 10.1.0.0/16 ağına ait değilse içerdiği + yönergelerin uygulanmasını sağlar.</p> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li>Tam bir kaynak ve daha fazla örnek için: <a href="../expr.html">Apache HTTP Sunucusundaki ifadeler</a></li> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code> ve + <code class="directive"><Else></code> son olarak uygulanır.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Teslimat sırasında okunacak dosyalar için bellek eşlemeyi etkin + kılar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>EnableMMAP On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>EnableMMAP On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td><code>none</code> değeri Apache 2.2.7 ve sonrasında mevcuttur. +</td></tr> +</table> + <p>Bu yönerge, sunucunun teslimat sırasında gerektiği takdirde bir dosya + içeriğinin okunması için bellek eşleme kullanıp kullanmayacağını + belirler. Öntanımlı olarak, bir isteğin yerine getirilmesi, + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> kullanarak sunucu tarafından çözümlenen + bir dosyanın teslimatı sırasında olduğu gibi, bir dosya içindeki veriye + erişilmesini gerektirdiğinde Apache httpd, işletim sistemi tarafından + desteklendiği takdirde dosyayı belleğe eşler.</p> + + <p>Böyle bellek eşleme kimi zaman başarım artışını beraberinde getirirse + de bazen sorunlardan kaçınmak için bellek eşlemeyi kapatmak daha iyi + sonuç verir:</p> + + <ul> + <li>Bazı çok işlemcili sistemlerde bellek eşleme + <code class="program"><a href="../programs/httpd.html">httpd</a></code>’nin başarımını düşürebilmektedir.</li> + <li><code class="program"><a href="../programs/httpd.html">httpd</a></code> bellek eşlemli çalışırken bir dosyanın + silinmesi veya boyutunun küçültülmesi <code class="program"><a href="../programs/httpd.html">httpd</a></code>'nin + parçalama arızası vererek çökmesine yol açabilir.</li> + </ul> + + <p>Bu tür sorunlardan dolayı zarar görülebilecek sunucu + yapılandırmalarında dosya teslimatında bellek eşlemlerinin kullanımını + şu şekilde iptal etmeniz gerekir:</p> + + <pre class="prettyprint lang-config">EnableMMAP Off</pre> + + + <p>Bu özellik, sadece NFS dosya sistemi üzerinde sunulan dosyaları + kapsamak üzere şu şekilde kolayca kapatılabilir:</p> + + <pre class="prettyprint lang-config"><Directory "/nfs-dosyaları-yolu"> + EnableMMAP Off +</Directory></pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Dosyaların istemciye tesliminde çekirdeğin dosya gönderme + desteğinin kullanımını etkin kılar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>EnableSendfile On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>EnableSendfile Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Öntanımlı değer 2.3.9 sürümünde Off olarak değişti.</td></tr> +</table> + <p>Bu yönerge, dosya içeriğinin istemciye teslimi için + <code class="program"><a href="../programs/httpd.html">httpd</a></code>’nin çekirdeğin dosya gönderme desteğini + kullanıp kullanmayacağını belirler. Öntanımlı olarak, bir isteğin + yerine getirilmesi, bir durağan dosyanın teslimatı sırasında olduğu + gibi, bir dosya içindeki veriye erişilmesini gerektirmediği takdirde + Apache httpd, işletim sistemi tarafından destekleniyorsa dosyayı + istemciye teslim etmek için çekirdeğin dosya gönderme özelliğini + kullanır.</p> + + <p>Çekirdeğin dosya gönderme mekanizması, okuma, gönderme ve tampon + ayırma işlemlerini ayrı ayrı yapmaktan kaçınır. Fakat bazı + platformlarda veya bazı dosya sistemlerinde aşağıda belirtilen işlemsel + sorunlardan kaçınmak için bu özelliği iptal etmek daha iyidir:</p> + + <ul> + <li>Bazı platformlar, derleme sistemince saptanamayan bozuk bir dosya + gönderme desteğine sahiptir; özellikle eğer derleme işlemi dosya + gönderme desteğinde sorun olmayan bir makinede yapılıp çalıştırılabilir + dosyaların sorunlu makineye kurulduğu durumda bu saptama + yapılamayacaktır.</li> + <li>Linux’ta IPv6 kullanırken dosya gönderme desteği bazı ağ + kartlarındaki TCP toplama sağlaması aktarım hatasını tetikler.</li> + <li>Itanium üzerinde çalışan Linux’ta dosya gönderme desteği + (<code>sendfile</code>) 2GB’tan büyük dosyalarla çalışamamaktadır.</li> + <li><code class="directive"><a href="#documentroot">DocumentRoot</a></code> ağ dosya sistemi + (NFS, SMB, CIFS, FUSE gibi) üzerinde olduğu durumda çekirdek ağ + dosyalarını kendi arabelleği üzerinden sunamayabilir.</li> + </ul> + + <p>Bu sorunlardan muzdarip sunucu yapılandırmaları için bu özelliği şöyle + etkin kılabilirsiniz:</p> + + <pre class="prettyprint lang-config">EnableSendfile On</pre> + + + <p>Bu özellik, sadece bir ağ dosya sistemi üzerinde sunulan + dosyaları kapsamak üzere şu şekilde kolayca kapatılabilir:</p> + + <pre class="prettyprint lang-config"><Directory "/nfs-dosyaları-yolu"> + EnableSendfile Off +</Directory></pre> + + +<p><code class="directive">EnableSendfile</code> yönergesinin .htaccess ve + diziniçi yapılandırmalarının <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code> tarafından + desteklenmediğini lütfen aklınızdan çıkarmayın. + <code class="directive">EnableSendfile</code> yönergesinin sadece küresel + tanımları hesaba katılır.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Özel bir hata iletisiyle yapılandırma çözümlemesini durdurur</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>Error <code>ileti</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.3.9 ve sonrası</td></tr> +</table> + <p>Yapılandırmada bir hatanın saptanması istenirse, bu yönerge + yapılandırma çözümlemesinin durdurulması ve özel bir hata iletisi + üretilmesi için kullanılabilir. Genelde kullanıldığı durum, gerekli + modüllerin yapılandırmada bulunmadığının raporlanmasıdır.</p> + + <pre class="prettyprint lang-config"># Örnek +# mod_include yüklü değilse bilelim +<IfModule !include_module> + Error "Hata: mod_include mod_foo için gerekiyor. LoadModule ile yükleyin." +</IfModule> + +# SSL veya NOSSL tanımlı mı bilelim +<IfDefine SSL> +<IfDefine NOSSL> + Error "Ne SSL ne de NOSSL tanımlı. Sadece biri tanımlı olsa yeter." +</IfDefine> +</IfDefine> +<IfDefine !SSL> +<IfDefine !NOSSL> + Error "Ya SSL ya da NOSSL tanımlı olmalı." +</IfDefine> +</IfDefine></pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir hata durumunda sunucunun istemciye ne döndüreceğini + belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ErrorDocument <code>hata-kodu</code> <code>belge</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bir sorun çıktığında veya hata oluştuğunda Apache httpd şu dört + işlemden birini yapacak şekilde yapılandırılabilir:</p> + + <ol> + <li>Yerleşik bir hata iletisi çıktılanır.</li> + + <li>Özel bir ileti çıktılanır.</li> + + <li>Sorunu/hatayı işleyecek yerel bir <code>URL-yoluna</code> dahili bir + yönlendirme yapılır.</li> + + <li>Sorunu/hatayı işleyecek harici bir <code>URL-yoluna</code> + yönlendirme yapılır.</li> + </ol> + + <p>İlk seçenek öntanımlıdır. Diğer üç seçenek + <code class="directive">ErrorDocument</code> yönergesinin argümanları (hata + kodundan sonra bir URL veya hata iletisi) ile belirtilir. Apache httpd + bazı durumlarda sorun/hata ile ilgili ek bilgi verecektir.</p> + + <p>2.4.13 itibariyle, özdevinimli dizgeler ve URLler üretmek için yönerge + içinde <a href="../expr.html">ifade sözdizimi</a> kullanılabilir.</p> + + <p>URL’ler yerel yollarda (<code class="directive"><a href="#documentroot">DocumentRoot</a></code>’a göre) bir bölü çizgisi (/) ile + başlatılabileceği gibi istemci tarafından çözümlenecek tam bir URL + şeklinde de belirtilebilir. Bunlar yerine, tarayıcıda gösterilmek üzere + bir ileti de belirtilebilir. Örnekler:</p> + + <pre class="prettyprint lang-config">ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi +ErrorDocument 404 /errors/bad_urls.php +ErrorDocument 401 /subscription_info.html +ErrorDocument 403 "Kusura bakmayın, bugün hizmet veremiyoruz." +ErrorDocument 403 /errors/forbidden.pl?referrer=%{escape:%{HTTP_REFERER}}</pre> + + + <p>Bunlardan başka, Apache httpd’nin kendi hata iletilerinin kullanılacağı + özel <code>default</code> değeri ile belirtilebilir. Normal şartlar + altında gerekmese de, bir şey belirtilmediği takdirde mevcut bir + <code class="directive">ErrorDocument</code> yönergesini miras alan + yapılandırmalarda Apache httpd’nin kendi hata iletilerinin kullanımı + <code>default</code> değeri açıkça belirtilerek örnekteki gibi + zorlanabilir:</p> + + <pre class="prettyprint lang-config">ErrorDocument 404 /cgi-bin/bad_urls.pl + +<Directory "/web/docs"> + ErrorDocument 404 default +</Directory></pre> + + + <p><code class="directive">ErrorDocument</code> yönergesinde bir uzak URL (önünde + <code>http</code> bulunan bir yol) belirtildiğinde, belge aynı sunucuda + olsa bile, Apache HTTP Sunucusunun istemciye belgeyi bulacağı yer için bir + yönlendirme göndereceğine dikkat ediniz. Bunun bazı istenmeyen etkileri + vardır; en önemlilerinden biri istemcinin hata kodu yerine bir + yönlendirme durum kodu alacak olmasıdır. Bu, bir URL’nin geçerliliğini + durum koduna göre saptayan istemciler veya robotlar için yanıltıcı + olacaktır. Buna ek olarak, <code>ErrorDocument 401</code> için bir uzak + URL belirttiğiniz durumda istemci 401 durum kodunu almayacağı için + kullanıcıdan parola isteğinde bulunamayacaktır. Bu bakımdan, + <strong>ihtiyaç duyduğunuz takdirde, <code>ErrorDocument 401</code> + yönergesine yerel bir belge belirtmelisiniz.</strong></p> + + <p>Sunucunun ürettiği hata iletileri "çok kısa" olduğu takdirde, + Microsoft Internet Explorer (MSIE) öntanımlı olarak bu hata iletilerini + yoksayar ve bunun yerine kendi "kullanıcı dostu" hata iletilerini + kullanır. "Çok kısa" eşiği duruma göre değişmekle birlikte, genellikle, + hata iletileriniz 512 bayttan büyük olduğu takdirde MSIE kendi hata + iletileri yerine sunucunun ürettiği hata iletilerini gösterecektir. Bu + konuda daha fazla bilgiyi <a href="http://support.microsoft.com/default.aspx?scid=kb;tr-tr;Q294807">Q294807</a> kodlu Microsoft Knowledge Base makalesinde + bulabilirsiniz.</p> + + <p>Çoğu yerleşik hata iletisi özel iletilerle değiştirilebilse de bazı + durumlarda <code class="directive"><a href="#errordocument">ErrorDocument</a></code> ile ne + belirtildiğine bakılmaksızın yerleşik hata iletileri kullanılır. + Özellikle, bozuk bir istek saptandığında normal istek işleme hemen + devre dışı bırakılır ve yerleşik hata iletisi döndürülür. Bu, hatalı + istekler yaparak güvenlik sorunlarına yol açılmak istenmesi + durumlarında gereklidir.</p> + + <p><code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> kullanıyorsanız, + <code class="directive"><a href="../mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> yönergesini + etkin kılmak isteyebilirsiniz, böylece asıl sunucular adına özel hata + iletileri üretebilirsiniz. <code>ProxyErrorOverride</code> etkin + kılınmak istenmezse, Apache httpd vekalet edilen içerik için özel hata + belgeleri üretmeyecektir.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../custom-error.html">Özel Hata Yanıtları</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun hata günlüğünü tutacağı yeri belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code> ErrorLog <code>dosya-yolu</code>|syslog[:[<code>oluşum</code>][:<code>etiket</code>]]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows ve OS/2)</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ErrorLog</code> yönergesi sunucunun saptadığı hataları + kaydedeceği dosyanın ismini belirtmek için kullanılır. + <code>dosya-yolu</code> ile göreli dosya yolu belirtildiği takdirde + dizininin <code class="directive"><a href="#serverroot">ServerRoot</a></code> ile + belirtilen sunucu kök dizinine göre belirtildiği varsayılır.</p> + + <pre class="prettyprint lang-config">ErrorLog "/var/log/httpd/error_log"</pre> + + + <p><code>dosya-yolu</code> bir boru imi "<code>|</code>" ile başlatıldığı + takdirde hata iletilerinin hata günlüğünü işleme sokacak komuta + borulanacağı varsayılır.</p> + + <pre class="prettyprint lang-config">ErrorLog "|/usr/local/bin/httpd_errors"</pre> + + + <p>Daha fazla bilgi için <a href="../logs.html#piped">borulu + günlüklere</a> bakınız.</p> + + <p>Dosya adı yerine <code>syslog</code> kullanılırsa, sistem desteklediği + takdirde günlük kaydı syslogd(8) üzerinden yürütülür. Öntanımlı olarak + <code>local7</code> syslog oluşumu kullanılır. Bunu + <code>syslog:<code>oluşum</code></code> sözdizimini kullanarak + değiştirebilirsiniz. Buradaki <code><code>oluşum</code></code> + syslog.conf(5) kılavuz sayfasında belirtilen oluşum isimlerinden biri + olabilir. Oluşum aslında küreseldir ve sanal konaklardan bazılarında + değiştirilmişse, belirtilen en son oluşum tüm sunucuyu + etkileyecektir. <code><code>etiket</code></code> için de aynı kurallar + uygulanır. Genellikle, öntanımlı etiket olarak Apache çalıştırılabilirinin + ismi olan <code>httpd</code> kullanılır. Öntanımlı etiketi + <code>syslog::<code>etiket</code></code> sözdizimini kullanarak + değiştirebilirsiniz </p> + + <pre class="prettyprint lang-config">ErrorLog syslog:user +ErrorLog syslog:user:httpd.srv1 +ErrorLog syslog::httpd.srv2</pre> + + + <p>GÜVENLİK: Günlük dosyalarının saklandığı dizin, sunucuyu başlatan + kullanıcı dışındakiler tarafından yazılabilir olduğu takdirde + güvenliğinizin nasıl tehlikeye gireceği <a href="../misc/security_tips.html#serverroot">güvenlik ipuçları</a> + belgesinde ayrıntılı olarak açıklanmıştır.</p> + <div class="warning"><h3>Ek Bilgi</h3> + <p>Unix-dışı platformlarda dosya yolunu girerken, platform ters bölü + çizgilerini desteklese bile normal bölü çizgileri kullanmaya özen + göstermelisiniz. Genel olarak, dosya yollarını belirtirken + yapılandırma dosyası boyunca normal bölü çizgisi kullanmak her zaman + daha iyidir.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache HTTP Sunucusunun Günlük Dosyaları</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Hata günlüğü girdileri için biçem belirtimi</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code> ErrorLogFormat [connection|request] <code>biçem</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ErrorLogFormat</code> yönergesi, hata günlüğünde asıl + hata iletisine ek olarak günlüklenecek ek bilgiyi belirtmek için + kullanılabilir.</p> + + <pre class="prettyprint lang-config">#Basit örnek +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"</pre> + + + <p>İlk değiştirge olarak <code>connection</code> veya <code>request</code> + belirtilmesi ek biçemlerin belirtilebilmesini sağlar. Böylece, belli bir + bağlantı ya da istek için ilk ileti günlüklendiğinde ek bilgininde + günlüklenmesi sağlanır. Bu ek bilgi sadece bağlantı/istek başına bir + kere günlüklenir. herhangi bir günlük iletisine sebep olmadan işlenmişse + ek bilgi de günlüklenmez.</p> + + <p>Bu, bazı biçem dizgesi öğeleri çıktı üretmediğinde olur. Örneğin, + <code>Referer</code> başlığı sadece günlük iletisi bir istekle + ilişkilendirilmişse mevcuttur ve hata iletisi <code>Referer</code> + başlığı istemcide okunduğu anda oluşur. Eğer bir çıktı üretilmezse, + öntanımlı davranış önceki boşluk karakterinden sonraki boşluk + karakterine kadar herşeyi silmektir. Yani, günlük satırı örtük olarak + boşluklarla ayrılmış alanlara bölünür. Bir biçem dizgesi öğesi çıktı + üretmezse alanın tamamı çıktılanmaz. Örneğin, <code>[%t] [%l] [%a] + %M </code> günlük biçeminde uzak adres <code>%a</code> + kullanılamazsa sarmalayıcı köşeli ayraçlar da günlüklenmeyecektir. + Boşluk karakterleri ters bölülerle öncelenerek bir alanı sınırlaması + önlenebilir. '% ' (yüzde boşluk) çifti sıfır genişlikte bir alan + ayracı olup herhangi bir çıktı üretmez.</p> + + <p>Yukarıdaki davranış, biçem dizgesi öğesine değiştirciler eklenerek + değiştirilebilir. <code>-</code> (tire) değiştircisi ilgili öğe bir + çıktı üretmediğinde tire iminin günlüklenmesine sebep olur. + Bağlantı/istek başına bir kere biçemlerinde <code>+</code> (artı) + değiştircisini de kullanmak mümkündür.Artı değiştiricili bir öğe + herhangi bir çıktı üretmezse satırın tamamı günlüklenmez.</p> + + <p>Bir biçem öğesine günlük önem derecesi atamak için değiştirici + olarak bir sayı kullanılabilir. Bu öğenin günlüklenebilmesi için günlük + iletisinin önem derecesinin belirtilen günlük önem derecesinden + daha yüksek olmaması gerekir. Sayı 1'den (alarm) 4'e (uyarı) ve 7'den + (hata ayıklama) 15'e (trace8) kadar olabilir.</p> + + <p>Örneğin, <code>Referer</code> istek başlığını günlükleyen + <code>%{Referer}i</code> dizgeciğine değiştirciler eklendiğinde neler + olduğunu burada görebilirsiniz:</p> + + <table class="bordered"><tr class="header"><th>Değiştirlen Dizgecik</th><th>Anlamı</th></tr> +<tr> + <td><code>%-{Referer}i</code></td> + <td><code>Referer</code> atanmamışsa bir <code>-</code> günüklenir.</td> + </tr> +<tr class="odd"> + <td><code>%+{Referer}i</code></td> + <td><code>Referer</code> atanmamışsa satırın tamamı çıktılanmaz.</td> + </tr> +<tr> + <td><code>%4{Referer}i</code></td> + <td>Sadece hata iletisinin önemi 4'ten yüksek olduğu durumda + <code>Referer</code> günlüklenir.</td> + </tr> +</table> + + <p>Bazı biçem dizfesi öğeleri ayraç içine alınmış ek değiştirgeler kabul + eder.</p> + + <table class="bordered"><tr class="header"><th>Biçem Dizgesi</th> <th>Açıklama</th></tr> +<tr><td><code>%%</code></td> + <td>Yüzde imi</td></tr> +<tr class="odd"><td><code>%a</code></td> + <td>İstekteki istemci IP adresi ve portu</td></tr> +<tr><td><code>%{c}a</code></td> + <td>Bağlantının emsal IP adresi and portu + (<code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> modülüne bakın)</td></tr> +<tr class="odd"><td><code>%A</code></td> + <td>Yerel IP adresi ve portu</td></tr> +<tr><td><code>%{<em>isim</em>}e</code></td> + <td>İstek ortam değişkeni <em>isim</em></td></tr> +<tr class="odd"><td><code>%E</code></td> + <td>APR/OS hata durum kodu ve iletisi</td></tr> +<tr><td><code>%F</code></td> + <td>Günlük çağrısının kaynak dosya ismi ve satır numarası</td></tr> +<tr class="odd"><td><code>%{<em>isim</em>}i</code></td> + <td>İstek başlığı <em>isim</em></td></tr> +<tr><td><code>%k</code></td> + <td>Bağlantıdaki keep-alive isteklerinin sayısı</td></tr> +<tr class="odd"><td><code>%l</code></td> + <td>İletinin günlük seviyesi</td></tr> +<tr><td><code>%L</code></td> + <td>İsteğin günlük kimliği</td></tr> +<tr class="odd"><td><code>%{c}L</code></td> + <td>Bağlantının günlük kimliği</td></tr> +<tr><td><code>%{C}L</code></td> + <td>Bağlantı etki alanında kullanılmışsa bağlantının günlük kimliği, + aksi takdirde boş</td></tr> +<tr class="odd"><td><code>%m</code></td> + <td>İletiyi günlükleyen modülün ismi</td></tr> +<tr><td><code>%M</code></td> + <td>Asıl günlük iletisi</td></tr> +<tr class="odd"><td><code>%{<em>isim</em>}n</code></td> + <td>istek notu <em>isim</em></td></tr> +<tr><td><code>%P</code></td> + <td>Geçerli sürecin süreç kimliği (PID'i)</td></tr> +<tr class="odd"><td><code>%T</code></td> + <td>Geçerli evrenin evre kimliği</td></tr> +<tr><td><code>%{g}T</code></td> + <td>Geçerli evrenin eşsiz sistem evre kimliği (örn, <code>top</code> + tarafınan gösterilenle aynı kimlik: şimdilik sadece Linux'a + özgü)</td></tr> +<tr class="odd"><td><code>%t</code></td> + <td>geçerli zaman</td></tr> +<tr><td><code>%{u}t</code></td> + <td>Mikro saniyeler dahil geçerli zaman</td></tr> +<tr class="odd"><td><code>%{cu}t</code></td> + <td>ISO 8601 biçemiyle uyumlu mikro saniyeleri de içeren geçerli + zaman</td></tr> +<tr><td><code>%v</code></td> + <td>Geçerli sunucunun kurallı <code class="directive"><a href="#servername">ServerName</a></code></td></tr> +<tr class="odd"><td><code>%V</code></td> + <td><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> ayarına + uygun olarak isteği sunan sunucunun sunucu ismi</td></tr> +<tr><td><code>\ </code> (tersbölü boşluk)</td> + <td>Alan ayracı olmayan boşluk</td></tr> +<tr class="odd"><td><code>% </code> (yüzde boşluk)</td> + <td>Alan ayracı (çıktısız)</td></tr> +</table> + + <p>The log ID format <code>%L</code> günlük kimliği biçemi bağlantı veya + istek için eşsiz bir kimlik üretir. Bu, bağlantı üzerinden gelen istek + durumunda günlük satırlarının ait olduğu bağlantı veya isteği + bağdaştırmak için kullanılabilir. <code>%L</code> biçem dizgesi ayrıca + <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code> modülünde erişim günlüğü iletilerini + hata günlüğü iletileriyle ilişklendirmek için de kullanılabilmektedir. + <code class="module"><a href="../mod/mod_unique_id.html">mod_unique_id</a></code> modülü yüklüyse onun eşsiz kimliği + istekler için günlük kimliği olarak kullanılacaktır.</p> + + <pre class="prettyprint lang-config">#Örnek (Evreli MPM'ler için öntanımlı biçim) +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"</pre> + + + <p>Bunun hata iletilerindeki sonuçları şöyle olabilir:</p> + + <div class="example"><p><code> + [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico + </code></p></div> + + <p>Dikkat edin, yukarıda açıklandığı gibi, bazı alanlar + tanımlanmadıklarından tamamen yoksayılır.</p> + + <pre class="prettyprint lang-config">#Örnek (2.2.x biçimine benzer) +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"</pre> + + + <pre class="prettyprint lang-config">#İstek/bağlantı günlük kimlikli gelişkin bir örnek +ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M" +ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T" +ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'" +ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'" +ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"</pre> + + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li> +<li><a href="../logs.html">Apache HTTP Sunucusu Günlük Dosyaları</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Her istekte ek durum bilgisinin izini sürer</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ExtendedStatus On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge, o an işlenmekte olan istek hakkında evre başına ek veriyi + ve kullanım özetini izler; <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> modülünü + yapılandırarak bu değişkenleri çalışma anında görebilirsiniz. Diğer + modüllerin bu sonuçlara bel bağlayabileceğini unutmayın.</p> + + <p>Bu ayarlar sunucunun tamamına uygulanır ve bir sanal konakta etkin + başka bir sanal konakta etkisiz kılınamaz. Ek durum bilgisinin + toplanması sunucuyu yavaşlatabilir. Ayrıca, bu ayarın nazikçe yeniden + başlatma sırasında değiştirilemeyeceğine dikkat ediniz.</p> + + <div class="note"> + <p>Diğer üçüncü parti modüller aynısını yaparken + <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> modülünün yüklenmesi <code>ExtendedStatus + On</code> için öntanımlı davranışı değiştirecektir. Böyle modüller, + tüm evrelerin durumu hakkında ayrıntılı bilgi toplanmasına bel bağlar. + Öntanımlı değer sürüm 2.3.6 itibariyle <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> + tarafından değiştirilmiştir. Önceki sürümlerde öntanımlı değer daima + <code>Off</code> idi.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Duruk dosyalar için <code>ETag</code> HTTP yanıt başlığını oluşturmakta kullanılacak dosya özniteliklerini belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>FileETag <code>bileşen</code> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>FileETag MTime Size</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.3.14 ve öncesinde öntanımlı değer + "INode MTime Size" idi.</td></tr> +</table> + <p><code class="directive">FileETag</code> yönergesi, belge bir duruk dosyaya + dayandığı takdirde <code>ETag</code> (Entity Tag - öğe etiketi + kısaltması) yanıt başlığı alanını oluşturmakta kullanılacak dosya + özniteliklerini yapılandırır. (<code>ETag</code> değeri, ağ band + genişliğinden kazanmak için arabellek yönetiminde kullanılır.) + <code class="directive">FileETag</code>yönergesi ne kullanılması gerektiğini + belirleyebilmenizi sağlar. Değer olarak belirtilebilecek anahtar + sözcükler şunlardır:</p> + + <dl> + <dt><strong>INode</strong></dt> + <dd>Dosyanın düğüm numarası hesaba katılır.</dd> + <dt><strong>MTime</strong></dt> + <dd>Dosyanın son değişiklik tarih ve saati dahil edilir.</dd> + <dt><strong>Size</strong></dt> + <dd>Dosyanın bayt cinsinden uzunluğu dahil edilir.</dd> + <dt><strong>All</strong></dt> + <dd>Olası tüm alanlar kullanılır. Bu şuna eşdeğerdir: + <pre class="prettyprint lang-config">FileETag INode MTime Size</pre> +</dd> + <dt><strong>Digest</strong></dt> + <dd>Bir belge dosya tabanlı ise <code>ETag</code> alanı dosyanın özeti + alınarak hesaplanır.</dd> + <dt><strong>None</strong></dt> + <dd>Bir belge dosyasıyla sunulsa bile yanıta hiçbir <code>ETag</code> + alanı dahil edilmez.</dd> + </dl> + + <p>Öntanımlı ayarları miras alıp bunların kapsamını genişletmek/daraltmak + için <code>INode</code>, <code>MTime</code>, <code>Size</code> ve + <code>Digest</code> anahtar sözcüklerinin önüne <code>+</code> veya + <code>-</code> imi konabilir. Bu imlerin bulunmadığı bir anahtar + sözcüğün varlığı halinde hiçbir değer miras alınmaz.</p> + + <p>Eğer bir dizinin yapılandırması + <code>FileETag INode MTime Size</code> ve alt dizini + <code>FileETag -INode</code> içeriyorsa bu alt dizinin (ve bir + geçersizleştirme olmadığı takdirde onun alt dizinlerinin) ayarları + <code>FileETag MTime Size</code> yapılandırmasına eşdeğer + olacaktır.</p> + <div class="note"><h3>Sunucu Taraflı İçerik</h3> + Gömülü SSI yönergeleri ile bir duruk dosyanın <code>FileETag</code>, + <code>MTime</code>, <code>Size</code> ve <code>Digest</code> değerleri + değişmeksizin yanıt öğesi değişebileceğinden <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + tarafından çözümlenen yanıtlar için bir <code>ETag</code> üretilmez. + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Files" id="Files"><Files></a> <a name="files" id="files">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Dosya isimleriyle eşleşme halinde uygulanacak yönergeleri + içerir.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><Files <code>dosya-adı</code>> ... </Files></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><Files></code> yönergesi, içerdiği + yönergelerin etki alanını dosya isimlerine göre sınırlandırır. + <code class="directive"><a href="#directory"><Directory></a></code> ve + <code class="directive"><a href="#location"><Location></a></code> bölümleri + ile karşılaştırılabilir. Bir <code></Files></code> yönergesi ile + sonlandırılması gerekir. Bu bölüm içinde belirtilen yönergeler, + <code class="directive"><Files></code> yönergesinde belirtilen + <code>dosya-adı</code>’nın son bileşeniyle (dizinler atıldıktan sonda + kalan dosya ismi) eşleşen nesnelere uygulanır. <code class="directive"><Files></code> bölümleri yapılandırma dosyasında, + <code class="directive"><a href="#directory"><Directory></a></code> bölümleri + ve <code>.htaccess</code> dosyaları okunduktan sonra fakat <code class="directive"><a href="#location"><Location></a></code> yönergelerinden önce + göründükleri sıraya göre işleme sokulurlar. <code class="directive"><Files></code> bölümlerinin <code class="directive"><a href="#directory"><Directory></a></code> bölümlerinin içinde uygulama + alanını sınırlamak amacıyla kullanılabileceğine dikkat ediniz.</p> + + <p><code>dosya-adı</code> argümanının bir dosya ismi veya bir dosya ismi + kalıbı içermesi gerekir. Bir dosya ismi kalıbındaki her <code>?</code> + imi bir karakterle eşleştirilirken <code>*</code> imi karakter dizileri + ile eşleştirilir.</p> + + <pre class="prettyprint lang-config"><Files "zat.html"> + # zat.html dosyasına uygulanacakları buraya koy +</Files> + +<Files "?at.*"> + # Buradakiler hat.html, kat.html, tat.html ve benzerlerine uygulanır. +</Files></pre> + + + <p><code>~</code> imine ek olarak <a class="glossarylink" href="../glossary.html#regex" title="sözlüğe bakınız">düzenli ifadeler</a> de kullanılabilir. Örneğin</p> + + <pre class="prettyprint lang-config"><Files ~ "\.(gif|jpe?g|png)$"> + #... +</Files></pre> + + + <p>satırı en bilinen resim dosyası biçimleriyle eşleşecektir. Bunun + yerine <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> + yönergesi de tercih edilebilirdi.</p> + + <p><code class="directive"><a href="#directory"><Directory></a></code> ve + <code class="directive"><a href="#location"><Location></a></code> + bölümlerinin aksine, <code class="directive"><Files></code> + bölümleri <code>.htaccess</code> dosyaları içinde kullanılabilir. Bu + sayede kullanıcıların kendi dosyalarına erişimi dosya seviyesinde + denetlemelerine imkan sağlanmış olur.</p> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a> <a name="filesmatch" id="filesmatch">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Düzenli ifadelerin dosya isimleriyle eşleşmesi halinde + uygulanacak yönergeleri içerir.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><FilesMatch <code>düzifd</code>> ... </FilesMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><FilesMatch></code> yönergesi, içerdiği + yönergelerin etki alanını <code class="directive"><a href="#files"><Files></a></code> yönergesinin yaptığı gibi dosya + isimlerine göre sınırlandırır. Ancak, argüman olarak bir <a class="glossarylink" href="../glossary.html#regex" title="sözlüğe bakınız">düzenli ifade</a> kabul eder. Örneğin</p> + + <pre class="prettyprint lang-config"><FilesMatch "\.(gif|jpe?g|png)$"> + # ... +</FilesMatch></pre> + + + <p>satırı en bilinen resim dosyası biçimleriyle eşleşecektir.</p> + + <div class="note">Düzenli ifadenin başlangıcındaki bir <code>.+</code> + <code>.png</code>veya <code>.gif</code> dosyalarının, örnek olarak, + eşleşmemesini garanti eder.</div> + + <p>2.4.8 itibariyle, isimli gruplar ve geriye başvurular elde edilmekte + olup ilgili isim büyük harfe çevrildikren sonra "MATCH_" ile + öncelendikten sonra ortama yazılmaktadır. Böylece yol elemanlarına + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> gibi modüllerden veya <a href="../expr.html">düzenli ifadelerden</a> başvurmak mümkün + kılınmıştır. Karışıklığı önlemek için, numaralı (isimsiz) geriye + başvurular yoksayılmaktadır. Bunların yerine isimli geriye başvurular + kullanılmalıdır.</p> + +<pre class="prettyprint lang-config"><FilesMatch "^(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</FilesMatch></pre> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FlushMaxPipelined" id="FlushMaxPipelined">FlushMaxPipelined</a> <a name="flushmaxpipelined" id="flushmaxpipelined">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Ağa akıtılacak azami ardışık yanıt sayısı</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>FlushMaxPipelined <code>sayı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>FlushMaxPipelined 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.47 ve sonrası</td></tr> +</table> + <p>Bu yönerge, ardışık düzenli istek alındığı sürece beklemede kalan azami + ardışık yanıt sayısını yapılandırmaya izin verir. Sınıra ulaşıldığında, + yanıtlar tekrar sınırın altına inene kadar engelleme kipinde ağa zorla + boşaltılır.</p> + + <p><code class="directive">FlushMaxPipelined</code>, bellek kullanımını + kısıtlamaya yardımcı olur. <code>0</code> olarak ayarlandığında ardışık + düzen devre dışı bırakılır, <code>-1</code> olarak ayarlandığında sınır + yoktur (<code class="directive">FlushMaxThreshold</code> hala geçerlidir).</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="FlushMaxThreshold" id="FlushMaxThreshold">FlushMaxThreshold</a> <a name="flushmaxthreshold" id="flushmaxthreshold">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bekleyen verilerin ağa boşaltılacağı eşik değer</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>FlushMaxThreshold <code>bayt-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>FlushMaxThreshold 65536</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.47 ve sonrası</td></tr> +</table> + <p>Bu yönerge, bekleyen çıktı verileri için eşiği (bayt cinsinden) + yapılandırmaya izin verir. Sınıra ulaşıldığında, veriler tekrar sınırın + altına inene kadar engelleme kipinde ağa zorla boşaltılır.</p> + + <p><code class="directive">FlushMaxThreshold</code>, bellek kullanımını kısıtlamaya + yardımcı olur. <code>0</code>'a veya çok küçük bir değere ayarlandığında, + gerçekte hiç bekleyen veri yoktur, ancak iş parçacıklı MPM'ler için ağı + bekleyen daha fazla iş parçacığı olabilir, dolayısıyla diğer eşzamanlı + bağlantıları işlemek için daha az sayıda kullanılabilir.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bütün dosyaların belirtilen ortam türüyle sunulmasına + sebep olur.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ForceType <code>ortam-türü</code>|None</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache httpd 2.0’da core modülüne taşındı.</td></tr> +</table> + <p>Bu yönerge, bir <code>.htaccess</code> dosyası veya bir + <code class="directive"><a href="#directory"><Directory></a></code>, + <code class="directive"><a href="#location"><Location></a></code> veya + <code class="directive"><a href="#files"><Files></a></code> bölümüne + yerleştirildiği zaman, eşleşen tüm dosyaların <code>ortam-türü</code> ile + belirtilen içerik türüyle sunulmasına sebep olur. Örneğin, altında + sadece GIF dosyaları bulunan bir dizininiz varsa ve bunlara tek tek + <code>.gif</code> uzantısı belirtmek istemiyorsanız şu yapılandırmayı + kullanabilirsiniz:</p> + + <pre class="prettyprint lang-config">ForceType image/gif</pre> + + + <p>Bu yönerge, <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> yönergesi + üzerinden ve <code>mime.types</code> dosyasında örtük olarak + tanımlanmış ortam türü/dosya uzantısı ilişkilerini geçersiz kılar.</p> + + <p>Ayrıca, daha genel <code class="directive">ForceType</code> ayarlarını da + <code>None</code> değeriyle geçersiz kılabilirsiniz:</p> + + <pre class="prettyprint lang-config"># tüm dosyaların image/gif olarak sunulması için: +<Location "/images"> + ForceType image/gif +</Location> + +# normal MIME-türüne geri dönmek için: +<Location "/images/mixed"> + ForceType None +</Location></pre> + + + <p>Bu yönerge, öncelikle dosya sisteminden sunulan duruk dosyalar için + üretilen içerik türlerini geçersiz kılar. Duruk dosyaların haricindeki + özkaynaklar için yanıt üretecinin genelde bir <code>Content-Type</code> + belirttiği durumda bu yönerge etkisizdir.</p> + + <div class="note"><h3>Ek Bilgi</h3> + <p><code class="directive"><a href="#sethandler">SetHandler</a></code> veya + <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> gibi örtük yönergeler + geçerli isteğe uygulanmadığı takdirde, normalde bu yönergeler tarafından + belirlenen dahili eylemcinin ismi <code class="directive">ForceType</code> + yönergesi tarafından belirtilen içerik türü ile eşleşecek şekilde + belirlenir. Bu, bazı üçüncü parti modüller (mod_php gibi) tarafından + kullanılan tarihi bir uygulama olup, bu modüller istekle eşleşecek + modüllerin sorumluluğu almasını sağlamak için "sihirli" içerik türleri + kullanabilir. Bu tür "sihirli" içerik türlerini kullanan + yapılandırmalarda <code class="directive"><a href="#sethandler">SetHandler</a></code> veya + <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> kullanımından + kaçınılmalıdır. </p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>gmon.out ayrıntılı inceleme verisinin yazılacağı dizin</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>GprofDir <code>/tmp/gprof/</code>|<code>/tmp/gprof/</code>%</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Sunucu gprof ayrıntılı inceleme desteği ile derlenmişse, + <code class="directive">GprofDir</code> yönergesi <code>gmon.out</code> + dosyalarının süreç çıktığında belirtilen dizine yazılmasını sağlar. Eğer + değiştirge bir yüzde simgesi ('%') ile bitiyorsa her süreç kimliği için + alt dizinler oluşturulur.</p> + + <p>Bu yönerge şimdilik sadece <code class="module"><a href="../mod/prefork.html">prefork</a></code> MPM'i ile + çalışmaktadır.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İstemci IP adresleri üzerinde DNS sorgularını etkin kılar. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>HostnameLookups Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge oturum açabilecek konak isimlerini tespit edebilmek için + DNS sorgularını etkin kılar (ve sonuç <code>REMOTE_HOST</code>’ta + belirtilerek CGI/SSI’lere aktarılır). <code>Double</code> değeri + sorgunun çift yönlü yapılacağını belirtir. Yani, bir tersine sorgunun + ardından bir normal sorgu yapılır. Normal sorguda elde edilen IP + adreslerinden birinin istek yapan IP adresi ile eşleşmesi gerekir. + ("tcpwrappers" terminolojisinde buna <code>PARANOID</code> adı + verilir.)</p> + + <p>Konak ismine göre erişimi denetlemek için + <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> kullanıldığında, nasıl bir ayar + yapıldığına bakılmaksızın, çift yönlü sorgulama yapılır. Bu güvenlik + için gereklidir. Bunun dışında açıkça <code>HostnameLookups + Double</code> belirtilmedikçe genellikle çift yönlü sorgulama yapılmaz. + Örneğin, sadece <code>HostnameLookups On</code> belirtilmiş ve konak + ismi kısıtlamalarıyla korunmuş bir nesne için bir istek yapılmışsa çift + yönlü sorgunun başarısına bakılmaksızın CGI’lere + <code>REMOTE_HOST</code> olarak tek yönlü sorgu sonucu aktarılır.</p> + + <p>Gerçekte ters yönlü sorguya gerek duyulmayan sitelerde ağ trafiğini + yormamak için <code>Off</code>, öntanımlı değerdir. Ayrıca, son + kullanıcıların DNS sorguları nedeniyle gereksiz yere bir beklemeye + maruz kalmaması için de bu daha iyidir. Yükü zaten ağır olan sitelerde, + DNS sorgularının görece uzun zaman alması nedeniyle bu yönergenin + değeri <code>Off</code> olarak bırakılmalıdır. Öntanımlı olarak kurulum + dizininizin <code>bin</code> alt dizinine kurulan + <code class="program"><a href="../programs/logresolve.html">logresolve</a></code> uygulaması kullanılarak oturum açan IP + adresleri için isim sorguları çevrim dışıyken yapılabilir.</p> + + <p>Son olarak, <a href="mod_authz_host.html#reqhost">konak ismine dayalı + Require yönergeleri</a>ne sahipseniz konak ismi araması + <code class="directive">HostnameLookups</code> ayarına bakılmaksızın + gerçekleştirilecektir.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="HttpProtocolOptions" id="HttpProtocolOptions">HttpProtocolOptions</a> <a name="httpprotocoloptions" id="httpprotocoloptions">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>HTTP İstek İletilerindeki sınırlamalarda değişiklik yapar</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>HttpProtocolOptions Strict LenientMethods Allow0.9</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.2.32 veya 2.4.24 ve sonrası</td></tr> +</table> + <p>Bu yönerge HTTP istek satırına + (<a href="https://tools.ietf.org/html/rfc7230#section-3.1.1">RFC 7230 §3.1.1</a>) ve the HTTP istek başlığı alanlarına + (<a href="https://tools.ietf.org/html/rfc7230#section-3.2">RFC 7230 §3.2</a>) uygulanmış kuralları öntanımlı olarak veya + <code>Strict</code> seçeneği kullanılarak değiştirir. Eski modüller, + uygulamalar veya kullanımı önerilmeyen özel istemciler için eski davranışlara + dönmeyi sağlamak üzere <code>Unsafe</code> seçeneği eklenmiştir.</p> + + <p>Bu kurallar istek işlenmeden önce uygulanır. Dolayısıyla yönerge, IP/port + arabirimine göre ana bölümde veya öntanımlı (ilk) eşleşen sanal konak + bölümünde yapılandırılmalıdır.</p> + + <p>Bu yönergeye aşağıdaki parametrelerden seçilen üç tanesi uygulanabilir. + Belirtilmeyenlerin yerine öntanımlılar uygulanır.</p> + + <dl> + <dt>Strict|Unsafe</dt> + <dd> + <p>Bu yönerge devreye girmeden önce, Apache HTTP Sunucusunun istek iletisi + ayrıştırıcıları protokolle uyumlu olmayan bir dizi girdi şekline + toleranslıydı. <a href="https://tools.ietf.org/html/rfc7230#section-9.4">RFC 7230 §9.4 İstek bölme</a> ve + <a href="https://tools.ietf.org/html/rfc7230#section-9.5">§9.5 Yanıt kaçırma</a> çağrıları uyumsuz istek iletilerinin + kabulündeki olası risklerden yalnızca iki tanesidir. + <a href="https://tools.ietf.org/html/rfc7230#section-3.5">RFC 7230 + §3.5</a> "İleti Ayrıştırma Sağlamlığı" belirsiz boşlukların kabul ve + istek iletisi biçimleme risklerini tanımlar. Bu yönergenin devreye + girmesini takiben belirtimin tüm imla kurallarına öntanımlı + <code>Strict</code> işlem kipi ve 3.5 bölümünde tavsiye edilen hoşgörüsüz + boşluk uygulanır ve esnekliğe müsamaha edilmez.</p> + + <div class="warning"><h3>Unsafe için güvenlik riskleri</h3> + <p>Kullanıcılar, özellikle dışa bakan, herkes tarafından erişilebilen + sunucu konuşlandırmalarında <code>Unsafe</code> işlem kipine geçiş + yapmaya karşı kesinlikle uyarılır. Eğer bir arayüz hataları izlemek + veya bir intranette çalışan özel hizmet tüketicileri için gerekliyse, + kullanıcılar, sadece, dahili özel ağlarına hizmet etmek üzere + yapılandırılmış özel bir sanal konak üzerinde <code>Unsafe</code> işlem + kipine geçiş yapmalıdır.</p> + </div> + + <div class="example"><h3>Strict kipte HTTP 400 ile sonuçlanan bir istek örneği</h3><p><code> + + # Eksik CRLF<br /> + GET / HTTP/1.0\n\n + </code></p></div> + <div class="warning"><h3>Komut satırı araçları ve CRLF</h3> + <p>Bazı araçların CRLF kullanmaya zorlanması gerekir, aksi takdirde httpd + yukarıdaki örnekte belirtildiği gibi bir HTTP 400 yanıtı ile döner. + Örneğin, <strong>OpenSSL s_client düzgün çalışmak için -crlf + değiştirgesine ihtiyaç duyar</strong>.</p> + <p>CRLF yokluğu gibi durumları saptamak için HTTP isteğini görünümlemek + isterseniz <code class="directive"><a href="../mod/mod_dumpio.html#dumpioinput">DumpIOInput</a></code> + yönergesi yardımcı olabilir.</p> + </div> + </dd> + <dt>RegisteredMethods|LenientMethods</dt> + <dd> + <p><a href="https://tools.ietf.org/html/rfc7231#section-4.1">RFC 7231 + §4.1</a> "İstek Yöntemleri" "Genel Bakış" bölümlerinde bir istek + satırında desteklenmeyen bir yöntem saptadığında özgün sunucuların bir + hatayla yanıt vermesini gerekli görmüştür. <code>LenientMethods</code> + seçeneği kullanıldığında olan zaten budur. <code>RegisteredMethods</code> + seçeneğine geçiş yapmak isteyen yöneticiler + <code class="directive">RegisterHttpMethod</code> yönergesini kullanarak standart + olmayan yöntemleri belirlemelidir. Özellikle <code>Unsafe</code> seçeneğine + geçiş yapılacaksa bu yol izlenmelidir.</p> + + <div class="warning"><h3>İleri Vekil Uyumluluğu</h3> + <p>Özgün sunucunun kullandığı yöntemleri vekil sunucu bilemeyeceği için + ileri vekil konaklarda <code>RegisteredMethods</code> seçeneğine geçiş + yapılmamalıdır.</p> + </div> + + <div class="example"><h3>Example of a request leading to HTTP 501 with LenientMethods mode</h3><p><code> + + # Unknown HTTP method<br /> + WOW / HTTP/1.0\r\n\r\n<br /><br /> + # Lowercase HTTP method<br /> + get / HTTP/1.0\r\n\r\n<br /> + </code></p></div> + </dd> + <dt>Allow0.9|Require1.0</dt> + <dd> + <p><a href="https://tools.ietf.org/html/rfc2616#section-19.6">RFC 2616 + §19.6</a> "Önceki Sürümlerle Uyumluluk" bölümünde HTTP sunucularının + eski HTTP/0.9 isteklerini desteklemesi tavsiye edilmektedir. RFC 7230 + "HTTP/0.9 isteklerini destekleme beklentisi kaldırılmıştır." cümlesiyle + bunu geçersiz kılmış ve <a href="https://tools.ietf.org/html/rfc7230#appendix-A">RFC 7230 Ek A</a> bölümünde bununla ilgili yorumlar yer almıştır. + <code>Require1.0</code> seçeneği kullanıcıya öntanımlı + <code>Allow0.9</code> seçeneğinin davranışına verilen desteği kaldırma + imkanını vermektedir.</p> + + <div class="example"><h3>Require1.0 kipinde HTTP 400 ile sonuçlanan bir istek + örneği</h3><p><code> + + # Desteklenmeyen HTTP sürümü<br /> + GET /\r\n\r\n + </code></p></div> + </dd> + </dl> + + <p><code class="directive">LogLevel</code> <code>debug</code> seviyesiyle + yapılandırılmış <code class="directive">ErrorLog</code> ile kaydedilmiş günlüklerin + gözden geçirilmesi, böyle hatalı isteklerin kaynaklandıkları yerle birlikte + belirlenmesine yardımcı olabilir. Kullanıcılar, beklenmedik bir şekilde + reddedilmiş geçersiz istekleri bulmak için erişim günlüklerindeki 400 + yanıtlarına özellikle dikkat etmelidir.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="If" id="If"><If></a> <a name="if" id="if">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Çalışma anında bir koşul bir istek tarafından yerine getirildiği +takdirde uygulanacak yönergeleri barındırır.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><If <code>ifade</code>> ... </If></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>İç içe geçmiş koşullar 2.4.26 ve sonrasında değerlendirilmeye alınır</td></tr> +</table> + <p><code class="directive"><If></code> yönergesi bir ifadeyi çalışma + anında değerlendirir ve ifadenin sonucu doğru olduğu takdirde içerdiği + yönergeleri uygular. Örnek:</p> + + <pre class="prettyprint lang-config"><If "-z req('Host')"></pre> + + + <p>Bir <code>Host:</code> başlığı içermeyen HTTP/1.0 istekleriyle + eşleşir. İfadeler, dizge karşılaştırması (<code>==</code>, + <code>!=</code>, <code><</code>, ...), tamsayı karşılaştırması + (<code>-eq</code>, <code>-ne</code>, ...) ve diğerleri (<code>-n</code>, + <code>-z</code>, <code>-f</code>, ...) için kabuktakilere benzer çeşitli + işleçler içerebilir. Ayrıca, düzenli ifadeleri,</p> + + <pre class="prettyprint lang-config"><If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"></pre> + + + <p>kabuk tarzı kalıp eşleştirme ve birçok başka işlemi kullanmak da + mümkündür. Bu işlemler istek başlıklarında (<code>req</code>), ortam + değişkenlerinde (<code>env</code>) ve çok sayıda başka niteliklerin + üstünde yapılabilir. <a href="../expr.html">Apache HTTP Sunucusundaki + İfadeler</a> belgesinde daha ayrıntılı bilgi bulabilirsiniz.</p> + + <p>Bu yapılandırma bölümünün içinde sadece + <a href="directive-dict.html#Context">dizin bağlamını</a> destekleyen + yönergeler kullanılabilir.</p> + + <div class="warning"> + <If> sonrasında atanan <code>CONTENT_TYPE</code> gibi belli + değişkenler ve diğer yanıt başlıkları zaten yorumlanmış olacaklarından bu + yönerge için kullanılabilir olmayacaktır. + </div> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../expr.html">Apache HTTP Sunucusundaki + İfadeler</a> belgesinde daha ayrıntılı bilgi ve örnek + bulabilirsiniz.</li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code> ve + <code class="directive"><Else></code> son olarak uygulanır.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a> <a name="ifdefine" id="ifdefine">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Başlatma sırasında bir doğruluk sınamasından sonra işleme +sokulacak yönergeleri sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><IfDefine [!]<code>parametre-adı</code>> ... + </IfDefine></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code><IfDefine <code>sınama</code>>...</IfDefine> + </code> bölümü koşullu olarak işleme sokulacak yönergeleri içerir. + Bir <code class="directive"><IfDefine></code> bölümü içindeki + yönergeler sadece <code>sınama</code> doğru sonuç verirse işleme sokulur. + Aksi takdirde, bölüm içinde kalan her şey yok sayılır.</p> + + <p><code class="directive"><IfDefine></code> bölüm yönergesinde + <code>sınama</code> için belirtilebilecek iki biçim vardır:</p> + + <ul> + <li><code>parametre-adı</code></li> + + <li><code>!</code><code>parametre-adı</code></li> + </ul> + + <p>Birinci durumda bölüm içinde kalan yönergeler sadece + <code>parametre-adı</code> ile belirtilen parametre tanımlı ise işleme + sokulur. İkinci durumda ise tersi yapılır, yani sadece + <code>parametre-adı</code> ile belirtilen parametre tanımlı + <strong>değil</strong> ise yönergeler işleme sokulur.</p> + + <p><code>parametre-adı</code> argümanı sunucu başlatılırken + <code class="program"><a href="../programs/httpd.html">httpd</a></code> komut satırında + <code>-D<code>parametre</code></code> ile + veya <code class="directive"><a href="#define">Define</a></code> yönergesi ile + belirtilerek tanımlı hale getirilebilir.</p> + + <p><code class="directive"><IfDefine></code> bölümleri iç içe + olabilir, dolayısıyla çok parametreli basit sınamalar gerçeklenebilir. + Örnek:</p> + + <div class="example"><p><code>httpd -DReverseProxy -DUseCache -DMemCache ...</code></p></div> + <pre class="prettyprint lang-config"><IfDefine ReverseProxy> + LoadModule proxy_module modules/mod_proxy.so + LoadModule proxy_http_module modules/mod_proxy_http.so + <IfDefine UseCache> + LoadModule cache_module modules/mod_cache.so + <IfDefine MemCache> + LoadModule mem_cache_module modules/mod_mem_cache.so + </IfDefine> + <IfDefine !MemCache> + LoadModule cache_disk_module modules/mod_cache_disk.so + </IfDefine> + </IfDefine> +</IfDefine></pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfDirective" id="IfDirective"><IfDirective></a> <a name="ifdirective" id="ifdirective">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Belirtilen yönerge adının varlığı veya yokluğuna bağlı olarak çalıştırılacak yönergeleri sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><IfDirective [!]<code>yönerge-adı</code>> ... + </IfDirective></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.34 ve sonrasında kullanılabilir.</td></tr> +</table> + <p><code><IfDirective <code>yönerge-adı</code>> + ...</IfDirective></code> bölümü içindeki yönergeler + <code>yönerge-adı</code> ile belirtilen yönerge mevcutsa çalıştırılır yoksa + yok sayılır.</p> + + <p><code class="directive"><IfDirective></code> yönergenide sınama iki türlü yapılır:</p> + + <ul> + <li><code>yönerge-adı</code></li> + + <li>!<code>yönerge-adı</code></li> + </ul> + + <p>İlk durumda bölüm içinde kalan yönergeler, yönerge başlangıç satırına + belirtilen yönerge işlem sırasında mevcutsa çalıştırılır, değilse + çalıştırılmaz. İkinci durumda ise, bölüm içinde kalan yönergeler, yönerge + başlangıç satırına belirtilen yönerge işlem sırasında mevcut + <strong>değilse</strong> çalıştırılır, mevcutsa çalıştırılmaz.</p> + + <div class="note">Bu yönergeyi kullanma ihtiyacı sadece çok sayıda + <code class="program"><a href="../programs/httpd.html">httpd</a></code> tek bir yapılandırma dosyası ile çalıştırılmak + zorundaysa ortaya çıkar. Böyle bir ihtiyacın olmadığı normal durumlarda + yönergelerin <code class="directive"><IfDirective></code> bölümlerine + yerleştirlmesine gerek yoktur.</div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#ifsection"><IfSection></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfFile" id="IfFile"><IfFile></a> <a name="iffile" id="iffile">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Başlatma sırasında bir dosyanın varlığı durumunda işleme +sokulacak yönergeleri sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><IfFile [!]<code>dosyaadı</code>> ... + </IfFile></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.34 ve sonrsında kullanılabilir.</td></tr> +</table> + <p><code><IfFile <code>dosyaadı</code>>...</IfFile> + </code> bölümü bir dosyanın diskteki mevcudiyetine bağlı olarak + çalıştırılacak yönergeleri belirtmekte kullanılır. + <code class="directive"><IfFile></code> bölümü içindeki yönergeler + sadece diskte <code>dosyaadı</code> mevcutsa çalıştırılır. <code>dosyaadı</code> + mevcut değilse bölüm içindeki yönergeler yok sayılır. <code>dosyaadı</code> + sunucu kök dizinine göreli veya mutlak bir yol olarak belirtilebilir.</p> + + <p><code class="directive"><IfFile></code> bölüm yönergesindeki + <code>dosyaadı</code>, <code class="directive"><a href="#ifdefine"><IfDefine></a></code> yönergesindeki <code>sınama</code> değişkenindeki gibi + ele alınır, yani <code>dosyaadı</code> bir ! ile öncelenirse bölüm içindeki + yonergeler dosyanın yokluğu durumunda çalıştırılır. + </p> + + <p>Göreli bir <code>dosyaadı</code> belirtilmişse sınama <code class="directive"><a href="#serverroot">ServerRoot</a></code> yönergesinde belirtilen dizinde göre + yapılır. <code class="directive"><IfFile></code> yönergesinin + <code class="directive"><a href="#serverroot">ServerRoot</a></code> yönergesinde önce yer alması + durumunda dosya yolu derleme sırasında kullanılan sunucu köküne veya komut + satırında <code>-d</code> seçeneği ile belirtilen dizine göre sınanır.</p> + + <div class="warning"><h3>Uyarı</h3> + 2.4.34 sürümünde, <code>dosyaadı</code>'nı tırnak içinde belirtmek mümkün + değildi. Bu, başlatma sırasında çözümleme hatasına sebep oluyordu. Bunun + başlıca etkisi, boşluklu dosya adlarının kullanılamamasıdır. Bu sorun, + 2.4.35 sürümünde düzeltildi.</div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a> <a name="ifmodule" id="ifmodule">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Belli bir modülün varlığına veya yokluğuna göre işleme sokulacak +yönergeleri sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><IfModule [!]<code>modül-dosyası</code>|<code>modül-betimleyici</code>> ... + </IfModule></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Modül betimleyiciler 2.1 sürümünde ve sonrası için geçerlidir.</td></tr> +</table> + <p><code><IfModule <code>sınama</code>>...</IfModule></code> + bölümü belli bir modülün varlığına veya yokluğuna göre işleme sokulacak + yönergeleri içerir. Bir <code class="directive"><IfModule></code> + bölümü içindeki yönergeler sadece <code>sınama</code> doğru sonuç verirse + işleme sokulur. Aksi takdirde, bölüm içinde kalan her şey yok sayılır.</p> + + <p><code class="directive"><IfModule></code> bölüm yönergesinde + <code>sınama</code> için belirtilebilecek iki biçim vardır:</p> + + <ul> + <li><code>modül</code></li> + + <li>!<code>modül</code></li> + </ul> + + <p>Birinci durumda bölüm içinde kalan yönergeler sadece <code>modül</code> + ile belirtilen modül Apache httpd içine dahil edilmişse veya + <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code> yönergesi ile devingen + olarak yüklenmişse işleme sokulur. İkinci durumda ise tersi yapılır, yani + sadece <code>modül</code> içerilmiş <strong>değil</strong> ise yönergeler + işleme sokulur.</p> + + <p><code>modül</code> argümanında bir modül betimleyici veya modülün derleme + sırasındaki dosya adı belirtilebilir. Örneğin, <code>rewrite_module</code> + bir betimleyici, <code>mod_rewrite.c</code> ise bir dosya ismidir. Eğer + modül çok sayıda kaynak dosyasından oluşuyorsa + <code>STANDARD20_MODULE_STUFF</code> dizgesini içeren dosyanın ismi + kullanılır.</p> + + <p><code class="directive"><IfModule></code> bölümleri iç içe + olabilir, dolayısıyla çok parametreli basit sınamalar gerçeklenebilir.</p> + + <div class="note">Bu bölümü sadece yapılandırma dosyanızın belli modüllerin varlığına + veya yokluğuna bağlı olarak çalışması gerektiği durumlarda + kullanmalısınız. Normal işlemlerde yönergelerin <code class="directive"><IfModule></code> bölümlerine yerleştirilmeleri + gerekmez.</div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IfSection" id="IfSection"><IfSection></a> <a name="ifsection" id="ifsection">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Belirtilen bölüm adının varlığı veya yokluğuna bağlı olarak çalıştırılacak yönergeleri sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><IfSection [!]<code>bölüm-adı</code>> ... + </IfSection></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.34 ve sonrasında kullanılabilir.</td></tr> +</table> + <p><code><IfSection <code>bölüm-adı</code>> + ...</IfSection></code> bölümü içindeki yönergeler + <code>bölüm-adı</code> ile belirtilen bölüm mevcutsa çalıştırılır yoksa + yok sayılır. Bir bölüm yönergesi "<" ile öncelenmiş bir yönerge adına + sahip olmalı ve <code class="directive"><VirtualHost></code> gibi başka + yönergeleri sarmalayan bir yönerge olmalıdır.</p> + + <p><code class="directive"><IfSection></code> bölümü içindeki + yönergeler sadece <code>sınama</code> doğru ise çalıştırılır, + <code>sınama</code> yanlışsa çalıştırılmaz.</p> + + <p><code>bölüm-adı</code> başında "<" veya sonunda ">" olmaksızın + belirtilmelidir. <code class="directive"><IfSection></code> + yönergesindeki <code>bölüm-adı</code> iki türlü ele alınır:</p> + + <ul> + <li><code>bölüm-adı</code></li> + <li>!<code>bölüm-adı</code></li> + </ul> + + <p>İlk durumda bölüm içinde kalan yönergeler, yönerge başlangıç satırına + belirtilen bölüm işlem sırasında mevcutsa çalıştırılır, değilse + çalıştırılmaz. İkinci durumda ise, bölüm içinde kalan yönergeler, yönerge + başlangıç satırına belirtilen bölüm işlem sırasında mevcut + <strong>değilse</strong> çalıştırılır, mevcutsa çalıştırılmaz.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config"><IfSection VirtualHost> + ... +</IfSection></pre> + + + <div class="note">Bu yönergeyi kullanma ihtiyacı sadece çok sayıda + <code class="program"><a href="../programs/httpd.html">httpd</a></code> tek bir yapılandırma dosyası ile (belli bir bölüm + yönergesinin var olup olmamasına bakmaksızın) çalıştırılmak + zorundaysa ortaya çıkar. Böyle bir ihtiyacın olmadığı normal durumlarda + yönergelerin <code class="directive"><IfSection></code> bölümlerine + yerleştirlmesine gerek yoktur.</div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#ifdirective"><IfDirective></a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucu yapılandırma dosyalarının başka dosyaları içermesini sağlar. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>Include <code>dosya-yolu</code>|<code>dizin-yolu</code>|<code>joker</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Dizin kalıbıyla eşleşme ise 2.3.6 ve sonrasında mevcuttur.</td></tr> +</table> + <p>Bu yönerge sunucu yapılandırma dosyalarının başka dosyaları içermesini + mümkün kılar.</p> + + <p>Çok sayıda dosyayı bir kerede alfabetik sırada içermek için yolun dosya + ismi ve dizin parçalarında kabuk tarzı (<code>fnmatch()</code>) dosya + ismi kalıp karakterleri kullanılabilir. Ayrıca, eğer + <code class="directive">Include</code> yönergesi bir dosya değil de bir dizin + gösteriyorsa Apache httpd bu dizindeki ve alt dizinlerindeki bütün + dosyaları okuyacaktır. Bunula birlikte, dizinin bir bütün olarak + okutulması önerilmez, çünkü dizinde <code class="program"><a href="../programs/httpd.html">httpd</a></code> programının + çökmesine sebep olabilecek geçici dosyalar unutulabilir. Bunun yerine, + belli bir şablona uyan dosyaları seçebilmek için, örneğin *.conf gibi + dosya kalıplarının kullanılmasını öneriyoruz.</p> + + <p><code class="directive"><a href="#include">Include</a></code> yönergesi, bir dosya + kalıbı ifadesi hiçbir dosyayla eşleşmezse <strong>bir hatayla + başarısız</strong> olacaktır. Eşleşmeyen dosya kalıbı ifadelerinin + yoksayılması gerekiyorsa <code class="directive"><a href="#includeoptional">IncludeOptional</a></code> yönergesi kullanılabilir.</p> + + <p>Dosya yolu mutlak bir dosya yolu olarak belirtilebileceği gibi + <code class="directive"><a href="#serverroot">ServerRoot</a></code> dizinine göreli olarak + da belirtilebilir.</p> + + <p>Örnekler:</p> + + <pre class="prettyprint lang-config">Include /usr/local/apache2/conf/ssl.conf +Include /usr/local/apache2/conf/vhosts/*.conf</pre> + + + <p>Veya dizinler <code class="directive"><a href="#serverroot">ServerRoot</a></code> dizinine + göre belirtilebilir:</p> + + <pre class="prettyprint lang-config">Include conf/ssl.conf +Include conf/vhosts/*.conf</pre> + + + <p>Dosya kalıbı karakterleri yolun dizin ve dosya parçalarına + yerleştirilebilir. <code>conf/vhosts</code> altında en azından bir + <code>*.conf</code> içeren hiçbir alt dizin yoksa bu örnek başarısız + olacaktır:</p> + + <pre class="prettyprint lang-config">Include conf/vhosts/*/*.conf</pre> + + + <p>Bunun yerine, dizin ve dosyaların eksikliği durumunda aşağıdaki komut + sadece yoksayılır:</p> + + <pre class="prettyprint lang-config">IncludeOptional conf/vhosts/*/*.conf</pre> + + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#includeoptional">IncludeOptional</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Diğer yapılandırma dosyalarının sunucu yapılandırma dosyasına dahil edilmesini sağlar</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>IncludeOptional <code>dosya-yolu</code>|<code>dizin-yolu</code>|<code>joker</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.3.6 ve sonrasına kullanılabilmektedir. Dosya kalıp karakterleri + içermeyen dosya yollarından mevcut olmayanlar 2.4.30 sürümünden itibaren + sözdizimi hatalarına sebep olmamaktadır.</td></tr> +</table> + <p>Bu yönerge, diğer yapılandırma dosyalarının sunucu yapılandırma + dosyasında içerilmesini sağlar. Çalışması <code class="directive"><a href="#include">Include</a></code> yönergesi ile bir istisna dışında + aynıdır. Dosya kalıp karakterlerinin hiçbir dosya veya dizinle + eşleşmemesi veya dosya yolunun dosya sisteminde mevcut olmaması durumunda + bir hata oluşmayacak ve bu durum sadece yoksayılacaktır.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#include">Include</a></code></li> +<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>HTTP kalıcı bağlantılarını etkin kılar</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>KeepAlive On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>KeepAlive On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code>Keep-Alive</code> yönergesi HTTP/1.0 protokolüne bir eklenti olup + HTTP/1.1 protokolünün kalıcı bağlantı özelliği aynı TCP bağlantısı + üzerinden çok sayıda isteğin gönderilmesini mümkün kılan uzun süreli HTTP + oturumları açılmasını sağlar. Bunun, çok sayıda resim içeren HTML + belgelerin yanıt zamanlarında bazı durumlarda %50’lik bir hızlanmayla + sonuçlandığı gösterilmiştir. Kalıcı bağlantıları etkin kılmak için + yönerge <code>KeepAlive On</code> şeklinde kullanılır.</p> + + <p>HTTP/1.0 istemcileri için kalıcı bağlantılar sadece bir istemci + tarafından özellikle istendiği takdirde kullanılabilir. Ek olarak, + HTTP/1.0 istemci kalıcı bağlantıları sadece içerik uzunluğu baştan + bilindiği zaman kullanılabilir. Bu, CGI çıktısı, SSI sayfaları ve + sunucunun ürettiği dizin listeleri gibi genellikle HTTP/1.0 istemcilere + kalıcı bağlantılar kullanmayan devingen içeriklere uygulanır. HTTP/1.1 + istemciler için kalıcı bağlantılar aksi belirtilmedikçe öntanımlıdır. + İstemci istediği takdirde, uzunluğu bilinmeyen içerik kalıcı bağlantılar + üzerinden gönderilirken parçalı kodlama kullanılacaktır.</p> + + <p>Bir istemci kalıcı bağlantı kullandığı takdirde, bağlantı üzerinden kaç + istek gönderilirse gönderilsin, + <code class="directive"><a href="../mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code> + yönergesi bakımından tek bir istek olarak değerlendirilir.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir kalıcı bağlantıda sunucunun bir sonraki isteği bekleme süresi +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>KeepAliveTimeout <code>sayı</code>[ms]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>KeepAliveTimeout 5</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Sunucunun kalıcı bir bağlantıyı kapatmadan önce bir sonraki isteği kaç + saniye bekleyeceğini belirler. Ayrıca, ms soneki kullanılarak süreyi + milisaniye olarak belirtmek de mümkündür. İstek alındıktan sonra + <code class="directive"><a href="#timeout">Timeout</a></code> yönergesiyle belirtilen + zaman aşımı değeri uygulanır.</p> + + <p><code class="directive">KeepAliveTimeout</code> için yüksek bir değer belirtmek + ağır yüklü sunucularda başarım sorunlarına yol açar. Daha yüksek bir + zaman aşımı, boştaki istemcilerin bulunduğu bağlantıları bekleyen daha + fazla sunucu sürecini meşgul edecektir.</p> + + <p>İsme dayalı sanal konak için <code class="directive">KeepAliveTimeout</code> + atanmamışsa, yerel IP adresi ve portu ile en iyi eşleşen ilk sanal + konağın değeri kullanılır.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Erişimi sınırlanacak HTTP yöntemleri için erişim sınırlayıcıları +sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><Limit <code>yöntem</code> [<code>yöntem</code>] ... > ... + </Limit></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>AuthConfig, Limit</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Erişim denetleyicileri normalde <strong>tüm</strong> erişim yöntemleri + için etkindir ve olağan olanı da budur. <strong>Genel durum olarak, + erişim denetim yönergeleri bir <code class="directive"><Limit></code> bölümüne + yerleştirilmemelidir.</strong></p> + + <p><code class="directive"><Limit></code> bölümünün amacı, erişim + denetleyicilerinin etkilerini belli HTTP yöntemleri için sınırlamaktır. + <code class="directive"><Limit></code> bölümü içinde listelenen + erişim sınırlamaları, kalan tüm diğer yöntemler için <strong>etkisiz + olacaktır</strong>. Aşağıdaki örnekte, erişim sınırlaması + <code>POST</code>, <code>PUT</code> ve <code>DELETE</code> yöntemleri + için uygulanmakta, diğer tüm yöntemler korumasız bırakılmaktadır:</p> + + <pre class="prettyprint lang-config"><Limit POST PUT DELETE> + Require valid-user +</Limit></pre> + + + <p>Birden fazla bölümde kullanılabilecek yöntem isimleri: <code>GET</code>, + <code>POST</code>, <code>PUT</code>, <code>DELETE</code>, + <code>CONNECT</code>, <code>OPTIONS</code>, + <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>, + <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>, + <code>LOCK</code> ve <code>UNLOCK</code>. <strong>Yöntem isimleri harf + büyüklüğüne duyarlıdır.</strong> <code>GET</code> yöntemi sınırlanırsa + <code>HEAD</code> istekleri de sınırlanmış olur. <code>TRACE</code> + yöntemi sınırlanamaz (bkz, <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p> + + <div class="warning">Erişimi sınarlarken bir <code class="directive"><Limit></code> bölümü yerine daima bir <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> bölümünü tercih + etmelisiniz, çünkü <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> bölümü belirtilen yöntemler dışında kalanlara + erişim koruması sağlar.</div> + + <p><code class="directive"><Limit></code> ve + <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> + yönergeleri iç içe olabilirler. Bu durumda, başarılı her + <code class="directive"><Limit></code> veya <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> seviyesi, erişim + denetimlerinin uygulanacağı yöntemlerle sınırlı kalmalıdır.</p> + + <div class="warning"><code class="directive"><Limit></code> veya + <code class="directive"><LimitExcept></code> yönergelerini + <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> yönergesi ile + birlikte kullanılırken, ilk <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> yönergesinin bir başka <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> yönergesinin varlığından + bağımsız olarak isteği başarıyla yetkilendirdiğine dikkat ediniz.</div> + + <p>Örneğin, aşağıdaki yapılandırmayı ele alalım; tüm kullanıcılar + <code>POST</code> istekleri için yetkilendirilecek ve tüm durumlarda + <code>Require group editors</code> yönergesi yoksayılacaktır:</p> + + <pre class="prettyprint lang-config"><LimitExcept GET> + Require valid-user +</LimitExcept> +<Limit POST> + Require group editors +</Limit></pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İsimleri belirtilenler dışında kalan HTTP yöntemleri için +kullanılacak erişim sınırlayıcıları sarmalar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><LimitExcept <code>yöntem</code> [<code>yöntem</code>] ... > ... + </LimitExcept></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>AuthConfig, Limit</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><LimitExcept></code> ve + <code></LimitExcept></code> argüman olarak belirtilenler + <strong>dışında</strong> kalan HTTP yöntemleri için kullanılacak erişim + sınırlayıcıları gruplamakta kullanılır. Yani, <code class="directive"><a href="#limit"><Limit></a></code> bölümünün tersine, standart olsun olmasın + bütün yöntemler için erişimi kısıtlamakta kullanılabilir. Daha ayrıntılı + bilgi edinmek için <code class="directive"><a href="#limit"><Limit></a></code> yönergesinin açıklamasına bakınız.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config"><LimitExcept POST GET> + Require valid-user +</LimitExcept></pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Dahili yönlendirmelerin ve istek içi isteklerin azami sayısını +belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>LimitInternalRecursion <code>sayı</code> [<code>sayı</code>]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>LimitInternalRecursion 10</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Örneğin, özgün istekleri dahili olarak bir CGI betiğine yönlendiren + <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> yönergesi + kullanıldığında bir dahili yönlendirme oluşur. İstek içi istekler ise + bazı URI’ler için istek yapıldığında ne olacağını bulmak için Apache + httpd’nin kullandığı bir mekanizmadır. Örneğin, + <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> yönergesinde listelenen dosyalara bakmak + için istek içi istekler kullanır.</p> + + <p><code class="directive">LimitInternalRecursion</code> yönergesi sunucunun dahili + yönlendirmeler ve istek içi isteklerin oluşturduğu döngülerden dolayı + çökmemesini sağlar. Böyle döngüler genellikle yanlış yapılandırma sonucu + ortaya çıkarlar.</p> + + <p>Yönerge her istek için değerlendirmeye alınacak iki farklı sınırlama + için kullanılabilir. İlk <code>sayı</code> ardarda gelebilen dahili + yönlendirmelerin azami sayısını, ikinci <code>sayı</code> ise istek içi + isteklerin ne kadar iç içe olabileceğini belirler. Tek bir + <code>sayı</code> belirtilirse iki sınırlama için de aynı değer + kullanılır.</p> + + <pre class="prettyprint lang-config">LimitInternalRecursion 5</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İstemci tarafından gönderilen HTTP istek gövdesinin toplam +uzunluğunu sınırlar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>LimitRequestBody <code>bayt-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>LimitRequestBody 1073741824</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache HTTP Sunucusu 2.4.53 ve öncesinde, öntanımlı değer 0 idi (sınırsız)</td></tr> +</table> + <p>Bu yönerge, bir istek gövdesinde izin verilen bayt sayısını sınırlamak + için kullanılır. <var>0</var> sınırsız anlamına gelir.</p> + + <p><code class="directive">LimitRequestBody</code> yönergesi kullanıcıya yönergenin + kullanıldığı bağlam (sunucu, belli bir dizin, belli bir dosya, belli bir + yer) dahilinde bir HTTP istek iletisi gövdesinin izin verilen uzunluğu + için bir sınır belirleme imkanı verir. Eğer istemcinin isteği bu sınırı + aşarsa sunucu isteği sunmak yerine bir hata iletisi döndürecektir. Normal + bir istek ileti gövdesinin uzunluğu büyük oranda özkaynağın doğasına ve + bu özkaynak üzerinde izin verilen yöntemlere bağlıdır. CGI betikleri + genellikle ileti gövdesini form bilgisini almak için kullanır. + <code>PUT</code> yöntemi gerçeklenimleri, en azından, sunucunun o + özkaynak için kabul etmek isteyeceği herhangi bir gösterim kadar büyük + bir değer gerektirecektir.</p> + + <p>Bu yönerge, bazı hizmet reddi (DoS) saldırılarından kaçınmak için sunucu + yöneticilerine, anormal istemci istekleri üzerinde daha iyi denetim + imkanı sağlar.</p> + + <p>Eğer, örneğin, belli bir yere dosya yükleme izni verir ve buraya + yüklenebilecek dosya boyutunu 100 kB ile sınırlamak isterseniz yönergeyi + şöyle kullanabilirsiniz:</p> + + <pre class="prettyprint lang-config">LimitRequestBody 102400</pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İstemciden kabul edilecek HTTP isteği başlık alanlarının sayısını +sınırlar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>LimitRequestFields <code>sayı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>LimitRequestFields 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code>sayı</code>ya 0 atanması sınırsız anlamına gelir. + Öntanımlı değer bir derleme zamanı sabiti olan + <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> ile belirlenir (dağıtımla gelen + değeri 100’dür).</p> + + <p><code class="directive">LimitRequestFields</code> yönergesi sunucu + yöneticilerine bir HTTP isteğinde izin verilen istek başlık alanlarının + sayısı üzerindeki sınırı değiştirebilme imkanı verir. Sunucu bu değerin, + normal bir istemci isteğinin içerebileceği alan sayısından daha büyük + olmasına ihtiyaç duyar. Bir istemci tarafından kullanılan istek başlık + alanlarının sayısı nadiren 20’yi geçer, fakat bu farklı istemci + gerçeklenimleri için değişiklik gösterir ve çoğunlukla kullanıcının + tarayıcısını ayrıntılı içerik müzakeresini desteklemek için nasıl + yapılandırdığıyla ilgilidir. İsteğe bağlı HTTP eklentileri çoğunlukla + istek başlık alanları kullanılarak ifade edilir.</p> + + <p>Bu yönerge, bazı hizmet reddi (DoS) saldırılarından kaçınmak için sunucu + yöneticilerine, anormal istemci istekleri üzerinde daha iyi denetim + imkanı sağlar. Eğer normal istemciler sunucudan istekte bulunurken çok + fazla başlık alanı gönderildiğine dair bir hata iletisi alırlarsa bu + değerin arttırılması gerekir.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config">LimitRequestFields 50</pre> + + + <div class="warning"><h3>Uyarı</h3> + <p>İsme dayalı sanal konaklar kullanıldığında, bu yönergenin değeri, + yerel IP adresi ve port çifti için öntanımlı olan (listedeki ilk) sanal + konaktan alınır.</p>. + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İstemciden kabul edilecek HTTP isteği başlık uzunluğunu sınırlar. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>LimitRequestFieldSize <code>bayt-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge, HTTP istek başlığında izin verilecek bayt sayısını + belirler.</p> + + <p><code class="directive">LimitRequestFieldSize</code> yönergesi, sunucu + yöneticilerine HTTP istek başlık alanının azami uzunluğunu ayarlama + imkanı verir. Sunucu bu değerin, normal bir istemci isteğinin + içerebileceği herhangi bir başlık alanını tutabilecek kadar büyük + olmasını gerektirir. Normal bir istek başlık alanı uzunluğu kullanıcının + tarayıcısını ayrıntılı içerik müzakeresini desteklemek için nasıl + yapılandırdığıyla ilgilidir. SPNEGO kimlik doğrulama başlıkları 12392 + baytlık olabilir.</p> + + <p>Bu yönerge, bazı hizmet reddi (DoS) saldırılarından kaçınmak için sunucu + yöneticilerine, anormal istemci istekleri üzerinde daha iyi denetim + imkanı sağlar.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config">LimitRequestFieldSize 4094</pre> + + + <div class="note">Normal şartlar altında öntanımlı değer değiştirilmemelidir. Ayrıca, + kaynak kodu değiştirip yeniden derlemeden bu değeri 8190'dan büyük + yapamazsınız.</div> + + <div class="warning"><h3>Uyarı</h3> + <p>İsme dayalı sanal konaklar kullanıldığında, bu yönergenin değeri, + yerel IP adresi ve port çifti için öntanımlı olan (listedeki ilk) sanal + konaktan alınır.</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İstemciden kabul edilecek HTTP istek satırının uzunluğunu sınırlar. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>LimitRequestLine <code>bayt-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>LimitRequestLine 8190</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge, HTTP istek satırında izin verilecek bayt sayısını + belirler.</p> + + <p><code class="directive">LimitRequestLine</code> yönergesi, sunucu yöneticilerine + bir istemcinin HTTP istek satırının azami uzunluğunu ayarlama + imkanı verir. İstek satırının içeriği HTTP yöntemi, URI ve protokol + sürümünden oluştuğundan <code class="directive">LimitRequestLine</code> + yönergesi, sunucudan bir istek için kullanılan istek adresinin uzunluğunu + sınırlamış olur. Sunucu bu değerin, bir <code>GET</code> isteğinin sorgu + kısmında aktarılabilen her bilgi dahil, özkaynak isimlerinden her birini + tutabilecek kadar büyük olmasını gerektirir.</p> + + <p>Bu yönerge, bazı hizmet reddi (DoS) saldırılarından kaçınmak için sunucu + yöneticilerine, anormal istemci istekleri üzerinde daha iyi denetim + imkanı sağlar.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config">LimitRequestLine 4094</pre> + + + <div class="note">Normal şartlar altında öntanımlı değer değiştirilmemelidir.</div> + + <div class="warning"><h3>Uyarı</h3> + <p>İsme dayalı sanal konaklar kullanıldığında, bu yönergenin değeri, + yerel IP adresi ve port çifti için öntanımlı olan (listedeki ilk) sanal + konaktan alınır.</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir XML temelli istek gövdesinin uzunluğunu sınırlar.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>LimitXMLRequestBody <code>bayt-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bir XML temelli istek gövdesinin azami bayt sayısını belirler. + <code>0</code> değeri, XML'in sistem adreslenebilir belleğinin sınırları + içinde sarmalanmasına izin veren (32bit ve 64bit sisteme bağlı olarak) + katı bir sınırlama uygular, ancak yalnızca uyumluluk için vardır ve + önerilmez, çünkü genel sistemde belleğin yetersiz kalmasına neden + olabilecek eşzamanlı istekleri veya başka bir yerde tüketilen belleği + hesaba katmaz.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config"># 1 MiB'lık sınırlama +LimitXMLRequestBody 1073741824</pre> + + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Location" id="Location"><Location></a> <a name="location" id="location">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İçerdiği yönergeler sadece eşleşen URL’lere uygulanır. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><Location <code>URL-yolu</code>|<code>URL</code>> ... +</Location></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><Location></code> bölüm yönergesi kapsadığı + yönergelerin etki alanını belirtilen URL’lerle sınırlar. Bu yönerge, + <code class="directive"><a href="#directory"><Directory></a></code> yönergesine + benzer ve <code></Location></code> yönergesi ile biten bir alt + bölüm başlatır. <code class="directive"><Location></code> bölümleri + yapılandırma dosyasında göründükleri sıraya göre, <code class="directive"><a href="#directory"><Directory></a></code> bölümleri ve + <code>.htaccess</code> dosyaları okunup <code class="directive"><a href="#files"><Files></a></code> bölümleri de işlendikten sonra işleme + sokulurlar.</p> + + <p><code class="directive"><Location></code> bölümleri dosya + sisteminin tamamen dışında işlem görürler. Bunun çeşitli sonuçları olur. + En önemlisi, <code class="directive"><Location></code> + yönergelerinin dosya sistemi konumlarına erişimi denetim altına almak + için kullanılmaması gerekliliğidir. Aynı dosya sistemi konumuna farklı + URL’lerle erişmek mümkün olduğundan bu tür erişim denetimleri hile ile + atlatılabilir olacaktır.</p> + + <p>URL'nin yol bileşeni aşağıdaki koşullardan <em>herhangi birini</em> + sağlıyorsa sarmalanan yönergeler isteğe uygulanır: + </p> + <ul> + <li>Belirtilen yer URL'nin yol bileşeni ile tam olarak eşleşiyordur. + </li> + <li>Belirtilen yer bir bölü çizgisi öncesinde bitiyorsa URL'nin yol + bileşeninin öneklerinden biriyle eşleşiyordur (bağlamsal bir kök dizin + olarak). + </li> + <li>Belirtilen yer bir bölü çizgisi ile bitiyorsa URL'nin yol + bileşeninin öneklerinden biriyle eşleşiyordur (bağlamsal bir kök dizin + olarak). + </li> + </ul> + <p>Aşağıdaki örnekte yer belirtimi bir bölü çizgisi ile bitirilmemiştir. + <code>/private1</code>, <code>/private1/</code> ve + <code>/private1/file.txt</code> istekleri için sarmalanan yönergeler + uygulanacaktır, fakat <code>/private1other</code> isteğine + uygulanmayacaktır.</p> + + <pre class="prettyprint lang-config"><Location "/private1"> + # ... +</Location></pre> + + + <p>Aşağıdaki örnekte yer belirtimi bir bölü çizgisi ile bitirilmiştir. + <code>/private2/</code> ve <code>/private2/file.txt</code> istekleri + için sarmalanan yönergeler uygulanacaktır, fakat <code>/private2</code> + ve <code>/private2other</code> isteklerine uygulanmayacaktır.</p> + + <pre class="prettyprint lang-config"><Location "/private2<em>/</em>"> + # ... +</Location></pre> + + + <div class="note"><h3><code class="directive"><Location></code> ne zaman + kullanılmalı</h3> + + <p><code class="directive"><Location></code> yönergesini dosya sistemi + dışındaki içeriğe çeşitli yönergeler uygulamak için kullanın. Dosya + sisteminde bulunan içerik için <code class="directive"><a href="#directory"><Directory></a></code> ve <code class="directive"><a href="#files"><Files></a></code> bölümlerini kullanın. Bunun istisnası, + sunucunun tamamına bir yapılandırma uygulamak için kolay bir yol olan + <code><Location "/"></code> kullanımıdır.</p> + </div> + + <p>Kaynağa yapılan (vekil olmayan) tüm istekler için eşleşecek URL, + <code>/yol/</code> şeklinde bir URL yolu olmalı; <em>ne şema, ne konak ismi + ne port ne de sorgu dizgesi içermelidir</em>. Vekil istekleri için eşleşecek + URL ise <code>şema://sunucuadı/dosya-yolu</code> şeklinde olmalı ve önek + içermelidir.</p> + + <p>URL içinde dosya kalıp karakterleri kullanılabilir. Dosya kalıp + karakterleri bulunan bir dizgede bulunan <code>?</code> karakteri + herhangi bir tek karakterle eşleşirken <code>*</code> karakteri herhangi + bir karakter dizisi ile eşleşecektir. URL yolu içindeki / karakterleri + ile hiçbir dosya kalıp karakteri eşleşmez.</p> + + <p>Ayrıca, <code>~</code> karakteri eşliğinde + <a class="glossarylink" href="../glossary.html#regex" title="sözlüğe bakınız">düzenli ifadeler</a> de kullanılabilir. + Örneğin,</p> + + <pre class="prettyprint lang-config"><Location ~ "/(ek|hususi)/veri"> + #... +</Location></pre> + + + <p>yönergesi <code>/ek/veri</code> ve <code>/hususi/veri</code> alt + dizgeleriyle eşleşecektir. <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> yönergesi <code class="directive"><Location></code> yönergesinin düzenli ifade sürümüne + eşdeğer davranır ve bir çok yazı tipinde <code>~</code> karakterini + <code>-</code> karakterinden ayırmak zor olduğu için tercih edilir.</p> + + <p><code class="directive"><Location></code> işlevselliği özellikle + <code class="directive"><a href="#sethandler">SetHandler</a></code> yönergesi ile birlikte + kullanışlı olur. Örneğin, durum isteklerini etkin kılmak ama sadece + <code>example.com</code>’dan gelen isteklere izin vermek için şöyle bir + uygulama yapabilirsiniz:</p> + + <pre class="prettyprint lang-config"><Location "/status"> + SetHandler server-status + Require host example.com +</Location></pre> + + + <div class="note"><h3>/ (bölü çizgisi) hakkında</h3> + <p>Bölü çizgisinin URL içinde bulunduğu yere bağlı olarak özel anlamları + vardır. Dosya sistemindeki çok sayıda yanyana kullanımının tek bir bölü + çizgisi olarak ele alındığı duruma alışkın olanlar olabilir (yani, + <code>/home///foo</code> ile <code>/home/foo</code> aynıdır). + <code class="directive"><a href="#mergeslashes">MergeSlashes</a></code> yönergesine OFF + atanmışsa URL uzayında bunun böyle olması gerekli değildir. + Eğer çok sayıda bölü çizgisinin birleştirilmeden yanyana belirtilmesi + gerekiyorsa + <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> + yönergesinde ve <code class="directive"><Location></code> + yönergesinin düzenli ifadeli kullanımında bunun açıkça belirtilmesi + gerekir.</p> + + <p>Örneğin, <code><LocationMatch "^/abc"></code> yönergesi + <code>/abc</code> ile eşleşecek ama <code>//abc</code> ile + eşleşmeyecektir. <code class="directive"><Location></code> + yönergesinin düzenli ifade içermeyen kullanımındaki davranış vekil + isteklerinde kullanılana benzer ve doğrudan kaynağa yapılan (vekil + olmayan) isteklerde çok sayıda bölü çizgisi dolaylı olarak tek bir bölü + çizgisiyle eşleşecektir. Örneğin, <code><Location + "/abc/def"></code> belirtirseniz ve istek <code>/abc//def</code> + şeklinde olursa bu ikisi eşleşir.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İçerdiği yönergeler sadece düzenli ifadelerle eşleşen URL’lere +uygulanır.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><LocationMatch + <code>düzifade</code>> ... </LocationMatch></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><LocationMatch></code> yönergesi içerdiği + yönergelerin etki alanını <code class="directive"><a href="#location"><Location></a></code> yönergesinin yaptığı gibi belirtilen URL’lerle + sınırlar. Ancak argüman olarak basit bir dizge değil bir <a class="glossarylink" href="../glossary.html#regex" title="sözlüğe bakınız">düzenli ifade</a> alır. Örneğin,</p> + + <pre class="prettyprint lang-config"><LocationMatch "/(ek|hususi)/veri"> + # ... +</LocationMatch></pre> + + + <p>yönergesi <code>/ek/veri</code> ve <code>/hususi/veri</code> alt + dizgeleriyle eşleşecektir.</p> + + <div class="note"><p>Eğer hedef, <code>/ek/veri</code> içeren değil de + <code>/ek/veri</code> ile başlayan bir URL ise düzenli ifadenin önüne + <code>^</code> getirmek gerekir.</p> + + <pre class="prettyprint lang-config"><LocationMatch "^/(ek|hususi)/veri"></pre> + + </div> + + <p>2.4.8 itibariyle, isimli gruplar ve geriye başvurular elde edilmekte + olup ilgili isim büyük harfe çevrildikren sonra "MATCH_" ile + öncelendikten sonra ortama yazılmaktadır. Böylece yol elemanlarına + <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> gibi modüllerden veya <a href="../expr.html">düzenli ifadelerden</a> başvurmak mümkün + kılınmıştır. Karışıklığı önlemek için, numaralı (isimsiz) geriye + başvurular yoksayılmaktadır. Bunların yerine isimli geriye başvurular + kullanılmalıdır.</p> + + <pre class="prettyprint lang-config"><LocationMatch "^/combined/(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</LocationMatch></pre> + + + <div class="note"><h3>/ (bölü çizgisi) hakkında</h3> + <p>Bölü çizgisi karakteri URL üzerinde göründüğü yere bağlı olarak + farklı anlamlar içerir. İnsanlar, birden çok bitişik bölü çizgisinin sık + sık tek bir bölü çizgisine daraltıldığı dosya sistemindeki davranışına + alışkın olabilir (<em>örn</em>, <code>/home///foo</code> ile + <code>/home/foo</code> aynıdır). + <code class="directive"><a href="#mergeslashes">MergeSlashes</a></code> yönergesine OFF + atanmışsa URL uzayında bunun böyle olması gerekli değildir. + Eğer çok sayıda bölü çizgisinin birleştirilmeden yanyana belirtilmesi + gerekiyorsa + <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> + yönergesinde ve <code class="directive"><Location></code> + yönergesinin düzenli ifadeli kullanımında bunun açıkça belirtilmesi + gerekir.</p> + + <p>Örneğin, <code><LocationMatch "^/abc"></code> ile + <code>/abc</code> isteği eşleşirken <code>//abc</code> isteği + eşleşmez. <code class="directive"><Location></code> yönergesinin + regex olmayan kullanımı vekil isteklerindeki gibi davranır. Fakat + vekil harici işlemlerde <code class="directive"><Location></code> + yönergesinin regex olmayan kullanımında çok sayıda bölü çizgisi örtük + olarak tek bölü çizgisiyle eşleşir. Örneğin, + <code><Location "/abc/def"></code> belirtirseniz + <code>/abc//def</code> isteği bu ifade ile eşleşecektir.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız.</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Hata günlüklerinin ayrıntı seviyesini belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>LogLevel [<code>modül</code>:]<code>seviye</code> + [<code>modül</code>:<code>seviye</code>] ... +</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>LogLevel warn</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Modül ve dizin bağlamındaki yapılandırmalar Apache HTTP + Sunucusunun 2.3.6 ve sonraki sürümlerinde + kullanılabilmektedir.</td></tr> +</table> + <p><code class="directive">LogLevel</code> yönergesi hata günlüklerine kaydedilen + hata iletilerinde hangi ayrıntılara yer verileceğini belirler (<code class="directive"><a href="#errorlog">ErrorLog</a></code> yönergesine bakınız). En yüksek önem + derecesinden başlayarak olası <code>seviye</code> değerleri aşağıda + sıralanmıştır:</p> + + <table class="bordered"> + + <tr> + <th><strong>Seviye</strong> </th> + <th><strong>Açıklama</strong> </th> + <th><strong>Örnek</strong> </th> + </tr> + + <tr> + <td><code>emerg</code> </td> + <td>Acil durumlar - sistem kullanışsız.</td> + <td>"Child cannot open lock file. Exiting"<br />(Alt süreç kilit + dosyasını açamıyor. Çıkılıyor)</td> + </tr> + + <tr> + <td><code>alert</code> </td> + <td>Ne yapılacaksa beklemeden yapılmalı.</td> + <td>"getpwuid: couldn't determine user name from uid"<br />(getpwuid: + Kullanıcı ismi numarasından saptanamadı)</td> + </tr> + + <tr> + <td><code>crit</code> </td> + <td>Kriz durumları.</td> + <td>"socket: Failed to get a socket, exiting child"<br />(socket: bir + soket alınamadı, alt süreç çıkıyor)</td> + </tr> + + <tr> + <td><code>error</code> </td> + <td>Hata durumları.</td> + <td>"Premature end of script headers"<br />(Betik başlıkları + beklenmedik şekilde bitti)</td> + </tr> + + <tr> + <td><code>warn</code> </td> + <td>Uyarı durumları.</td> + <td>"child process 1234 did not exit, sending another + SIGHUP"<br />(1234 alt süreci çıkmadı, başka bir SIGHUP + gönderiliyor)</td> + </tr> + + <tr> + <td><code>notice</code> </td> + <td>Normal fakat önemli durum.</td> + <td>"httpd: caught SIGBUS, attempting to dump core in + ..."<br />(httpd: SIGBUS alındı, core dökümlenmeye çalışılıyor: + ...)</td> + </tr> + + <tr> + <td><code>info</code> </td> + <td>Bilgilendirme.</td> + <td>"Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..."<br />(Sunucu meşgul + görünüyor, (StartServers veya Min/MaxSpareServers değerlerini + arttırmanız gerekebilir)...)</td> + </tr> + + <tr> + <td><code>debug</code> </td> + <td>Hata ayıklama seviyesi iletileri</td> + <td>"Opening config file ..."<br />(... yapılandırma dosyası + açılıyor)</td> + </tr> + <tr> + <td><code>trace1</code> </td> + <td>İz sürme iletileri</td> + <td>"proxy: FTP: control connection complete"<br />(vekil: FTP: + denetim bağlantısı sağlandı)</td> + </tr> + <tr> + <td><code>trace2</code> </td> + <td>İz sürme iletileri</td> + <td>"proxy: CONNECT: sending the CONNECT request to the remote + proxy"<br />(vekil: CONNECT: uzak vekile CONNECT isteği + gönderiliyor)</td> + </tr> + <tr> + <td><code>trace3</code> </td> + <td>İz sürme iletileri</td> + <td>"openssl: Handshake: start"</td> + </tr> + <tr> + <td><code>trace4</code> </td> + <td>İz sürme iletileri</td> + <td>"read from buffered SSL brigade, mode 0, 17 bytes"<br />(tamponlu + SSL gruplamasından okuma, kip 0, 17 baytİz sürme iletileri</td> + </tr> + <tr> + <td><code>trace5</code> </td> + <td>İz sürme iletileri</td> + <td>"map lookup FAILED: map=rewritemap key=keyname"<br />(eşleşme + araması BAŞARISIZ: map=rewritemap key=keyname)</td> + </tr> + <tr> + <td><code>trace6</code> </td> + <td>İz sürme iletileri</td> + <td>"cache lookup FAILED, forcing new map lookup"<br />(arabellek + araması BAŞARISIZ, yeni bir eşleşme araması başlatılıyor)</td> + </tr> + <tr> + <td><code>trace7</code> </td> + <td>İz sürme iletileri, büyük miktarda veri dökümü</td> + <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td> + </tr> + <tr> + <td><code>trace8</code> </td> + <td>İz sürme iletileri, büyük miktarda veri dökümü</td> + <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td> + </tr> + </table> + + <p>Belli bir seviye belirtildiğinde daha yüksek seviyeden iletiler de + raporlanır. Örneğin, <code>LogLevel info</code> belirtildiğinde + <code>notice</code> ve <code>warn</code> günlük seviyelerinin iletileri + ayrıca raporlanacaktır.</p> + + <p>En az <code>crit</code> seviyesinin kullanılması önerilir.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config">LogLevel notice</pre> + + + + <div class="note"><h3>Ek Bilgi</h3> + <p>Günlük iletileri normal bir dosyaya yazılırken <code>notice</code> + seviyesinden iletiler engellenemez ve dolayısıyla daima raporlanırlar. + Ancak, günlük kaydı <code>syslog</code> kullanılarak yapılıyorsa bu + uygulanmaz.</p> + </div> + + <p>Bir modül ismi olmaksızın bir seviye belirtmek seviyeyi bu seviyedeki + tüm modüller için sıfırlayacaktır. Bir seviyyi bir modül ismiyle + birlikte belirtmek seviyeyi sadece bu modül için sıfırlayacaktır. Modül + ismi olarak, modülün kaynak dosyası ismini, modül kimliği veya + <code>_module</code> sonekli modül ismi belirtmek mümkündür. + Yani, aşağıdaki üç belirtim eşdeğerdedir:</p> + + <pre class="prettyprint lang-config">LogLevel info ssl:warn +LogLevel info mod_ssl.c:warn +LogLevel info ssl_module:warn</pre> + + + <p>Ayrıca seviyeyi dizin bağlamında değiştirmek de mümkündür:</p> + + <pre class="prettyprint lang-config">LogLevel info +<Directory "/usr/local/apache/htdocs/app"> + LogLevel debug +</Directory></pre> + + + <div class="note">Dizin bağlamında günük seviyesi yapılandırması sadece istek + çözümlendikten ve istek dizinle ilişkilendirildikten sonra günlüklenen + iletileri etkiler. Bağlantı veya sunucu ile ilişkilendirilmemiş günlük + iletileri etkilenmez.</div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li> +<li><code class="directive"><a href="#errorlogformat">ErrorLogFormat</a></code></li> +<li><a href="../logs.html">Apache HTTP Server Log Files</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir kalıcı bağlantıda izin verilen istek sayısı</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>MaxKeepAliveRequests <code>sayı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">MaxKeepAliveRequests</code> yönergesi <code class="directive"><a href="#keepalive">KeepAlive</a></code> etkinken bağlantı başına izin + verilecek istek sayısını sınırlar. Değer olarak <code>0</code> + belirtilirse istek sayısı sınırsız olur. Sunucu başarımını yüksek tutmak + için yüksekçe bir değer belirtmenizi öneririz.</p> + + <p>Örnek:</p> + + <pre class="prettyprint lang-config">MaxKeepAliveRequests 500</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Özkaynağın tamamını döndürmeden önce izin verilen üst üste binen + aralık sayısı (<code>100-200,150-300</code> gibi)</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | + <code>aralık-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache HTTP Sunucusunun 2.3.15 ve sonraki sürümlerinde + kullanılabilmektedir.</td></tr> +</table> + <p><code class="directive">MaxRangeOverlaps</code> yönergesi, sunucunun istemciye + göndermeye gönüllü olacağı üst üste binen HTTP Range'lerinin sayısını + sınırlar. İzin verilenden daha fazlası istenmişse özkaynağın tamamı + döndürülür.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>Üst üste binen HTTP Range'lerinin sayısını derleme sırasında + belirlenen öntanımlı 20 değeriyle sınırlar.</dd> + + <dt><strong>none</strong></dt> + <dd>Üst üste binen Range başlıkları yoksayılır.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>Sunucunun sağlamaya gönüllü olacağı üst üste binen HTTP + Range'lerinin sayısı sınırlanmaz.</dd> + + <dt><code>aralık sayısı</code></dt> + <dd>Sunucunun sağlamaya gönüllü olacağı üst üste binen HTTP + Range'lerinin azami sayısını ifade eden pozitif bir tamsayı.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Özkaynağın tamamını döndürmeden önce izin verilen ters sıralı + aralık sayısı (<code>100-200,50-70</code> gibi)</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>MaxRangeReversals default | unlimited | none | + <code>aralık-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>MaxRangeReversals 20</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache HTTP Sunucusunun 2.3.15 ve sonraki sürümlerinde + kullanılabilmektedir.</td></tr> +</table> + <p>The <code class="directive">MaxRangeReversals</code> yönergesi, sunucunun + istemciye göndermeye gönüllü olacağı ter sıralı HTTP Range'lerinin + sayısını sınırlar. İzin verilenden daha fazlası istenmişse + özkaynağın tamamı döndürülür.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>Ters sıralı HTTP Range'lerinin sayısını derleme sırasında + belirlenen öntanımlı 20 değeriyle sınırlar.</dd> + + <dt><strong>none</strong></dt> + <dd>Ters sıralı Range başlıkları yoksayılır.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>Sunucunun sağlamaya gönüllü olacağı ters sıralı HTTP + Range'lerinin sayısı sınırlanmaz.</dd> + + <dt><code>aralık-sayısı</code></dt> + <dd>Sunucunun sağlamaya gönüllü olacağı ters sıralı HTTP + Range'lerinin azami sayısını ifade eden pozitif bir tamsayı.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Özkaynağın tamamını döndürmeden önce izin verilen aralık sayısı</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>MaxRanges default | unlimited | none | + <code>aralık-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>MaxRanges 200</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache HTTP Sunucusunun 2.3.15 ve sonraki sürümlerinde + kullanılabilmektedir.</td></tr> +</table> + <p><code class="directive">MaxRanges</code> yönergesi, sunucunun istemciye + göndermeye gönüllü olacağı HTTP Range'lerinin sayısını sınırlar. İzin + verilenden daha fazlası istenmişse özkaynağın tamamı döndürülür.</p> + + <dl> + <dt><strong>default</strong></dt> + <dd>HTTP Range'lerinin sayısını derleme sırasında belirlenen öntanımlı + 200 değeriyle sınırlar.</dd> + + <dt><strong>none</strong></dt> + <dd>Range başlıkları yoksayılır.</dd> + + <dt><strong>unlimited</strong></dt> + <dd>Sunucunun sağlamaya gönüllü olacağı HTTP Range'lerinin sayısı + sınırlanmaz.</dd> + + <dt><code>aralık-sayısı</code></dt> + <dd>Sunucunun sağlamaya gönüllü olacağı HTTP Range'lerinin azami + sayısını ifade eden pozitif bir tamsayı.</dd> + </dl> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MergeSlashes" id="MergeSlashes">MergeSlashes</a> <a name="mergeslashes" id="mergeslashes">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun URL’lerde ardışık bölü çizgilerini birleştirip birleştirmeyeceğini denetler. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>MergeSlashes ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>MergeSlashes ON</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.39 sürümünde eklendi</td></tr> +</table> + <p>Öntanımlı olarak, sunucu istek adresinin yol bileşenindeki ardışık bölü + çizgilerini ('/') birleştirip tek bölü çizgisi olarak ele alır.</p> + + <p>Bu adresleri dosya sistemi ile eşleştirirken, bu ardışık bölü + çizgilerinin önemi yoktur. Ancak, bu adresler CGI veya vekil gibi başka + yollardan değerlendiriliyorsa bu ardışık bölü çizgilerinin olduğu gibi + kalması tercih edilebilir. Bu durumlarda ardışık bölü çizgilerinin + birleştirilmesini önlemek için, eskiden, <code class="directive">MergeSlashes</code> + yönergesine <em>OFF</em> atanabiliyordu.</p> + + <p><em>OFF</em> atanması durumunda, yapılandırma dosyasında, adresin yol + bileşeni ile eşleşen düzenli ifadelerde + (<code class="directive">LocationMatch</code>, <code class="directive">RewriteRule</code>, + ...) ardışık bölü çizgilerinin hesaba katılması gerekir. Düzenli ifade + içermeyen <code class="directive">Location</code> yönergeleri daima birleştirilmiş + bölü çizgileri içeren bir URL'ye karşı çalışır ve çok sayıdaki bölü + çizgileri arasında bir ayrım yapamaz.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a> <a name="mergetrailers" id="mergetrailers">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Trailer alanlarının başlığa dahil edilip edilmeyeceğini belirler</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>MergeTrailers [on|off]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>MergeTrailers off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.11 ve sonrası</td></tr> +</table> + <p>Bu yönerge HTTP Trailer alanlarının dahili HTTP başlıklarına kopyalanıp + kopyalanmayacağını belirler. Kopyalama işlemi istek gövdesi tamamen + alındığında gerçekleşir, çoğu başlık işleminin çok sonra istek + başlıklarını inceleme veya değiştirme şansı olur.</p> + <p>Bu seçenek, Trailer alanlarını daima kopyalayan 2.4.11 öncesi + dağıtımlarla uyumluluk için vardır.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Muteks mekanizmasını ve kilit dosyası dizinini tüm muteksler veya belirtilenler için yapılandırır</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>Mutex <code>mekanizma</code> [default|<code>muteks-ismi</code>] ... [OmitPID]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>Mutex default</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache HTTP Sunucusunun 2.3.4 ve sonraki sürümlerinde + kullanılabilmektedir.</td></tr> +</table> + <p><code class="directive">Mutex</code> yönergesi httpd ve diğer modüllerin + özkaynaklara erişimi dizgeleştirmekte kullandıkları mekanizmanın yanında + isteğe bağlı olarak kilit dosyasının yerini belirler. İlk değiştirge + olarak <code>default</code> belirtilirse tüm mutekslerin ayarları + değişir; ikinci değiştirge olarak bir muteks ismi belirtilirse (aşağıdaki + tabloya bakın) yalnızca bu muteksin öntanımlıları değişir.</p> + + <p><code class="directive">Mutex</code> yönergesi genelde aşağıdaki istisnai + durumlarda kullanılır:</p> + + <ul> + <li>İşlevsel veya başarımsal bir soruna sahip <a class="glossarylink" href="../glossary.html#apr" title="sözlüğe bakınız">APR</a> + tarafından öntanımlı mekanizma seçildiği takdirde muteks + mekanizmasını değiştirmek için</li> + + <li>Öntanımlı dizin, kilitlemeyi desteklemediği takdirde dosya tabanlı + muteksler tarafından kullanılan dizini değiştirmek için</li> + </ul> + + <div class="note"><h3>Destekleyen modüller</h3> + <p>Bu yönerge sadece <code>ap_mutex_register()</code> API'si kullanılarak + çekirdek sunucuda imlenmiş muteksleri yapılandırır. httpd ile birlikte + dağıtılan tüm modüller <code class="directive">Mutex</code> yönergesini + destekler, fakat üçüncü parti modüllerin hepsi desteklemeyebilir. Bu + yönergenin desteklenip desteklenmediğini öğrenmek için üçüncü parti + modülün belgelerini inceleyin; destekliyorsa muteks ad(lar)ı + belirtilmiştir.</p> + </div> + + <p>Kullanılabilen muteks <em>mekanizmaları</em>:</p> + <ul> + <li><code>default | yes</code> + <p><a class="glossarylink" href="../glossary.html#apr" title="sözlüğe bakınız">APR</a> tarafından saptanan öntanımlı kilitleme + gerçeklenimini seçer. Öntanımlı kilitleme gerçeklenimi + <code class="program"><a href="../programs/httpd.html">httpd</a></code> <code>-V</code> seçeneği ile çalıştırılarak + öğrenilebilir.</p></li> + + <li><code>none | no</code> + <p>Muteksi etkin şekilde iptal eder. Buna bir mutekste izin + verilebilmesi için modülün bunun geçerli bir seçim olduğunu + belirtmesi gerekir. Daha fazla bilgi için modül belgelerini + inceleyin.</p></li> + + <li><code>posixsem</code> + <p>POSIX semaforuna dayalı bir muteks çeşididir.</p> + <div class="warning"><h3>Uyarı</h3> + <p>Süreçteki bir evre muteks parçalama arızalarını tutuyorsa, + httpd'nin çökmesi sonucu, semafor sahipliği geri kazanılmaz.</p> + </div> + </li> + + <li><code>sysvsem</code> + <p>SystemV IPC semaforuna dayalı bir muteks çeşididir.</p> + <div class="warning"><h3>Uyarı</h3> + <p>Semafor geri kazanılmadan süreçler çökerse SysV semaforlarının + "sızıntı" yapması mümkündür.</p> + </div> + <div class="warning"><h3>Güvenlik</h3> + <p>Semafor API'si, HTTP sunucusu ile aynı kullanıcı kimliği altında + çalışan bir CGI (<em>örn</em>, <code class="program"><a href="../programs/suexec.html">suexec</a></code> veya + <code>cgiwrapper</code> gibi bir araç kullanmıyorsanız bütün + CGI'ler) tarafından hizmet reddi saldırısı yapılmasına izin + verir.</p> + </div> + </li> + + <li><code>sem</code> + <p>POSIX ve SystemV IPC semaforları arasından kullanılabilir "en iyi" + semafor gerçeklenimini seçer.</p></li> + + <li><code>pthread</code> + <p>Süreç çaprazlamalı POSIX evre mutekslerine dayalı bir muteks + çeşididir.</p> + <div class="warning"><h3>Uyarı</h3> + <p>Çoğu sistemde, bir çocuk süreç bu gerçeklenim tarafından kullanılan + bir muteksi tutarken olağandışı bir şekilde sonlanırsa httpd donar + ve isteklere yanıt vermeyi durdurur. Bu olduğunda sunucuyu bu + durumdan kurtarmak için elle yeniden başlatmak gerekir.</p> + <p>Bu duruma karşı bir mekanizma sağlayan Solaris ve Linux dikkate + değer bir istisnadır. Bu mekanizma, bir muteksi tutan bir çocuk + süreç olağandışı bir şekilde sonlandıktan sonra muteksin + kurtarılmasını sağlar.</p> + <p>Sisteminiz POSIX uyumluysa veya + <code>pthread_mutexattr_setrobust_np()</code> işlevini + sağlıyorsa <code>pthread</code> seçeneğini rahatça + kullanabilirsiniz.</p> + </div> + </li> + + <li><code>fcntl:/path/to/mutex</code> + <p>Muteks olarak <code>fcntl()</code> işlevini ve fiziksel bir (lock-) + dosyasını kullanan bir muteks çeşididir.</p> + <div class="warning"><h3>Uyarı</h3> + <p>Bu mekanizmaya dayalı çok sayıda muteks, çok evreli ve çok süreçli + ortamlarda kullanıldığında, örneğin Solaris'te olduğu gibi + <code>fcntl()</code> evrelerden bihaberse, geçerli muteks + işlemlerinde donma hataları (EDEADLK) raporlanabilir.</p> + </div> + </li> + + <li><code>flock:/path/to/mutex</code> + <p><code>flock()</code> işlevinin dosya kilitlemeyi sağlaması dışında + <code>fcntl:/path/to/mutex</code> yöntemine benzer.</p></li> + + <li><code>file:/path/to/mutex</code> + <p><code>fcntl</code> ve <code>flock</code> arasından kullanılabilir + "en iyi" dosya kilitleme gerçeklenimini seçer.</p></li> + </ul> + + <p>Çoğu mekanizma, yalnız kendilerini destekleyen platformlarda + <a class="glossarylink" href="../glossary.html#apr" title="sözlüğe bakınız">APR</a> tarafından da destekleniyorsa kullanılabilir. + Tüm platformlarda kullanılamayan mekanizmalar <em>posixsem</em>, + <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>, + <em>flock</em> ve <em>file</em> mekanizmalarıdır.</p> + + <p><em>fcntl</em> ve <em>flock</em> dosya tabanlı mekanizmaları ile bir + yol sağlandığı takdirde bu, kilit dosyasının oluşturulacağı dizindir. + Öntanımlı dizin, httpd'nin çalışma anı dizini <code class="directive"><a href="#serverroot">ServerRoot</a></code>'a görelidir. + <code>/path/to/mutex</code> için daima bir yerel diskteki dosya sistemi + kullanılır, asla NFS- veya AFS gibi bir ağ dosya sistemi kullanılmaz. + Dosya ismi daima muteks ismi ile başlar, buna modül tarafından sağlanan + isteğe bağlı bir aşama dizgesi eklenebilir, <code>OmitPID</code> değeri + belirtilmemişse httpd ebeveyn sürecinin süreç kimliği buna eklenerek + dosya ismi eşsiz kılınır. Böylece, çok sayıda httpd süreci aynı kilit + dosyası dizinini paylaştığı durumda çakışmalar önlenmiş olur. Örneğin, + muteks ismi <code>mpm-accept</code> ise ve kilit dosyası dizini + <code>/var/httpd/locks</code> ise ve ebeveyn süreç kimliği 12345 ise bu + httpd sürecine ait kilit dosyası ismi + <code>/var/httpd/locks/mpm-accept.12345</code> olurdu.</p> + + <div class="warning"><h3>Güvenlik</h3> + <p>Muteks dosyalarını herkesin yazabildiği <code>/var/tmp</code> gibi + dizinlere koymaktan <em>kaçınmak</em> en iyisidir. Örneğin, birinin aynı + dizinde oluşturmaya çalıştığı bir dosya ile aynı isimde bir kilit + dosyasını sunucunun da oluşturmaya çalıştığı durumda sunucu engellenerek + bir hizmet reddi saldırısı gerçekleştirilmiş gibi olur.</p> + </div> + + <p>httpd ve birlikte dağıtılan modüller tarafından kullanılan mutekslerin + isimleri:</p> + + <table class="bordered"><tr class="header"> + <th>Muteks ismi</th> + <th>Modül(ler)</th> + <th>Korunan özkaynak</th> + </tr> +<tr> + <td><code>mpm-accept</code></td> + <td><code class="module"><a href="../mod/prefork.html">prefork</a></code> ve <code class="module"><a href="../mod/worker.html">worker</a></code> MPM'leri + </td> + <td>Gürleyen sürü sorunundan kaçınmak için gelen bağlantılar; daha + fazla bilgi için <a href="../misc/perf-tuning.html">başarımın + arttırılması</a> belgesine bakın.</td> + </tr> +<tr class="odd"> + <td><code>authdigest-client</code></td> + <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td> + <td>Paylaşımlı bellekteki istemci listesi</td> + </tr> +<tr> + <td><code>authdigest-opaque</code></td> + <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td> + <td>Paylaşımlı bellekteki sayaç</td> + </tr> +<tr class="odd"> + <td><code>ldap-cache</code></td> + <td><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code></td> + <td>LDAP sonuç arabelleği</td> + </tr> +<tr> + <td><code>rewrite-map</code></td> + <td><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></td> + <td>Çoklu isteklerdeki birbirine karışmış G/Ç'tan kaçınmak için + harici eşleştirme progamlarıyla iletişim</td> + </tr> +<tr class="odd"> + <td><code>ssl-cache</code></td> + <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td> + <td>SSL oturum arabelleği</td> + </tr> +<tr> + <td><code>ssl-stapling</code></td> + <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td> + <td>OCSP zımbalama yanıtı arabelleği</td> + </tr> +<tr class="odd"> + <td><code>watchdog-callback</code></td> + <td><code class="module"><a href="../mod/mod_watchdog.html">mod_watchdog</a></code></td> + <td>Bir istemci modülünün geri çağırım işlevi</td> + </tr> +</table> + + <p><code>OmitPID</code> seçeneği, httpd ebeveyn süreç kimliğinin kilit + dosyası ismine eklenmesini engeller.</p> + + <p>Aşağıdaki örnekte, <code>mpm-accept</code> muteksinin mekanizmasının + derleme sırasındaki öntanımlısı, kilit dosyasının oluşturulacağı dizinin + <code>/var/httpd/locks</code> olarak belirtildiği <code>fcntl</code> + mekanizmasıyla değiştirilmektedir.Tüm diğer mutekslerin derleme anı + öntanımlı mekanizması ise <code>sysvsem</code> ile + değiştirilmektedir.</p> + + <pre class="prettyprint lang-config">Mutex sysvsem default +Mutex fcntl:/var/httpd/locks mpm-accept</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>ÖNERİLMİYOR: İsme dayalı sanal konaklar için IP adresi belirtir</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>NameVirtualHost <code>adres</code>[:<code>port</code>]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>2.3.11 öncesinde, <code class="directive">NameVirtualHost</code> yönergesi, + isme dayalı sanal konaklar için belli bir IP adresi ve port çiftini + sunucuya tanıtmak için gerekliydi. 2.3.11 ve sonrasında, bir IP adresi + ve port çifti her zaman çok sayıda sanal konakta kullanılabilmekte, + isme dayalı sanal barındırma bu adres için özdevinimli olarak etkin + kılınmaktadır.</p> + + <p>Bu yönerge şu an etkisizdir.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../vhosts/">Apache Sanal Konak Belgeleri</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Belli bir dizinde geçerli olacak özellikleri yapılandırır. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>Options + [+|-]<code>seçenek</code> [[+|-]<code>seçenek</code>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>Options FollowSymlinks</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.3.11 sürümünde öntanımlı değer All değiştirilip FollowSymlinks yapıldı.</td></tr> +</table> + <p><code class="directive">Options</code> yönergesi belli bir dizinde hangi + sunucu özelliklerinin etkin olacağını (veya olmayacağını) + belirler.</p> + + <p><code>seçenek</code> olarak hiçbir ek özellik etkin olmayacaksa + <code>None</code>, aksi takdirde aşağıdakilerden biri veya bir kaçı + belirtilir:</p> + + <dl> + <dt><code>All</code></dt> + <dd><code>MultiViews</code> hariç tüm seçenekler.</dd> + + <dt><code>ExecCGI</code></dt> + <dd><code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> kullanan CGI betiklerinin çalışmasına izin + verilir.</dd> + + <dt><code>FollowSymLinks</code></dt> + <dd>Sunucu bu dizindeki sembolik bağları izler. Bu öntanımlıdır. + <div class="note"> + <p>Sembolik bağlar izlense bile <code class="directive"><a href="#directory"><Directory></a></code> bölümleriyle eşleşen dosya + yolları değiştirilmez.</p> + <p><code>FollowSymLinks</code> ve + <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> sadece <code class="directive"><a href="#directory"><Directory></a></code> bölümlerinde veya + <code>.htaccess</code> dosyaları içinde çalışır.</p> + <p>Sembolik bağ sınamaları, atlatılabilir yarış koşullarına konu + olduğundan bu seçeneğin yokluğu bir güvenlik sınırlaması olarak + değerlendirilmemelidir.</p> + </div></dd> + + <dt><code>Includes</code></dt> + <dd><code class="module"><a href="../mod/mod_include.html">mod_include</a></code> tarafından sağlanan sunucu taraflı + içeriklere izin verilir.</dd> + + <dt><code>IncludesNOEXEC</code></dt> + <dd>Sunucu taraflı içeriklere izin verilir fakat <code>#exec cmd</code> + ve <code>#exec cgi</code> iptal edilir. Ancak, <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>’lı dizinlerdeki CGI + betikleri için <code>#include virtual</code> hala mümkün olacaktır.</dd> + + <dt><code>Indexes</code></dt> + <dd>İstenen URL bir dizin ile eşleşiyorsa ve bu dizin için bir <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> (<code>index.html</code> + gibi) belirtilmemişse <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> bu dizinin + biçimlenmiş bir listesini döndürecektir.</dd> + + <dt><code>MultiViews</code></dt> + <dd><code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> kullanılarak <a href="../content-negotiation.html">içerik uzlaştırmalı</a> çok + görünümlü içeriğe izin verilir. + <div class="note"><h3>Bilgi</h3> <p><code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> + karşılaştırmak değerlendirmek için gerçek özkaynaklara ihtiyaç + duyduğundan <code class="directive"><a href="#directory"><Directory></a></code> yönergesinde belirtilendan farklı bir yer + ayarlanırsa bu seçenek yoksayılır.</p></div> + </dd> + + <dt><code>SymLinksIfOwnerMatch</code></dt> + <dd>Sunucu sembolik bağları sadece sembolik bağın hedefi ile bulunduğu + dizinin sahibinin aynı kullanıcı olması halinde izleyecektir. + + <p><code>FollowSymLinks</code> ve + <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> sadece <code class="directive"><a href="#directory"><Directory></a></code> bölümlerinde veya + <code>.htaccess</code> dosyaları içinde çalışır.</p> + + <p>Sembolik bağ sınamaları, atlatılabilir yarış koşullarına konu + olduğundan bu seçenek bir güvenlik sınırlaması olarak + değerlendirilmemelidir.</p> + </dd> + </dl> + + <p>Normalde, bir dizine çok sayıda <code class="directive">Options</code> + uygulanabilirse de, dizine en uygun olanı uygulanıp diğerleri yok + sayılır; seçenekler katıştırılmaz (bkz, <a href="../sections.html#merging">Bölümler Nasıl Katıştırılır?</a>). Bununla birlikte, önüne bir + <code>+</code> veya <code>-</code> simgesi konmuş seçenekler varsa, o + seçenekler katıştırılır. Önüne <code>+</code> konmuş seçenekler + mevcutlara eklenirken <code>-</code> konmuş seçenekler silinir.</p> + + <div class="note"><h3>Bilgi</h3> + <p><code>+</code> veya <code>-</code> imli seçenekler içeren + <code class="directive">Options</code> ile imsiz seçenekler içerenlerin karışık + olarak kullanılması aslında geçersiz bir sözdizimi olup sunucunun + başlatılması sırasında sözdizimi denetiminin çıkmasıyla reddedilir.</p> + </div> + + <p>Örneğin, <code>+</code> ve <code>-</code> imleri olmaksızın,</p> + + <pre class="prettyprint lang-config"><Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options Includes +</Directory></pre> + + + <p>yapılandırmasıyla <code>/web/docs/spec</code> dizininde sadece + <code>Includes</code> seçeneği etkin olacaktır. Bununla birlikte, ikinci + <code class="directive">Options</code> yönergesinde <code>+</code> ve + <code>-</code> imleri kullanılırsa,</p> + + <pre class="prettyprint lang-config"><Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options +Includes -Indexes +</Directory></pre> + + + <p>yapılandırmasıyla <code>/web/docs/spec</code> dizininde + <code>FollowSymLinks</code> ve <code>Includes</code> seçenekleri etkin + olacaktır.</p> + + <div class="note"><h3>Ek Bilgi</h3> + <p><code>-IncludesNOEXEC</code> veya <code>-Includes</code> kullanımı, + önceki ayarların ne olduğuna bakılmaksızın sunucu taraflı içeriğin + tamamen iptaline sebep olur.</p> + </div> + + <p>Herhangi bir başka değer belirtilmedikçe <code>FollowSymlinks</code> + öntanımlıdır.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Dinlenen bir soket için protokol</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>Protocol <code>protokol</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache httpd 2.1.5 ve sonrasında kullanılabilmektedir. + Windows'ta ise Apache httpd 2.3.3 ve sonrasında + kullanılabilmektedir. +</td></tr> +</table> + <p>Bu yönerge dinlenen belli bir soket için kullanılacak protokolü + belirler. Belirtilen protokol bir isteği hangi modülün ele alacağını ve + <code class="directive">AcceptFilter</code> yönergesiyle yapılan özel + eniyilemelere uygulanacak protokolü belirler.</p> + + <p>Bu yönerge çoğu yapılandırma için gerekli değildir. Belirtilmezse, + port 443 için <code>https</code> öntanımlıdır ve diğer tüm portlar + için <code>http</code> ntanımlıdır. Protokol, hangi modülün bir isteği + işleyeceğini belirlemek ve <code class="directive"><a href="#acceptfilter">AcceptFilter</a></code> yönergesi ile protokole özgü + eniyilemeleri uygulamak için kullanılır.</p> + + <p>Örneğin, <code>https</code>'i standartdışı bir portta çalıştırmak + isterseniz protokolü şöyle belirtebilirsiniz:</p> + + <pre class="prettyprint lang-config">Protocol https</pre> + + + <p>Protokolü <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> + yönergesini kullanarak da belirtebilirsiniz.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive">AcceptFilter</code></li> +<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="Protocols" id="Protocols">Protocols</a> <a name="protocols" id="protocols">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucu/sanal konak için kullanılabilecek protokoller</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>Protocols <code>protokol</code> ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>Protocols http/1.1</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Sadece Apache 2.4.17 ve sonrasında kullanılabilir.</td></tr> +</table> + <p>Bu yönerge bir sunucu/sanal konak için kullanılabilecek + protokolleri belirtmekte kullanılır. Bu liste, bir istemcinin bir + sanal konak veya sunucu ile uzlaşabilmesini sağlayan prokolleri + belirler.</p> + + <p>Bir sanal konak veya sunucuda kullanılabilecek protolleri + çeşitlendirmek isterseniz bu protokolleri belirtmeniz gerekir. + 1.0 ve 0.9 istemcilerle uyumlu olan http/1.1 protokolü + öntanımlıdır.</p> + + <p>Örneğin, bir sunucunun TLS'li HTTP/2 protokolünü desteklemesini + şöyle sağlayabilirsiniz:</p> + + <pre class="prettyprint lang-config">Protocols h2 http/1.1</pre> + + + <p>Geçerli protokoller, http ve https bağlantıları için + <code>http/1.1</code> htps bağlantıları için <code>h2</code> ve + http bağlantıları için <code>h2c</code> protokolleridir. Modüller + başka protokollerin de etkinleştirilmesini gerektirebilir.</p> + + <p>Kullanımından vazgeçilmiş protokollerin silinmesi gerekmez. Böyle + protokol isimleri basitçe yoksayılır.</p> + + <p>Ana sunucu için belirtilen protokoller, kendi protokol yönergesi + olmayan sanal konaklar için de geçerlidir. Diğer yandan sanal + konaklarda protokol belirtilmesi ana sunucuda belirtien + protollerin bu sanal konaklarda geçersiz olmasına sebep olur. + </p> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#protocolshonororder">ProtocolsHonorOrder</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ProtocolsHonorOrder" id="ProtocolsHonorOrder">ProtocolsHonorOrder</a> <a name="protocolshonororder" id="protocolshonororder">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Uzlaşma sırasında protokollerin öncelik sırasını belirler</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ProtocolsHonorOrder On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ProtocolsHonorOrder On</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Sadece Apache 2.4.17 ve sonrasında kullanılabilir.</td></tr> +</table> + <p>Sunucuda <code class="directive">Protocols</code> yönergesinde listelemiş + protokollerin mi yoksa istemcinin protokol listesinin mi öncelikli + olacağı bu yönerge ile belirtilir.</p> + + <p>Off belirtilirse, istemcinin protokol listesi sunucu + yapılandırmasındaki sıralamanın önüne geçer.</p> + + <p><code class="directive">ProtocolsHonorOrder</code> yönergesine <code>on</code> + belirtilirse (öntanımlıdır), istemicinin protokol sıralaması dikkate + alınmaz ve protokol uzlaşımının sonucunu sunucu ayarlarındaki + sıralama belirler.</p> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#protocols">Protocols</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="QualifyRedirectURL" id="QualifyRedirectURL">QualifyRedirectURL</a> <a name="qualifyredirecturl" id="qualifyredirecturl">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>REDIRECT_URL ortam değişkeninin tamamen nitelenmiş olup +olmayacağını denetler</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>QualifyRedirectURL On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>QualifyRedirectURL Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Yönerge 2.4.18 ve sonrasında desteklenmektedir. 2.4.17 +sürümünde 'QualifyRedirectURL On' yapılandırması mevcutmuş gibi +davranılır.</td></tr> +</table> + <p>Bu yönerge sunucuya REDIRECT_URL ortam değişkenin tamamen nitelenmiş + olacağını temin eder. Değişken öntanımlı olarak istemci tarafından talep + edilen URL'yi harfi harfine içerir, "/index.html" gibi. + <code class="directive"><a href="#qualifyredirecturl on">QualifyRedirectURL On</a></code> belirtilseydi + aynı istek "http://www.example.com/index.html" gibi bir değerle + sonuçlanırdı.</p> + + <p>Böyle belirtilmemiş olsa bile, istek tam nitelenmiş bir URL + içerseydi REDIRECT_URL de tam nitelenmiş URL'yi içerirdi. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ReadBufferSize" id="ReadBufferSize">ReadBufferSize</a> <a name="readbuffersize" id="readbuffersize">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Veriyi okumakta kullanılacak tampon sayısı</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ReadBufferSize <code>bayt-sayısı</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ReadBufferSize 8192</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.27 ve sonrası</td></tr> +</table> + <p>Bu yönerge, ağdan veya dosyalardan veri okumak için kullanılan bellek + tamponunun boyutunu (bayt cinsinden) yapılandırmaya izin verir.</p> + + <p>Daha büyük bir arabellek, daha büyük verilerle başarımı artırabilir, + ancak bağlantı başına tüketilen bellek artar. Yapılandırılabilir en küçük + boyut <code>1024</code>'tür.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RegexDefaultOptions" id="RegexDefaultOptions">RegexDefaultOptions</a> <a name="regexdefaultoptions" id="regexdefaultoptions">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Regex düzenli ifadeleri için öntanımlı/küresel seçenekleri yapılandırır</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>RegexDefaultOptions [none] [+|-]<code>seçenek</code> [[+|-]<code>seçenek</code>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>RegexDefaultOptions DOTALL DOLLAR_ENDONLY</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Sadece Apache 2.4.30 ve sonrasında kullanılabilmektedir.</td></tr> +</table> + <p>Bu yönerge kendisinden sonra kullanılan bütün düzenli ifsdelerin + davranışını etkiler.</p> + + <p>'+' ile öncelenmiş bütün seçenekler önceden atanmış seçeneklere + eklenir.<br /> + '-' ile öncelenmiş bütün seçenekler önceden atanmış seçeneklerden + çıkarılır.<br /> + '+' veya '-' ile öncelenmemiş her seçenek önceden atanmış seçenekleri + silerek onların yerini alır.<br /> + <code>none</code> ile önceden atanmış tüm seçenekler sıfırlanır.</p> + + <p><code>seçenek</code> şunlardan biri olabilir:</p> + <dl> + <dt><code>ICASE</code></dt> + <dd>Harf büyüklüğüne duyarlı eşleşmeler kullanılır.</dd> + + <dt><code>EXTENDED</code></dt> + <dd>Perl'ün /x seçeneği; kalıp içindeki açıklamaları ve + (öncelenmemiş) boşlukları yoksayar.</dd> + + <dt><code>DOTALL</code></dt> + <dd>Perl'ün /s seçeneği; '.' karakteri, satırsonu karakteri ile + eşleşir.</dd> + + <dt><code>DOLLAR_ENDONLY</code></dt> + <dd>'$' dizgenin sonu ile eşleşir.</dd> + </dl> + <pre class="prettyprint lang-config"># Tüm düzenli ifadeler için öntanımlı olarak ICASE seçeneğini ekler: +RegexDefaultOptions +ICASE +... +# Öntanımlı DOLLAR_ENDONLY seçeneği silinir, diğer seçenekler tutulur: +RegexDefaultOptions -DOLLAR_ENDONLY +... +# Atanmış seçenekler silinir, DOTALL öntanımlı seçenek yapılır: +RegexDefaultOptions DOTALL +... +# Tüm seçenekler silinir, öntanımlı seçenek kalmaz. +RegexDefaultOptions none +...</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a> <a name="registerhttpmethod" id="registerhttpmethod">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Standart olmayan HTTP yöntemlerini devreye alır</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>RegisterHttpMethod <code>yöntem</code> [<code>yöntem</code> [...]]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache HTTP Sunucusunun 2.4.24 ve sonraki sürümlerinde kullanılabilmektedir.</td></tr> +</table> + <p>Bu yönerge sunucunun standatta bulunmayan ek HTTP yöntemlerini + kullanabilmesini sağlar. Yönergelerde standartta olmayan yöntem isimleri + kullanmak gerektiğinde veya sunucunun modüllere sadece standart yöntemleri + aktaracak şekilde yapılandırıldığı durumlarda bazı standart-dışı + yöntemleri vekil veya CGI betikleriyle aktarmayı mümkün kılmak için bu + gereklidir.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#httpprotocoloptions">HTTPProtocolOptions</a></code></li> +<li><code class="directive"><a href="../mod/mod_allowmethods.html#allowmethods">AllowMethods</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Apache httpd alt süreçleri tarafından çalıştırılan süreçlerin + işlemci tüketimine sınırlama getirir.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>RLimitCPU <code>saniye</code>|max [<code>saniye</code>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>Bir değer belirtilmemiştir; işletim sistemi öntanımlıları kullanılır +</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>1 veya 2 değer alır. İlk değer bütün süreçler için sanal özkaynak + sınırını, ikinci değer ise kesin özkaynak sınırını belirler. İki değer de + birer sayı olabileceği gibi bu sınırın işletim sistemi yapılandırmasında + izin verilen üst sınıra ayarlanacağını belirtmek üzere <code>max</code> + olabilir. Kesin özkaynak sınırını yükseltmek için sunucunun + <code>root</code> olarak veya sistem açılışı sırasında çalıştırılması + gerekir.</p> + + <p>Bu sınırlar Apache httpd’nin kendi alt süreçlerine değil, isteklere + yanıt verirken Apache httpd alt süreçlerinin çatalladıkları süreçlere + uygulanır. Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir + fakat borulu günlük kaydı gibi ana Apache httpd süreci tarafından + çatallanmış süreçler olmazlar.</p> + + <p>İşlemci özkaynak sınırları saniye cinsinden ifade edilir.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Apache httpd alt süreçleri tarafından çalıştırılan süreçlerin + bellek tüketimine sınırlama getirir.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>RLimitMEM <code>bayt-sayısı</code>|max [<code>bayt-sayısı</code>|max] +</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>Bir değer belirtilmemiştir; işletim sistemi öntanımlıları kullanılır +</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>1 veya 2 değer alır. İlk değer bütün süreçler için sanal özkaynak + sınırını, ikinci değer ise kesin özkaynak sınırını belirler. İki değer de + birer sayı olabileceği gibi bu sınırın işletim sistemi yapılandırmasında + izin verilen üst sınıra ayarlanacağını belirtmek üzere <code>max</code> + olabilir. Kesin özkaynak sınırını yükseltmek için sunucunun + <code>root</code> olarak veya sistem açılışı sırasında çalıştırılması + gerekir.</p> + + <p>Bu sınırlar Apache httpd’nin kendi alt süreçlerine değil, isteklere + yanıt verirken Apache httpd alt süreçlerinin çatalladıkları süreçlere + uygulanır. Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir + fakat borulu günlük kaydı gibi ana Apache httpd süreci tarafından + çatallanmış süreçler olmazlar.</p> + + <p>Bellek özkaynak sınırları süreç başına bayt sayısı olarak ifade edilir. + </p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Apache httpd alt süreçleri tarafından çalıştırılabilecek süreç + sayısına sınırlama getirir.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>RLimitNPROC <code>sayı</code>|max [<code>sayı</code>|max]</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>Bir değer belirtilmemiştir; işletim sistemi öntanımlıları kullanılır +</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>1 veya 2 değer alır. İlk değer bütün süreçler için sanal özkaynak + sınırını, ikinci değer ise kesin özkaynak sınırını belirler. İki değer de + birer sayı olabileceği gibi bu sınırın işletim sistemi yapılandırmasında + izin verilen üst sınıra ayarlanacağını belirtmek üzere <code>max</code> + olabilir. Kesin özkaynak sınırını yükseltmek için sunucunun + <code>root</code> olarak veya sistem açılışı sırasında çalıştırılması + gerekir.</p> + + <p>Bu sınırlar Apache httpd’nin kendi alt süreçlerine değil, isteklere + yanıt verirken Apache httpd alt süreçlerinin çatalladıkları süreçlere + uygulanır. Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir + fakat borulu günlük kaydı gibi ana Apache httpd süreci tarafından + çatallanmış süreçler olmazlar.</p> + + <p>Süreç sayısı sınırı kullanıcı başına süreç sayısına sınırlama getirir. + </p> + + <div class="note"><h3>Ek Bilgi</h3> + <p>CGI süreçleri sunucu kullanıcı kimliğinden farklı bir kullanıcı + kimliği altında çalışmıyorsa bu yönerge sunucunun kendi oluşturduğu + süreç sayısını sınırlayacaktır. Bunun kanıtı <code>error_log</code>’da + iletilerin çatallanamamasıdır.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li> +<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>CGI betikleri için yorumlayıcı belirleme tekniği</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Sadece Win32 için.</td></tr> +</table> + <p>Bu yönerge Apache httpd’nin CGI betiklerini çalıştıracak yorumlayıcıyı + nasıl tespit edeceğini belirler. <code>Script</code> öntanımlı olup + Apache httpd’nin yorumlayıcı olarak betiğin diyezli ünlem satırında + (<code>#!</code> ile başlayan ilk satır) belirtilen yorumlayıcıyı + kullanacağını belirtir. Win32 sistemlerinde bu satır genellikle + şöyledir:</p> + + <pre class="prettyprint lang-perl">#!C:/Perl/bin/perl.exe</pre> + + + <p><code>perl</code> yorumlayıcının yeri <code>PATH</code> değişkeninde + kayıtlı ise şöyle de olabilir:</p> + + <pre class="prettyprint lang-perl">#!perl</pre> + + + <p><code>ScriptInterpreterSource Registry</code> değeri ise betik dosyası + uzantısının (<code>.pl</code> gibi) Windows Sicili içindeki + <code>HKEY_CLASSES_ROOT</code> ağacında arama yapmak için bir arama + anahtarı olarak kullanılmasını sağlar. Betik dosyasını çalıştırmak için + tanımlanmış komutu bulmak için <code>Shell\ExecCGI\Command</code> yoluna, + orada yoksa <code>Shell\Open\Command</code> yoluna bakılır. İkisi de + yoksa son çare olarak <code>Script</code> seçeneğinin davranışına + dönülür.</p> + + <div class="warning"><h3>Güvenlik</h3> + <p><code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>’lı dizinlerde + Apache httpd bulduğu <strong>her</strong> dosyayı çalıştırmayı deneyeceğinden + <code>ScriptInterpreterSource Registry</code> yapılandırmasını + kullanırken dikkatli olun. <code>Registry</code> seçeneği genellikle + çalıştırılmayacak dosyalar için istenmeyen program çağrılarına sebep + olabilir. Örneğin, çoğu Windows sisteminde <code>.htm</code> dosyaları + için ön tanımlı "open" komutu Microsoft Internet Explorer’ın + çalıştırılmasına sebep olur; bu bakımdan, betik dizininde bulunan bir + <code>.htm</code> dosyası için yapılan bir HTTP isteği tarayıcının sunucu + artalanında çalıştırılmasına sebep olacaktır. Bu, sistemi bir kaç dakika + içinde çökertmek için iyi bir yoldur.</p> + </div> + + <p><code>Registry-Strict</code> seçeneği <code>Registry</code> + seçeneğinin yaptığını + <code>Shell\ExecCGI\Command</code> yolu için yapar. <code>ExecCGI</code> + sistem tarafından bilinen bir anahtar olmadığından Windows Siciline elle + kaydedilmesi gerekir ve dolayısıyla sisteminiz üzerinde istenmeyen + program çağrılarına sebep olmaz.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İsteğin 63 karakterden büyük olduğu varsayımıyla, mod_status'un + ilk 63 karakteri mi yoksa son 63 karakteri mi göstereceğini + belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>SeeRequestTail On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>SeeRequestTail Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>Apache httpd 2.2.7 ve sonrasında kullanılabilmektedir. +</td></tr> +</table> + <p><code class="module"><a href="../mod/mod_status.html">mod_status</a></code> modülü <code>ExtendedStatus On</code> + ile işleme alınan asıl isteği gösterir. Tarihsel amaçlarla, isteğin + sadece 63 karakteri gösterme amacıyla saklanır. Bu yönerge ilk 63 + karakterin mi (önceki davranış ve öntanımlı durum) yoksa son 63 + karakterin mi saklanacağını belirler. Bu, şüphesiz, isteğin uzunluğu 64 + karakter veya daha fazlaysa uygulanabilirdir.</p> + + <p>Apache httpd'ye gelen istek <code>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</code> + ise <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> şunu gösterir:</p> + + <table class="bordered"> + <tr> + <th>Off (öntanımlı)</th> + <td>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples</td> + </tr> + <tr> + <th>On</th> + <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</td> + </tr> + </table> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun hata iletilerinde istemciye göstereceği eposta adresi +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ServerAdmin <code>eposta-adresi</code>|<code>URL</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerAdmin</code> yönergesi, sunucunun bir hata + durumunda istemciye döndüreceği hata iletilerinde içereceği iletişim + adresini belirtmek için kullanılır. Eğer <code class="program"><a href="../programs/httpd.html">httpd</a></code> + sağlanan değerin bir URL olmadığını saptarsa değerin bir eposta adresi + olduğuna hükmeder ve önüne <code>mailto:</code> getirerek onu bir hiper + bağ hedefi olarak kullanır. Çoğu CGI betiği bir eposta adresi + belirtildiği kabulünü yaptığından değer olarak bir URL değil bir eposta + adresi belirtmeniz önerilir. Eğer bir URL belirtecekseniz hedef sizin + denetiminizde olan başka bir sunucuda bulunmalıdır, yoksa kullanıcılar + hata durumunda bu adrese erişemeyebilirler.</p> + + <p>Kullanıcıların sunucu hakkında konuşurken isminizden bahsetmemeleri için + burada belirtilecek adresin sırf bu işe adanmış bir adres olması daha + iyidir. Örnek:</p> + + <pre class="prettyprint lang-config">ServerAdmin www-admin@foo.example.com</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>İstekleri isme dayalı sanal konaklarla eşleştirilirken +kullanılacak konak adları için başka isimler belirtebilmeyi sağlar. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ServerAlias <code>konakadı</code> [<code>konakadı</code>] ...</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerAlias</code> yönergesi, istekleri <a href="../vhosts/name-based.html">isme dayalı sanal konaklarla</a> + eşleştirilirken kullanılacak konak adları için başka isimler + belirtebilmeyi sağlar. <code class="directive">ServerAlias</code> dosya adı kalıp + karakterleri içerebilir.</p> + + <pre class="prettyprint lang-config"><VirtualHost *:80> + ServerName server.example.com + ServerAlias server server2.example.com server2 + ServerAlias *.example.com + UseCanonicalName Off + # ... +</VirtualHost></pre> + + + <p>İsme dayalı sanal konaklardan en iyi eşleşme kümesinde olanlar + yapılandırmada göründükleri sıraya göre işleme sokulur. Joker + kullanımları arasında fark gözetilmeksizin <code class="directive"><a href="#servername">ServerName</a></code> veya <code class="directive"><a href="#serveralias">ServerAlias</a></code> yönergesi eşleşen ilk sanal konak + kullanılır.</p> + + <p><code class="directive"><a href="#virtualhost"><VirtualHost></a></code> + bölümü içindeki isimlerin sırası (jokersiz) + <code class="directive">ServerAlias</code> yönergesindeki gibi ele + alınır.</p> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><a href="../vhosts/">Apache HTTP Sunucusu Sanal Konak Belgeleri</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun özdeşleşeceği konak ismi ve port.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ServerName [<code>şema</code>://]<code>alan-adı</code>|<code>ip-adresi</code>[:<code>port</code>] +</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerName</code> yönergesi, sunucunun kendini + betimlemekte kullanacağı şema, konak adı ve port değerlerini belirler. + </p> + + <p><a href="../vhosts/name-based.html">isme dayalı sanal + konaklar</a> kullanılırken bir sanal konağı eşsiz bir şekilde betimlemek + için <code class="directive">ServerName</code> kullanılır (muhtemelen + <code class="directive"><a href="#serveralias">ServerAlias</a></code> ile birlikte).</p> + + <p>Ek olarak, <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> + yönergesine öntanımlı olmayan bir değer atanarak özüne yönlendiren + URL'ler oluştururken de bu yönerge kullanılır.</p> + + <p>Örneğin, HTTP + sunucusunun barındırıldığı makinenin ismi <code>mail.example.com</code> + olduğu halde makinenin bir de <code>www.example.com</code> diye bir de + DNS rumuzu varsa ve HTTP sunucunuzun bu rumuzla kendini + özdeşleştirmesini isterseniz bunu şöyle belirtebilirsiniz:</p> + + <pre class="prettyprint lang-config">ServerName www.example.com</pre> + + + <p><code class="directive">ServerName</code> yönergesi sunucu tanımının içinde + herhangi bir yerde görünebilirse de her göründüğü yerde bir öncekini + iptal eder.</p> + + <p>Bir <code class="directive">ServerName</code> ataması yapılmamışsa sunucu + istemciye görünen sunucu ismini anlamak için önce işletim sistemine + sistemin konak adını sorar. Bu başarılı olmazsa sistem üzerinde IP + adresine bir ters DNS sorgusu yapar.</p> + + <p><code class="directive">ServerName</code> yönergesinde bir port belirtilmediği + takdirde sunucu, isteğin geldiği portu kullanacaktır. Öngörülebilirlik ve + güvenilirlik açısından en iyisi <code class="directive">ServerName</code> + yönergesini kullanarak açıkça bir konak ismi ve port belirtmektir.</p> + + <p><a href="../vhosts/name-based.html">İsme dayalı sanal konaklar</a> + kullanıyorsanız, <code class="directive"><a href="#virtualhost"><VirtualHost></a></code> bölümü içindeki + <code class="directive">ServerName</code> yönergesi, isteğin <code>Host:</code> + başlığında bu sanal konakla eşleşecek konak ismini belirler.</p> + + + <p>Bazen sunucu, bir ters vekil, yük dengeleyici veya SSL yük aktarım + uygulaması gibi bir aygıtın arkasında çalışır. Böyle durumlarda sunucunun + kendine yönelik URL’leri doğru üretebildiğinden emin olmak için + <code class="directive">ServerName</code> yönergesinde istemcinin bağlanacağı + <code>https://</code> şeması ve port numarası belirtilir.</p> + + <p>Sunucunun kendine yönelik URL’lerin belirtilen portu içerip içermediğini + veya istemcinin yaptığı istekte belirtilen port numarasının verilip + verilmediğinin saptamasını sağlayan (örneğin, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> + modülü tarafından) ayarlar için <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> ve + <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> + yönergelerinin açıklamalarına bakınız.</p> + + <div class="warning"> + <p><code class="directive">ServerName</code> yönergesine isim atamadaki bir + başarısızlık, sunucu başlatılırken isim bir IP adresine + çözümlenebileceğinden bir uyarı çıktılanmasına sebep olur. + <code>httpd</code> böyle bir durumda sistemin <code>hostname</code> + komutunu kullanarak saptadığı konak ismini kullanacaktır. Bu konak ismi + hemen hemen daima sizin istediğiniz isim olmayacaktır.</p> + <div class="example"><p><code> + httpd: Could not reliably determine the server's fully qualified domain name, using belgeler.yerel for ServerName + </code></p></div> + <p>Çevirisi: Sunucunun tamamen nitelenmiş alan adı gerektiği gibi + saptanamadı, ServerName için belgeler.yerel kullanılıyor</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../dns-caveats.html">DNS ile ilgili konular ve Apache HTTP + Sunucusu</a></li> +<li><a href="../vhosts/">Apache HTTP Sunucusu Sanal Konak Belgeleri</a> +</li> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Uyumsuz bir tarayıcı tarafından erişilmesi için bir isme dayalı sanal konak için meşru URL yolu</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ServerPath <code>URL-yolu</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerPath</code> yönergesi <a href="../vhosts/">isme + dayalı sanal konaklar</a>da kullanmak için konağa meşru bir URL yolu + belirler.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../vhosts/">Apache HTTP Sunucusu Sanal Konak Belgeleri</a> +</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucu yapılandırması için kök dizin</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ServerRoot <code>dizin-yolu</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerRoot</code> yönergesi sunucu yapılandırmasını + içeren dizinin yerini belirtir. Genellikle <code>conf/</code> ve + <code>logs/</code> gibi alt dizinler içerir. <code class="directive"><a href="#include">Include</a></code>, <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code> gibi diğer yapılandırma + yönergelerindeki göreli yollar bu dizine göre ele alınır.</p> + + <pre class="prettyprint lang-config">ServerRoot "/home/httpd"</pre> + + + <p><code class="directive">ServerRoot</code> için öntanımlı yer <a href="../programs/configure.html"><code>configure</code></a> betiğinin + <code>--prefix</code> seçeneği ile değiştirilebilir ve sunucunun çoğu + üçüncü parti dağıtıcısı öntanımlı yeri yukardakilerden farklı bir yere + ayarlar.</p> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../invoking.html"><code>httpd</code> için <code>-d</code> seçeneği</a></li> +<li><code class="directive">ServerRoot</code> dizininin erişim izinlerinin nasıl + ayarlanması gerektiğini öğrenmek için <a href="../misc/security_tips.html#serverroot">güvenlik ipuçları</a></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucu tarafından üretilen belgelerin dipnotunu ayarlar. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ServerSignature Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">ServerSignature</code> yönergesi, sunucu tarafından + üretilen belgelerin (hata iletileri, <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> ftp dizin + listeleri, <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> çıktısı, vs.) altındaki dipnot + satırını yapılandırabilmenizi sağlar. Böyle bir dipnot satırın + istenmesinin sebebi vekil zincirlerinde istemciye dönen hata iletisinin + aslında hangi sunucu tarafından üretildiğini kullanıcıya bildirmektir.</p> + + <p><code>Off</code> değeri öntanımlı değer olup dipnot satırının + gösterilmemesini sağlar. + <code>On</code> değeri, sunucu sürüm numarası ve hizmeti sunan sanal + konağın isminden (<code class="directive"><a href="#servername">ServerName</a></code>) oluşan + bir dipnot satırı oluşturulmasını sağlar; <code>EMail</code> değeri bu + ikisine ek olarak satıra <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> + ile belirtilen adres için bir "mailto:" bağı ekler.</p> + + <p>Sunucu sürüm numarasının ayrıntıları <code class="directive"><a href="#servertokens">ServerTokens</a></code> yönergesi ile belirlenmektedir.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td><code>Server</code> HTTP yanıt başlığını yapılandırır. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>ServerTokens Full</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge <code>Server</code> HTTP yanıt başlığı alanında istemcilere + sunucunun işletim sistemi, sunucuyla derlenmiş modüller, vs. hakkında + bilgi verilip verilmeyeceğini belirler.</p> + + <dl> + <dt><code>ServerTokens Full</code> (veya belirtilmezse)</dt> + <dd>Sunucu şunu gönderir (<em>örnek</em>): <code>Server: Apache/2.4.2 + (Unix) PHP/4.2.2 MyMod/1.2</code></dd> + + <dt><code>ServerTokens Prod[uctOnly]</code></dt> + <dd>Sunucu şunu gönderir (<em>örnek</em>): <code>Server: + Apache</code></dd> + + <dt><code>ServerTokens Major</code></dt> + <dd>Sunucu şunu gönderir (<em>örnek</em>): <code>Server: + Apache/2</code></dd> + + <dt><code>ServerTokens Minor</code></dt> + <dd>Sunucu şunu gönderir (<em>örnek</em>): <code>Server: + Apache/2.4</code></dd> + + <dt><code>ServerTokens Min[imal]</code></dt> + <dd>Sunucu şunu gönderir (<em>örnek</em>): <code>Server: + Apache/2.4.2</code></dd> + + <dt><code>ServerTokens OS</code></dt> + <dd>Sunucu şunu gönderir (<em>örnek</em>): <code>Server: Apache/2.4.2 + (Unix)</code></dd> + + </dl> + + <p>Bu ayarlama sunucunun tamamını etkiler ve her sanal konak için + farklılaştırılamaz.</p> + + <p>Bu yönerge <code class="directive"><a href="#serversignature">ServerSignature</a></code> + yönergesi tarafından sunulan bilgiyi de etkilemektedir.</p> + + <div class="note"><code class="directive">ServerTokens</code> yönergesinde + <code>minimal</code>'den azının belirtilmesi önerilmez. Bunun sebebi ara + işlemlerle ilgili hata ayıklamasını zorlaştırmasıdır. Ayrıca, + <code>Server:</code> başlığının iptal edilmesinin sunucunuzu daha güvenli + yapmayacağına dikkat ediniz; "çapraşıklıkla sağlanan güvenlik" düşüncesi + gerçekle bağdaşmaz ve güvenliği olumsuz etkiler.</div> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Eşleşen tüm dosyaların belli bir eylemci tarafından işlenmesine +sebep olur.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>SetHandler <code>eylemci-ismi</code>|none|<code>ifade</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>ifade seçeneği 2.4.19 sürümünde eklendi</td></tr> +</table> + <p>Bir <code>.htaccess</code> dosyasına veya bir <code class="directive"><a href="#directory"><Directory></a></code> ya da <code class="directive"><a href="#location"><Location></a></code> bölümüne yerleştirildiğinde, eşleşen + tüm dosyaların, ismi <code>eylemci-ismi</code> ile belirtilen <a href="../handler.html">eylemci</a> tarafından çözümlenmesine sebep olur. + Örneğin, bir dizin içindeki bütün dosyaların, uzantılarına bakılmaksızın + birer imagemap kural dosyası olarak çözümlenmesini istersiniz, bu dizin + içindeki bir <code>.htaccess</code> dosyasına şöyle bir satır + koyabilirsiniz:</p> + + <pre class="prettyprint lang-config">SetHandler imap-file</pre> + + + <p>Başka bir örnek: <code>http://localhost/status</code> gibi bir istek + yapıldığında sunucunun bir durum bilgisi göstermesi için + <code>httpd.conf</code> dosyasına şöyle bir satır koyabilirsiniz:</p> + + <pre class="prettyprint lang-config"><Location "/status"> + SetHandler server-status +</Location></pre> + + + <p>Bu yönergeyi ayrıca, belli bir dosya uzantısına sahip dosyalara uygun + bir eylemci atamak için de kullanabilirsiniz. örnek:</p> + + <pre class="prettyprint lang-config"><FilesMatch "\.php$"> + SetHandler application/x-httpd-php +</FilesMatch></pre> + + + <p>Dizge değerli ifadeler istek öncesi değişkenleri içerecek şekilde + düzenlenebilir. Buna ismli düzenli ifadelere yapılan geriye başvurular + dahildir:</p> + + <pre class="prettyprint lang-config"><LocationMatch ^/app/(?<sub>[^/]+)/> + SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080" +</LocationMatch></pre> + + + <p>Evvelce tanımlanmış bir <code class="directive">SetHandler</code> yönergesini + <code>None</code> değeriyle geçersiz hale getirebilirsiniz.</p> + + <div class="note"><h3>Bilgi</h3> + <p><code class="directive">SetHandler</code> yönergesi, + öntanımlı eylemcileri geçersiz kıldığından, index dosyaları ve dizinleri + belirtmek için URL’nin sonuna bölü çizgisi (/) getirmek şeklindeki + normal davranış baskılanır.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>POST girdilerini ve istemci isteklerini işleyecek süzgeçleri +belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>SetInputFilter <code>süzgeç</code>[;<code>süzgeç</code>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">SetInputFilter</code> yönergesi, istemci isteklerini + ve sunucu tarafından alındığı takdirde POST girdisini işleyecek süzgeç + veya süzgeçleri belirler. Bu, diğer <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code> yönergeleri dahil evvelce tanımlanmış + süzgeçlere eklenir.</p> + + <p>Birden fazla süzgeç belirtilmek istenirse birbirlerinden noktalı + virgüllerle ayrılmalı ve çıktıyı işleyecekleri sıraya uygun olarak + sıralanmalıdırlar.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../filter.html">Süzgeçler</a> belgesi</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun yanıtlarını işleyecek süzgeçleri belirler.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>SetOutputFilter <code>süzgeç</code>[;<code>süzgeç</code>...]</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Geçersizleştirme:</a></th><td>FileInfo</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">SetOutputFilter</code> yönergesi, istemciye + gönderilmeden önce sunucunun yanıtlarını işleyecek süzgeçleri belirler. + Bu, diğer <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code> + yönergeleri dahil evvelce tanımlanmış süzgeçlere eklenir.</p> + + <p>Örneğin, aşağıdaki yapılandırma ile <code>/www/data/</code> dizinindeki + bütün dosyalar sunucu taraflı içerik kapsamında ele alınacaktır.</p> + + <pre class="prettyprint lang-config"><Directory "/www/data/"> + SetOutputFilter INCLUDES +</Directory></pre> + + + <p>Birden fazla süzgeç belirtilmek istenirse birbirlerinden noktalı + virgüllerle ayrılmalı ve çıktıyı işleyecekleri sıraya uygun olarak + sıralanmalıdırlar.</p> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../filter.html">Süzgeçler</a> belgesi</li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="StrictHostCheck" id="StrictHostCheck">StrictHostCheck</a> <a name="stricthostcheck" id="stricthostcheck">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun, istenen konak adının, isteği işleyen sanal konakta +listelenmesini gerektirip gerektirmediğini denetler</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>StrictHostCheck ON|OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>StrictHostCheck OFF</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Uyumluluk:</a></th><td>2.4.49'da eklendi.</td></tr> +</table> + <p>Öntanımlı olarak sunucu, beklenmeyen veya yapılandırılmamış konak + adlarına yönelik istekler de dahil olmak üzere her konak adı isteğine + yanıt verir. Bu uygun olsa da, genellikle kendine dönen yanıtlar + üretileceğinden, arkada çalışan bir uygulamanın işlenen konak adlarını + bazı durumlarda sınırlaması istenebilir.</p> + + <p><code class="directive">StrictHostCheck</code> yönergesine <em>ON</em>, + atanarak, gelen bağlantıyla en iyi eşleşen sanal konaktaki + <code class="directive"><a href="#servername">ServerName</a></code> veya + <code class="directive"><a href="#serveralias">ServerAlias</a></code> yönergesinde istenen + konak adı açıkça listelenmemişse, sunucunun HTTP 400 hatası döndürmesi + sağlanabilir.</p> + + <p>Bu yönerge ayrıca, istenen konak adının, ek <code class="directive"><a href="#serveralias">ServerAlias</a></code> girdileri gibi davranan ve nispeten + belirsiz bir yapılandırma mekanizması olan, <code class="directive"><a href="#virtualhost">VirtualHost</a></code> açılış etiketinde belirtilen konak + adlarıyla eşleşmesini de sağlar.</p> + + <p>Bu yönergenin öntanımlı olmayan sanal konaklarda hiçbir etkisi yoktur. + Etkin değeri, genel sunucu yapılandırmasından devralınan değer veya ilgili + bağlantının ip:port'u için öntanımlı olan sanal konak belirler.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir istek için başarısız olmadan önce belirli olayların +gerçekleşmesi için sunucunun geçmesini bekleyeceği süre.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>TimeOut <code>saniye</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>TimeOut 60</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive">TimeOut</code> yönergesi Apache httpd’nin aşağıdaki + durumlarda G/Ç için bekleyeceği süreyi belirler:</p> + + <ul> + <li><p>Veriyi istemciden okurken, okuma tamponu boş olduğu takdirde bir + TCP paketinin gelmesini bekleyeceği süre.</p> + <p>Yeni bir bağlantıda ilk veri için, sunucuya yeni bağlantıyı aktaran + bir <code class="directive"><a href="#acceptfilter">AcceptFilter</a></code> yönergesi ile + ilgili yapılandırma ele alınıncaya kadar bu yönerge etkilenmez.</p> + </li> + + <li>Veriyi istemciye yazarken, gönderme tamponu dolu olduğu takdirde bir + paket alındısı için beklenecek süre.</li> + + <li><code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> ve <code class="module"><a href="../mod/mod_cgid.html">mod_cgid</a></code> modülünde, bir CGI + betiğinden belli bir çıktı kümesi için beklenecek süre.</li> + + <li><code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code> modülünde, bir süzme işleminden çıktı + almak için beklenecek süre.</li> + + <li><code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> modülünde, <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> yönergesi + yapılandırılmamışsa öntanımlı zaman aşımı değeri.</li> + </ul> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td><code>TRACE</code> isteklerinde davranış şeklini belirler +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>TraceEnable <code>[on|off|extended]</code></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>TraceEnable on</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Bu yönerge çekirdek ve vekil (<code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>) sunucuların + her ikisi için öntanımlı <code>TRACE</code> davranışını değiştirir. + Öntanımlı olan <code>TraceEnable on</code> ile RFC 2616’dan kaynaklanan + ve isteğe herhangi bir istek gövdesinin eşlik etmesine izin vermeyen + <code>TRACE</code> isteklerine izin verilir. <code>TraceEnable off</code> + ile çekirdek ve vekil (<code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>) sunucuların her ikisi + de <code>TRACE</code> isteklerine yanıt olarak bir <code>405</code> + (Yönteme izin verilmiyor) hatası döndürür.</p> + + <p><code>TraceEnable extended</code> ile sadece sınama ve tanı koyma + amaçlarına yönelik olarak istek gövdelerine izin verilir. Asıl sunucu + istek gövdesini 64kB ile sınırlar (<code>Transfer-Encoding: chunked</code> + kullanılmışsa bölüm başlıkları için 8kB daha). Asıl sunucu yanıt + gövdesinde tüm başlıkları ve bölüm başlıklarının tamamını yansıtacaktır. + Vekil sunucuda ise istek gövdesi için 64kB’lık sınır yoktur.</p> + + <div class="note"><h3>Bilgi</h3> + <p>Aksine iddialara rağmen, <code>TRACE</code> yöntemini etkinleştirmek + Apache httpd'de bir güvenlik açığı değildir. <code>TRACE</code> yöntemi + HTTP/1.1 belirtiminde tanımlanmış olup desteklenmesi umulmuştur.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir değişkeni tanımsız yapar</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>UnDefine <code>değişken-ismi</code></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><a href="#define">Define</a></code> yönergesinde veya + <code class="program"><a href="../programs/httpd.html">httpd</a></code>'nin <code>-D</code> seçeneğiyle belirtileni + geri alır.</p> + + <p><code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> yönergesinin + sözdizimi ile çatışmalardan kaçınmak için değişken isimleri iki nokta + üst üste ":" karakterlerini içerebilir.</p> + + <div class="note"><h3>Virtual Host scope and pitfalls</h3> + <p>Bu yönerge başlatma betiklerinde <code>-D</code> seçeneğinin + argümanını değiştirmek gerekmeksizin <code class="directive"><a href="#ifdefine"><IfDefine></a></code> bölümlerinin kullanımını + değiştirmek için kullanılabilir.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#define">Define</a></code></li> +<li><code class="directive"><a href="#ifdefine">IfDefine</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun kendi adını ve portunu nasıl belirleyeceğini ayarlar +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>UseCanonicalName Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Apache httpd‘nin çoğu durumda özüne yönelik URL‘ler (isteğin tekrar + aynı sunucuya yapıldığı bir URL türü) oluşturması gerekir. + <code>UseCanonicalName On</code> ile Apache httpd, sunucu için meşru + ismi ve portu oluşturmak için + <code class="directive"><a href="#servername">ServerName</a></code> + yönergesinde belirtilen ismi ve portu kullanır. Bu isim CGI'lerde + <code>SERVER_NAME</code> ve <code>SERVER_PORT</code> değerlerinde ve tüm + özüne yönelik URL’lerde kullanılır.</p> + + <p><code>UseCanonicalName Off</code> ile Apache httpd, özüne yönelik URL’leri + varsa istemci tarafından sağlanan konak ismini ve portu kullanarak + oluşturur; bunlar istemci tarafından sağlanmamışsa yukarıda tanımlanan + işleme başvurulur. Bu değerler, <a href="../vhosts/name-based.html">isme + dayalı sanal konakları</a> gerçekleştirirken kullanılan değerlerle aynı + olup aynı istemcilerle kullanılabilir. <code>SERVER_NAME</code> ve + <code>SERVER_PORT</code> CGI değişkenleri de istemci tarafından sağlanan + isim ve portla oluşturulur.</p> + + <p>Bir örnek olarak, iç ağdaki istemcilerin sunucuya <code>www</code> gibi + bir kısa isim kullanarak bağlandığı durumu ele alırsak daha yararlı + olur. Kullanıcılar bir kısa isim ve bir dizin isminden oluşan ve <em>bir + / ile sonlandırılmamış</em> <code>http://www/splat</code> şeklinde bir + istek yaparlarsa, Apache httpd onları + <code>http://www.example.com/splat/</code> adresine yönlendirecektir. + Eğer kimlik doğrulama da etkinse bu kullanıcının iki defa kimlik + doğrulamasına sokulmasına sebep olacaktır (bir kere <code>www</code> + için bir kere de <code>www.example.com</code> için; daha fazla bilgi için <a href="http://wiki.apache.org/httpd/FAQ#Why_does_Apache_ask_for_my_password_twice_before_serving_a_file.3F">SSS</a>’ye bakınız). Fakat <code class="directive">UseCanonicalName Off</code> + olsaydı Apache httpd isteği <code>http://www/splat/</code> adresine + yönlendirecekti.</p> + + <p><code>UseCanonicalName DNS</code> diye üçüncü bir seçenek daha vardır ve + istek yaparken <code>Host:</code> başlığını kullanmayan eski istemcileri + desteklemek amacıyla IP’ye dayalı sanal konaklarla kullanmak için + tasarlanmıştır. Bu seçenek etkin olduğunda Apache httpd, istemciyi özüne + yönelik URL’lerle doğru yere bağlamak için sunucu IP adresi üzerinde bir + ters DNS sorgusu yapar.</p> + + <div class="warning"><h3>Uyarı</h3> + <p>Eğer CGI’ler <code>SERVER_NAME</code> değerleri için önkabuller + yapıyorlarsa bu seçenek işlerinin bozulmasına yol açabilir. Aslında + istemciler konak ismi olarak istedikleri değeri vermekte özgürdürler. + Fakat eğer CGI, özüne yönelik URL’leri oluştururken sadece + <code>SERVER_NAME</code> değerini kullanıyorsa bu istendiği gibi + çalışacaktır.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sunucunun kendi adını ve portunu nasıl belirleyeceğini ayarlar +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak, dizin</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p>Apache httpd‘nin çoğu durumda özüne yönelik URL‘ler (isteğin tekrar + aynı sunucuya yapıldığı bir URL türü) oluşturması gerekir. Apache httpd + <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> yönergesine bağlı + olarak sunucu için meşru portu oluştururken + <code>UseCanonicalPhysicalPort On</code> ile olası port olarak istek + tarafından kullanılmakta olan fiziksel portu kullanacaktır. + <code>UseCanonicalPhysicalPort Off</code> olduğunda ise geçerli bir port + numarası oluşturmak için asıl fiziksel port yerine yapılandırma bilgisi + kullanılır.</p> + + <div class="note"><h3>Ek Bilgi</h3> + <p>Fiziksel port kullanımı etkin olduğunda işlemler şu sırayla + yürütülür:</p> + <dl> + <dt><code>UseCanonicalName On</code></dt> + <dd> + <ol> + <li><code class="directive"><a href="#servername">Servername</a></code> ile sağlanan port + </li> + <li>Fiziksel port</li> + <li>Öntanımlı port</li> + </ol> + </dd> + <dt><code>UseCanonicalName Off | DNS</code></dt> + <dd> + <ol> + <li><code>Host:</code> başlığından çözümlenen port</li> + <li>Fiziksel port</li> + <li><code class="directive"><a href="#servername">Servername</a></code> yönergesinde + belirtilen port</li> + <li>Öntanımlı port</li> + </ol> + </dd> + </dl> + + <p><code>UseCanonicalPhysicalPort Off</code> olduğunda işlem sırasında + fiziksel port adımları atlanır.</p> + </div> + + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li> +<li><code class="directive"><a href="#servername">ServerName</a></code></li> +<li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a> <a name="virtualhost" id="virtualhost">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Sadece belli bir konak ismine ve porta uygulanacak yönergeleri barındırır.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code><VirtualHost + <code>adres</code>[:<code>port</code>] [<code>adres</code>[:<code>port</code>]] + ...> ... </VirtualHost></code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Çekirdek</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>core</td></tr> +</table> + <p><code class="directive"><VirtualHost></code> ve + <code></VirtualHost></code> birlikte sadece belli bir sanal konağa + uygulanacak yönergeleri sarmalamakta kullanılırlar. Bir sanal konak + kapsamında belirtilebilecek her yönerge kullanılabilir. Sunucu belli bir + sanal konak üzerindeki bir belge için bir istek aldığında <code class="directive"><VirtualHost></code> bölümünde bulunan yapılandırma + yönergelerini kullanır. <code>adres</code> şunlardan biri olabilir, + istemlik olarak ikinokta imi ve bir port numarası (veya *) + eklenebilir:</p> + + <ul> + <li>Sanal konağın IP adresi.</li> + + <li>Sanal konağın IP adresi için tam nitelenmiş alan adı (önerilmez). + </li> + + <li>Tüm IP adresleri ile eşleşmek üzere <code>*</code> karakteri.</li> + + <li><code>*</code> için bir takma ad olarak <code>_default_</code> + dizgesi.</li> + </ul> + + <pre class="prettyprint lang-config"><VirtualHost 10.1.2.3:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost></pre> + + + + <p>İsteğe bağlı port numarasını belirtmeyi mümkün kılmak için IPv6 + adresleri köşeli ayraç içine alınır. IPv6 adresi kullanılan bir + örnek:</p> + + <pre class="prettyprint lang-config"><VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost></pre> + + + <p>Her sanal konağın ya farklı bir IP adresi ve port ile ya da farklı bir + konak ismiyle eşleşmesi gerekir. Birinci durumda sunucu makinesinin çok + sayıda adresten IP paketleri kabul edecek şekilde yapılandırılması + gerekir. (Eğer makinede çok sayıda ağ arabirimi yoksa bu, işletim sistemi + desteklediği takdirde <code>ifconfig alias</code> komutuyla + sağlanabilir.)</p> + + <div class="note"><h3>Ek Bilgi</h3> + <p><code class="directive"><VirtualHost></code> kullanımı Apache + httpd’nin dinleyeceği adresler üzerinde belirleyici değildir. Apache + httpd’nin doğru adresi dinlediğinden emin olmak için <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> kullanmanız gerekebilir.</p> + </div> + + <p>Her <code class="directive"><VirtualHost></code> bloku içinde bir + <code class="directive"><a href="#servername">ServerName</a></code> yönergesi mutlaka + olmalıdır. Yokluğu halinde "ana" sunucu yapılandırmasındaki <code class="directive"><a href="#servername">ServerName</a></code> miras alınacaktır.</p> + + <p>Bir istek alındığında, sunucu isteği, sadece yerel IP adresi ve port + çiftine dayalı en iyi eşleşen ilk <code class="directive"><VirtualHost></code> bölümüne eşler. Joker kullanmayanlar daha + yüksek önceliğe sahiptir. IP ve port çiftine dayalı bir eşleşme + bulunamazsa istek için ana sunucu yapılandırması kullanılır.</p> + + <p>En iyi eşleşen IP adresi ve port çiftini birden fazla sanal konak + kullanıyorsa sunucu bu sanal konaklar (liste) arasından istenen konak + ismiyle en iyi eşleşeni seçer. Eşleşen hiçbir isme dayalı sanal konak + yoksa listedeki IP adresi ile eşleşen ilk sanal konak kullanılır. Bunun + sonucu olarak, belirtilen IP adresi ve port çifti için listedeki ilk + sanal konak, bu IP adresi ve port çifti için öntanımlı sanal + konaktır.</p> + + <div class="warning"><h3>Güvenlik</h3> + <p>Günlük dosyalarının sunucuyu çalıştıran kullanıcıdan başka herkes + tarafından yazılabilen bir yerde saklanmasından dolayı ortaya çıkabilecek + güvenlik sorunları hakkında daha ayrıntılı bilgi için <a href="../misc/security_tips.html">güvenlik ipuçları</a> belgesine + bakınız.</p> + </div> + +<h3>Ayrıca bakınız:</h3> +<ul> +<li><a href="../vhosts/">Apache HTTP Sunucusu Sanal Konak Belgeleri</a> +</li> +<li><a href="../dns-caveats.html">DNS ile İlgili Konular ve Apache HTTP + Sunucusu</a></li> +<li><a href="../bind.html">Apache HTTP Sunucusunun belli adresleri ve + portları dinlemek üzere yapılandırılması</a></li> +<li>Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <a href="../sections.html"> + <Directory>, <Location> ve <Files> bölümleri nasıl + çalışır?</a> belgesine bakınız.</li> +</ul> +</div> +</div> +<div class="bottomlang"> +<p><span>Mevcut Diller: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../tr/mod/core.html" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorumlar</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/core.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p> +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file |