]> granicus.if.org Git - apache/blob - docs/manual/mod/core.html.es
mod_reqtimeout: Change the default to set some reasonable timeout values if loaded
[apache] / docs / manual / mod / core.html.es
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>core - Servidor HTTP Apache</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Módulos</a> | <a href="../mod/directives.html">Directivas</a> | <a href="../faq/">Preguntas Frecuentes</a> | <a href="../glossary.html">Glosario</a> | <a href="../sitemap.html">Mapa de este sitio web</a></p>
16 <p class="apache">Versión 2.3 del Servidor HTTP Apache</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Servidor HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentación</a> &gt; <a href="../">Versión 2.3</a> &gt; <a href="./">Módulos</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Funcionalidad Básica de Apache</h1>
23 <div class="toplang">
24 <p><span>Idiomas disponibles: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
25 <a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
26 <a href="../es/mod/core.html" title="Español">&nbsp;es&nbsp;</a> |
27 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
28 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
29 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
30 </div>
31 <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>
32 <tr><th><a href="module-dict.html#Status">Estado:</a></th><td>Core</td></tr></table>
33 </div>
34 <div id="quickview"><h3 class="directives">Directivas</h3>
35 <ul id="toc">
36 <li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
37 <li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
38 <li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
39 <li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
40 <li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
41 <li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
42 <li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li>
43 <li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#directory">&lt;Directory&gt;</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#directorymatch">&lt;DirectoryMatch&gt;</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#else">&lt;Else&gt;</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#elseif">&lt;ElseIf&gt;</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#files">&lt;Files&gt;</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#filesmatch">&lt;FilesMatch&gt;</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
65 <li><img alt="" src="../images/down.gif" /> <a href="#if">&lt;If&gt;</a></li>
66 <li><img alt="" src="../images/down.gif" /> <a href="#ifdefine">&lt;IfDefine&gt;</a></li>
67 <li><img alt="" src="../images/down.gif" /> <a href="#ifmodule">&lt;IfModule&gt;</a></li>
68 <li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li>
69 <li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#limit">&lt;Limit&gt;</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#limitexcept">&lt;LimitExcept&gt;</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#location">&lt;Location&gt;</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#locationmatch">&lt;LocationMatch&gt;</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
83 <li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li>
84 <li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li>
85 <li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
88 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li>
90 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
91 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
92 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
93 <li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
94 <li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li>
95 <li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
96 <li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
97 <li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li>
98 <li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
99 <li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
100 <li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
101 <li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
102 <li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
103 <li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
104 <li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
105 <li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li>
106 <li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
107 <li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li>
108 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
109 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
110 <li><img alt="" src="../images/down.gif" /> <a href="#virtualhost">&lt;VirtualHost&gt;</a></li>
111 </ul>
112 </div>
113
114 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
115 <div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directiva</a></h2>
116 <table class="directive">
117 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configura mejoras para un Protocolo de Escucha de Sockets</td></tr>
118 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr>
119 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
120 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
121 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
122 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Disponible en Apache httpd 2.1.5 y posteriores.
123 En Windows desde Apache httpd 2.3.3 y posteriores.</td></tr>
124 </table>
125     <p>Esta directiva hace posible mejoras específicas a nivel de sistema operativo
126        y a través del tipo de Protocolo para un socket que escucha.
127        La premisa básica es que el kernel no envíe un socket al servidor
128        hasta que o bien los datos se hayan recibido o bien se haya almacenado
129        en el buffer una Respuesta HTTP completa.  
130        Actualmente sólo están soportados
131        <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
132        Accept Filters</a> sobre FreeBSD, <code>TCP_DEFER_ACCEPT</code> sobre Linux, 
133        y AcceptEx() sobre Windows.</p>
134
135     <p>El uso de <code>none</code> para un argumento desactiva cualquier filtro 
136        aceptado para ese protocolo. Esto es útil para protocolos que requieren que un
137        servidor envíe datos primeros, tales como <code>ftp:</code> o <code>nntp</code>:</p>
138     <div class="example"><p><code>AcceptFilter nntp none</code></p></div>
139
140     <p>Los nombres de protocolo por defecto son <code>https</code> para el puerto 443
141        y <code>http</code> para todos los demás puertos. Para especificar que se está
142        utilizando otro protocolo con un puerto escuchando, añade el argumento <var>protocol</var>
143        a la directiva <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p>
144
145     <p>Sobre FreeBDS los valores por defecto:</p>
146     <div class="example"><p><code>
147         AcceptFilter http httpready <br />
148         AcceptFilter https dataready
149     </code></p></div>
150     
151     <p>El filtro <code>httpready</code> almacena en el buffer peticiones HTTP completas
152        a nivel de kernel.  Una vez que la petición es recibida, el kernel la envía al servidor. 
153        Consulta la página man de
154        <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
155        accf_http(9)</a> para más detalles.  Puesto que las peticiones HTTPS
156        están encriptadas, sólo se utiliza el filtro
157        <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">accf_data(9)</a>.</p>
158
159     <p>Sobre Linux los valores por defecto son:</p>
160     <div class="example"><p><code>
161         AcceptFilter http data <br />
162         AcceptFilter https data
163     </code></p></div>
164
165     <p>En Linux, <code>TCP_DEFER_ACCEPT</code> no soporta el buffering en peticiones http.
166        Cualquier valor además de <code>none</code> habilitará 
167        <code>TCP_DEFER_ACCEPT</code> en ese socket. Para más detalles 
168        ver la página man de Linux 
169        <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
170        tcp(7)</a>.</p>
171
172     <p>Sobre Windows los valores por defecto son:</p>
173     <div class="example"><p><code>
174         AcceptFilter http data <br />
175         AcceptFilter https data
176     </code></p></div>
177
178     <p>Sobre Windows mpm_winnt interpreta el argumento AcceptFilter para conmutar la API
179        AcceptEx(), y no soporta el buffering sobre el protocolo http.  Hay dos valores
180        que utilizan la API Windows AcceptEx() y que recuperan sockets de red
181        entre conexciones.  <code>data</code> espera hasta que los datos han sido
182        transmitidos como se comentaba anteriormente, y el buffer inicial de datos y las
183        direcciones de red son recuperadas a partir de una única llamada AcceptEx().
184        <code>connect</code> utiliza la API AcceptEx() API, y recupera también
185        las direccciones de red, pero a diferencia de <code>none</code> 
186        la opción <code>connect</code> no espera a la transmisión inicial de los datos.</p>
187
188     <p>Sobre Windows, <code>none</code> prefiere accept() antes que AcceptEx()
189        y no recuperará sockets entre las conexiones.  Lo que es útil para los adaptadores de
190        red con un soporte precario de drivers, así como para algunos proveedores de red
191        tales como drivers vpn, o filtros de spam, de virus o de spyware.</p>  
192
193
194 <h3>Consulte también</h3>
195 <ul>
196 <li><code class="directive">Protocol</code></li>
197 </ul>
198 </div>
199 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
200 <div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directiva</a></h2>
201 <table class="directive">
202 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Los recursos aceptan información sobre su ruta</td></tr>
203 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
204 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
205 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
206 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
207 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
208 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
209 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Disponible en Apache httpd 2.0.30 y posteriores</td></tr>
210 </table>
211
212     <p>Esta directiva controla si las peticiones que contienen información sobre la ruta
213     que sigue un fichero que existe (o un fichero que no existe pero en un directorio que
214     sí existe) serán aceptadas o denegadas.  La información de ruta puede estar disponible
215     para los scripts en la variable de entorno <code>PATH_INFO</code>.</p>
216
217     <p>Por ejemplo, asumamos que la ubicación <code>/test/</code> apunta a
218     un directorio que contiene únicamente el fichero
219     <code>here.html</code>.  Entonces, las peticiones tanto para
220     <code>/test/here.html/more</code> como para
221     <code>/test/nothere.html/more</code> recogen
222     <code>/more</code> como <code>PATH_INFO</code>.</p>
223
224     <p>Los tres posibles argumentos para la directiva
225     <code class="directive">AcceptPathInfo</code> son los siguientes:</p>
226     <dl>
227     <dt><code>Off</code></dt><dd>Una petición sólo será aceptada si
228     se corresponde con una ruta literal que existe.  Por lo tanto, una petición
229     con una información de ruta después del nombre de fichero tal como
230     <code>/test/here.html/more</code> en el ejemplo anterior devolverá
231     un error 404 NOT FOUND.</dd>
232
233     <dt><code>On</code></dt><dd>Una petición será aceptada si una
234     ruta principal de acceso se corresponde con un fichero que existe. El ejemplo
235     anterior <code>/test/here.html/more</code> será aceptado si
236     <code>/test/here.html</code> corresponde a un fichero válido.</dd>
237
238     <dt><code>Default</code></dt><dd>La gestión de las peticiones
239     con información de ruta está determinada por el <a href="../handler.html">controlador</a> responsable de la petición.
240     El controlador principal para para ficheros normales rechaza por defecto
241     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
242     <code>PATH_INFO</code> por defecto.</dd>
243     </dl>
244
245     <p>El objetivo principal de la directiva <code>AcceptPathInfo</code>
246     es permitirte sobreescribir la opción del controlador
247     de aceptar or rechazar <code>PATH_INFO</code>. Este tipo de sobreescritura se necesita,
248     por ejemplo, cuando utilizas un <a href="../filter.html">filtro</a>, tal como
249     <a href="mod_include.html">INCLUDES</a>, para generar contenido
250     basado en <code>PATH_INFO</code>. El controlador principal normalmente rechazaría
251     la petición, de modo que puedes utilizar la siguiente configuración para habilitarla
252     como script:</p>
253
254     <div class="example"><p><code>
255       &lt;Files "mypaths.shtml"&gt;<br />
256       <span class="indent">
257         Options +Includes<br />
258         SetOutputFilter INCLUDES<br />
259         AcceptPathInfo On<br />
260       </span>
261       &lt;/Files&gt;
262     </code></p></div>
263
264
265 </div>
266 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
267 <div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directiva</a></h2>
268 <table class="directive">
269 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Nombre del fichero distribuido de configuración</td></tr>
270 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
271 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
272 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
273 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
274 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
275 </table>
276     <p>Mientras que procesa una petición el servidor busca
277     el primer fichero de configuración existente dentro de un listado de nombres en
278     cada directorio de la ruta del documento, si los ficheros distribuidos
279     de configuración están <a href="#allowoverride">habilitados para ese
280     directorio</a>. Por ejemplo:</p>
281
282     <div class="example"><p><code>
283       AccessFileName .acl
284     </code></p></div>
285
286     <p>antes de servir el documento
287     <code>/usr/local/web/index.html</code>, el servidor leerá
288     <code>/.acl</code>, <code>/usr/.acl</code>,
289     <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
290     para las directivas, salvo que estén deshabilitadas with</p>
291
292     <div class="example"><p><code>
293       &lt;Directory /&gt;<br />
294       <span class="indent">
295         AllowOverride None<br />
296       </span>
297       &lt;/Directory&gt;
298     </code></p></div>
299
300 <h3>Consulte también</h3>
301 <ul>
302 <li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
303 <li><a href="../configuring.html">Configuration Files</a></li>
304 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
305 </ul>
306 </div>
307 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
308 <div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directiva</a></h2>
309 <table class="directive">
310 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Default charset parameter to be added when a response
311 content-type is <code>text/plain</code> or <code>text/html</code></td></tr>
312 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
313 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
314 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
315 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
316 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
317 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
318 </table>
319     <p>This directive specifies a default value for the media type
320     charset parameter (the name of a character encoding) to be added
321     to a response if and only if the response's content-type is either
322     <code>text/plain</code> or <code>text/html</code>.  This should override
323     any charset specified in the body of the response via a <code>META</code>
324     element, though the exact behavior is often dependent on the user's client
325     configuration. A setting of <code>AddDefaultCharset Off</code>
326     disables this functionality. <code>AddDefaultCharset On</code> enables
327     a default charset of <code>iso-8859-1</code>. Any other value is assumed
328     to be the <var>charset</var> to be used, which should be one of the
329     <a href="http://www.iana.org/assignments/character-sets">IANA registered
330     charset values</a> for use in Internet media types (MIME types).
331     For example:</p>
332
333     <div class="example"><p><code>
334       AddDefaultCharset utf-8
335     </code></p></div>
336
337     <p><code class="directive">AddDefaultCharset</code> should only be used when all
338     of the text resources to which it applies are known to be in that
339     character encoding and it is too inconvenient to label their charset
340     individually. One such example is to add the charset parameter
341     to resources containing generated content, such as legacy CGI
342     scripts, that might be vulnerable to cross-site scripting attacks
343     due to user-provided data being included in the output.  Note, however,
344     that a better solution is to just fix (or delete) those scripts, since
345     setting a default charset does not protect users that have enabled
346     the "auto-detect character encoding" feature on their browser.</p>
347
348 <h3>Consulte también</h3>
349 <ul>
350 <li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li>
351 </ul>
352 </div>
353 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
354 <div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directiva</a></h2>
355 <table class="directive">
356 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determines whether encoded path separators in URLs are allowed to
357 be passed through</td></tr>
358 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
359 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
360 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
361 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
362 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
363 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.0.46 and later</td></tr>
364 </table>
365     <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
366     which contain encoded path separators (<code>%2F</code> for <code>/</code>
367     and additionally <code>%5C</code> for <code>\</code> on according systems)
368     to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
369
370     <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
371     mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
372
373     <div class="note"><h3>Note</h3>
374       <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
375       Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
376       according systems) will be left as such in the otherwise decoded URL
377       string.</p>
378     </div>
379
380 <h3>Consulte también</h3>
381 <ul>
382 <li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
383 </ul>
384 </div>
385 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
386 <div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directiva</a></h2>
387 <table class="directive">
388 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Types of directives that are allowed in
389 <code>.htaccess</code> files</td></tr>
390 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
391 [<var>directive-type</var>] ...</code></td></tr>
392 <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>
393 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory</td></tr>
394 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
395 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
396 </table>
397     <p>When the server finds an <code>.htaccess</code> file (as
398     specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
399     it needs to know which directives declared in that file can override
400     earlier configuration directives.</p>
401
402     <div class="note"><h3>Only available in &lt;Directory&gt; sections</h3>
403     <code class="directive">AllowOverride</code> is valid only in
404     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
405     sections specified without regular expressions, not in <code class="directive"><a href="#location">&lt;Location&gt;</a></code>, <code class="directive"><a href="#directorymatch">&lt;DirectoryMatch&gt;</a></code> or
406     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.
407     </div>
408
409     <p>When this directive is set to <code>None</code>, then
410     <a href="#accessfilename">.htaccess</a> files are completely ignored.
411     In this case, the server will not even attempt to read
412     <code>.htaccess</code> files in the filesystem.</p>
413
414     <p>When this directive is set to <code>All</code>, then any
415     directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
416     <code>.htaccess</code> files.</p>
417
418     <p>The <var>directive-type</var> can be one of the following
419     groupings of directives.</p>
420
421     <dl>
422       <dt>AuthConfig</dt>
423
424       <dd>
425
426       Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
427       <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
428       <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
429       <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>,
430       <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>
431
432       <dt>FileInfo</dt>
433
434       <dd>
435       Allow use of the directives controlling document types
436      (<code class="directive"><a href="#errordocument">ErrorDocument</a></code>,
437       <code class="directive"><a href="#forcetype">ForceType</a></code>,
438       <code class="directive"><a href="../mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
439       <code class="directive"><a href="#sethandler">SetHandler</a></code>,
440       <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>,
441       <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
442       <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives),
443       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>),
444       <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
445       <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> from
446       <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>.
447       </dd>
448
449       <dt>Indexes</dt>
450
451       <dd>
452       Allow use of the directives controlling directory indexing
453       (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
454       <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>,
455       <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
456       <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>,
457       <em>etc.</em>).</dd>
458
459       <dt>Limit</dt>
460
461       <dd>
462       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>
463
464       <dt>Options[=<var>Option</var>,...]</dt>
465
466       <dd>
467       Allow use of the directives controlling specific directory
468       features (<code class="directive"><a href="#options">Options</a></code> and
469       <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>).
470       An equal sign may be given followed by a comma (but no spaces)
471       separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.</dd>
472     </dl>
473
474     <p>Example:</p>
475
476     <div class="example"><p><code>
477       AllowOverride AuthConfig Indexes
478     </code></p></div>
479
480     <p>In the example above all directives that are neither in the group
481     <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
482     server error.</p>
483
484     <div class="note"><p>For security and performance reasons, do not set
485     <code>AllowOverride</code> to anything other than <code>None</code> 
486     in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
487     create) the <code>&lt;Directory&gt;</code> block that refers to the
488     directory where you're actually planning to place a
489     <code>.htaccess</code> file.</p>
490     </div>
491
492 <h3>Consulte también</h3>
493 <ul>
494 <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
495 <li><a href="../configuring.html">Configuration Files</a></li>
496 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
497 </ul>
498 </div>
499 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
500 <div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">Directiva</a></h2>
501 <table class="directive">
502 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Individual directives that are allowed in
503 <code>.htaccess</code> files</td></tr>
504 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowOverrideList None|<var>directive</var>
505 [<var>directive-type</var>] ...</code></td></tr>
506 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AllowOverrideList None</code></td></tr>
507 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory</td></tr>
508 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
509 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
510 </table><p>The documentation for this directive has
511             not been translated yet. Please have a look at the English
512             version.</p><h3>Consulte también</h3>
513 <ul>
514 <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
515 <li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
516 <li><a href="../configuring.html">Configuration Files</a></li>
517 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
518 </ul>
519 </div>
520 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
521 <div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directiva</a></h2>
522 <table class="directive">
523 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Technique for locating the interpreter for CGI
524 scripts</td></tr>
525 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
526 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
527 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
528 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
529 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
530 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>NetWare only</td></tr>
531 </table>
532     <p>This directive is used to control how Apache httpd finds the
533     interpreter used to run CGI scripts. For example, setting
534     <code>CGIMapExtension sys:\foo.nlm .foo</code> will
535     cause all CGI script files with a <code>.foo</code> extension to
536     be passed to the FOO interpreter.</p>
537
538 </div>
539 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
540 <div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directiva</a></h2>
541 <table class="directive">
542 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response
543 headers</td></tr>
544 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ContentDigest On|Off</code></td></tr>
545 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ContentDigest Off</code></td></tr>
546 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
547 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>Options</td></tr>
548 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
549 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
550 </table>
551     <p>This directive enables the generation of
552     <code>Content-MD5</code> headers as defined in RFC1864
553     respectively RFC2616.</p>
554
555     <p>MD5 is an algorithm for computing a "message digest"
556     (sometimes called "fingerprint") of arbitrary-length data, with
557     a high degree of confidence that any alterations in the data
558     will be reflected in alterations in the message digest.</p>
559
560     <p>The <code>Content-MD5</code> header provides an end-to-end
561     message integrity check (MIC) of the entity-body. A proxy or
562     client may check this header for detecting accidental
563     modification of the entity-body in transit. Example header:</p>
564
565     <div class="example"><p><code>
566       Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
567     </code></p></div>
568
569     <p>Note that this can cause performance problems on your server
570     since the message digest is computed on every request (the
571     values are not cached).</p>
572
573     <p><code>Content-MD5</code> is only sent for documents served
574     by the <code class="module"><a href="../mod/core.html">core</a></code>, and not by any module. For example,
575     SSI documents, output from CGI scripts, and byte range responses
576     do not have this header.</p>
577
578 </div>
579 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
580 <div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directiva</a></h2>
581 <table class="directive">
582 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>This directive has no effect other than to emit warnings
583 if the value is not <code>none</code>. In prior versions, DefaultType
584 would specify a default media type to assign to response content for
585 which no other media type configuration could be found.
586 </td></tr>
587 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr>
588 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>DefaultType none</code></td></tr>
589 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
590 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
591 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
592 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
593 <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>
594 </table>
595     <p>This directive has been disabled.  For backwards compatibility
596     of configuration files, it may be specified with the value
597     <code>none</code>, meaning no default media type. For example:</p>
598
599     <div class="example"><p><code>
600       DefaultType None
601     </code></p></div>
602
603     <p><code>DefaultType None</code> is only available in
604     httpd-2.2.7 and later.</p>
605
606     <p>Use the mime.types configuration file and the
607     <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> to configure media
608     type assignments via file extensions, or the
609     <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure
610     the media type for specific resources. Otherwise, the server will
611     send the response without a Content-Type header field and the
612     recipient may attempt to guess the media type.</p>
613
614 </div>
615 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
616 <div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directiva</a></h2>
617 <table class="directive">
618 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Define the existence of a variable</td></tr>
619 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Define <var>parameter-name</var></code></td></tr>
620 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
621 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
622 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
623 </table>
624     <p>Equivalent to passing the <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p>
625     <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine">&lt;IfDefine&gt;</a></code> sections without needing to alter
626     <code>-D</code> arguments in any startup scripts.</p>
627
628 </div>
629 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
630 <div class="directive-section"><h2><a name="Directory" id="Directory">&lt;Directory&gt;</a> <a name="directory" id="directory">Directiva</a></h2>
631 <table class="directive">
632 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enclose a group of directives that apply only to the
633 named file-system directory, sub-directories, and their contents.</td></tr>
634 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;Directory <var>directory-path</var>&gt;
635 ... &lt;/Directory&gt;</code></td></tr>
636 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
637 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
638 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
639 </table>
640     <p><code class="directive">&lt;Directory&gt;</code> and
641     <code>&lt;/Directory&gt;</code> are used to enclose a group of
642     directives that will apply only to the named directory,
643     sub-directories of that directory, and the files within the respective 
644     directories.  Any directive that is allowed
645     in a directory context may be used. <var>Directory-path</var> is
646     either the full path to a directory, or a wild-card string using
647     Unix shell-style matching. In a wild-card string, <code>?</code> matches
648     any single character, and <code>*</code> matches any sequences of
649     characters. You may also use <code>[]</code> character ranges. None
650     of the wildcards match a `/' character, so <code>&lt;Directory
651     /*/public_html&gt;</code> will not match
652     <code>/home/user/public_html</code>, but <code>&lt;Directory
653     /home/*/public_html&gt;</code> will match. Example:</p>
654
655     <div class="example"><p><code>
656       &lt;Directory /usr/local/httpd/htdocs&gt;<br />
657       <span class="indent">
658         Options Indexes FollowSymLinks<br />
659       </span>
660       &lt;/Directory&gt;
661     </code></p></div>
662
663     <div class="note">
664       <p>Be careful with the <var>directory-path</var> arguments:
665       They have to literally match the filesystem path which Apache httpd uses
666       to access the files. Directives applied to a particular
667       <code>&lt;Directory&gt;</code> will not apply to files accessed from
668       that same directory via a different path, such as via different symbolic
669       links.</p>
670     </div>
671
672     <p><a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular
673     expressions</a> can also be used, with the addition of the
674     <code>~</code> character. For example:</p>
675
676     <div class="example"><p><code>
677       &lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
678     </code></p></div>
679
680     <p>would match directories in <code>/www/</code> that consisted of
681     three numbers.</p>
682
683     <p>If multiple (non-regular expression) <code class="directive">&lt;Directory&gt;</code> sections
684     match the directory (or one of its parents) containing a document,
685     then the directives are applied in the order of shortest match
686     first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
687     with</p>
688
689     <div class="example"><p><code>
690       &lt;Directory /&gt;<br />
691       <span class="indent">
692         AllowOverride None<br />
693       </span>
694       &lt;/Directory&gt;<br />
695       <br />
696       &lt;Directory /home/&gt;<br />
697       <span class="indent">
698         AllowOverride FileInfo<br />
699       </span>
700       &lt;/Directory&gt;
701     </code></p></div>
702
703     <p>for access to the document <code>/home/web/dir/doc.html</code>
704     the steps are:</p>
705
706     <ul>
707       <li>Apply directive <code>AllowOverride None</code>
708       (disabling <code>.htaccess</code> files).</li>
709
710       <li>Apply directive <code>AllowOverride FileInfo</code> (for
711       directory <code>/home</code>).</li>
712
713       <li>Apply any <code>FileInfo</code> directives in
714       <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
715       <code>/home/web/dir/.htaccess</code> in that order.</li>
716     </ul>
717
718     <p>Regular expressions are not considered until after all of the
719     normal sections have been applied. Then all of the regular
720     expressions are tested in the order they appeared in the
721     configuration file. For example, with</p>
722
723     <div class="example"><p><code>
724       &lt;Directory ~ abc$&gt;<br />
725       <span class="indent">
726         # ... directives here ...<br />
727       </span>
728       &lt;/Directory&gt;
729     </code></p></div>
730
731     <p>the regular expression section won't be considered until after
732     all normal <code class="directive">&lt;Directory&gt;</code>s and
733     <code>.htaccess</code> files have been applied. Then the regular
734     expression will match on <code>/home/abc/public_html/abc</code> and
735     the corresponding <code class="directive">&lt;Directory&gt;</code> will
736     be applied.</p>
737
738    <p><strong>Note that the default access for
739     <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
740     This means that Apache httpd will serve any file mapped from an URL. It is
741     recommended that you change this with a block such
742     as</strong></p>
743
744     <div class="example"><p><code>
745       &lt;Directory /&gt;<br />
746       <span class="indent">
747         Order Deny,Allow<br />
748         Deny from All<br />
749       </span>
750       &lt;/Directory&gt;
751     </code></p></div>
752
753     <p><strong>and then override this for directories you
754     <em>want</em> accessible. See the <a href="../misc/security_tips.html">Security Tips</a> page for more
755     details.</strong></p>
756
757     <p>The directory sections occur in the <code>httpd.conf</code> file.
758     <code class="directive">&lt;Directory&gt;</code> directives
759     cannot nest, and cannot appear in a <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> or <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section.</p>
760
761 <h3>Consulte también</h3>
762 <ul>
763 <li><a href="../sections.html">How &lt;Directory&gt;,
764     &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
765     explanation of how these different sections are combined when a
766     request is received</li>
767 </ul>
768 </div>
769 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
770 <div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch">&lt;DirectoryMatch&gt;</a> <a name="directorymatch" id="directorymatch">Directiva</a></h2>
771 <table class="directive">
772 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enclose directives that apply to
773 the contents of file-system directories matching a regular expression.</td></tr>
774 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;DirectoryMatch <var>regex</var>&gt;
775 ... &lt;/DirectoryMatch&gt;</code></td></tr>
776 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
777 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
778 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
779 </table>
780     <p><code class="directive">&lt;DirectoryMatch&gt;</code> and
781     <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
782     of directives which will apply only to the named directory (and the files within), 
783     the same as <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>. 
784     However, it takes as an argument a 
785     <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular expression</a>.  For example:</p>
786
787     <div class="example"><p><code>
788       &lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
789     </code></p></div>
790
791     <p>would match directories in <code>/www/</code> that consisted of three
792     numbers.</p>
793
794    <div class="note"><h3>Compatability</h3>
795       Prior to 2.3.9, this directive implicitly applied to sub-directories
796       (like <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>) and
797       could not match the end of line symbol ($).  In 2.3.9 and later,
798       only directories that match the expression are affected by the enclosed
799       directives.
800     </div>
801
802     <div class="note"><h3>Trailing Slash</h3>
803       This directive applies to requests for directories that may or may 
804       not end in a trailing slash, so expressions that are anchored to the 
805       end of line ($) must be written with care.
806     </div>
807
808 <h3>Consulte también</h3>
809 <ul>
810 <li><code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> for
811 a description of how regular expressions are mixed in with normal
812 <code class="directive">&lt;Directory&gt;</code>s</li>
813 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
814 &lt;Files&gt; sections work</a> for an explanation of how these different
815 sections are combined when a request is received</li>
816 </ul>
817 </div>
818 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
819 <div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directiva</a></h2>
820 <table class="directive">
821 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Directory that forms the main document tree visible
822 from the web</td></tr>
823 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
824 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
825 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
826 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
827 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
828 </table>
829     <p>This directive sets the directory from which <code class="program"><a href="../programs/httpd.html">httpd</a></code>
830     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
831     path from the requested URL to the document root to make the
832     path to the document. Example:</p>
833
834     <div class="example"><p><code>
835       DocumentRoot /usr/web
836     </code></p></div>
837
838     <p>then an access to
839     <code>http://www.my.host.com/index.html</code> refers to
840     <code>/usr/web/index.html</code>. If the <var>directory-path</var> is 
841     not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
842
843     <p>The <code class="directive">DocumentRoot</code> should be specified without
844     a trailing slash.</p>
845
846 <h3>Consulte también</h3>
847 <ul>
848 <li><a href="../urlmapping.html#documentroot">Mapping URLs to Filesystem
849 Locations</a></li>
850 </ul>
851 </div>
852 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
853 <div class="directive-section"><h2><a name="Else" id="Else">&lt;Else&gt;</a> <a name="else" id="else">Directiva</a></h2>
854 <table class="directive">
855 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if the condition of a
856 previous <code class="directive"><a href="#if">&lt;If&gt;</a></code> or
857 <code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code> section is not
858 satisfied by a request at runtime</td></tr>
859 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;Else&gt; ... &lt;/Else&gt;</code></td></tr>
860 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
861 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
862 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
863 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
864 </table><p>The documentation for this directive has
865             not been translated yet. Please have a look at the English
866             version.</p><h3>Consulte también</h3>
867 <ul>
868 <li><code class="directive"><a href="#if">&lt;If&gt;</a></code></li>
869 <li><code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code></li>
870 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
871     &lt;Files&gt; sections work</a> for an explanation of how these
872     different sections are combined when a request is received.
873     <code class="directive">&lt;If&gt;</code>,
874     <code class="directive">&lt;ElseIf&gt;</code>, and
875     <code class="directive">&lt;Else&gt;</code> are applied last.</li>
876 </ul>
877 </div>
878 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
879 <div class="directive-section"><h2><a name="ElseIf" id="ElseIf">&lt;ElseIf&gt;</a> <a name="elseif" id="elseif">Directiva</a></h2>
880 <table class="directive">
881 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if a condition is satisfied
882 by a request at runtime while the condition of a previous
883 <code class="directive"><a href="#if">&lt;If&gt;</a></code> or
884 <code class="directive">&lt;ElseIf&gt;</code> section is not
885 satisfied</td></tr>
886 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;ElseIf <var>expression</var>&gt; ... &lt;/ElseIf&gt;</code></td></tr>
887 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
888 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
889 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
890 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
891 </table><p>The documentation for this directive has
892             not been translated yet. Please have a look at the English
893             version.</p><h3>Consulte también</h3>
894 <ul>
895 <li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
896 for a complete reference and more examples.</li>
897 <li><code class="directive"><a href="#if">&lt;If&gt;</a></code></li>
898 <li><code class="directive"><a href="#else">&lt;Else&gt;</a></code></li>
899 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
900     &lt;Files&gt; sections work</a> for an explanation of how these
901     different sections are combined when a request is received.
902     <code class="directive">&lt;If&gt;</code>,
903     <code class="directive">&lt;ElseIf&gt;</code>, and
904     <code class="directive">&lt;Else&gt;</code> are applied last.</li>
905 </ul>
906 </div>
907 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
908 <div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directiva</a></h2>
909 <table class="directive">
910 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
911 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
912 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>EnableMMAP On</code></td></tr>
913 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
914 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
915 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
916 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
917 </table>
918     <p>This directive controls whether the <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use
919     memory-mapping if it needs to read the contents of a file during
920     delivery.  By default, when the handling of a request requires
921     access to the data within a file -- for example, when delivering a
922     server-parsed file using <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache httpd
923     memory-maps the file if the OS supports it.</p>
924
925     <p>This memory-mapping sometimes yields a performance improvement.
926     But in some environments, it is better to disable the memory-mapping
927     to prevent operational problems:</p>
928
929     <ul>
930     <li>On some multiprocessor systems, memory-mapping can reduce the
931     performance of the <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</li>
932     <li>Deleting or truncating a file while <code class="program"><a href="../programs/httpd.html">httpd</a></code>
933       has it memory-mapped can cause <code class="program"><a href="../programs/httpd.html">httpd</a></code> to
934       crash with a segmentation fault.
935     </li>
936     </ul>
937
938     <p>For server configurations that are vulnerable to these problems,
939     you should disable memory-mapping of delivered files by specifying:</p>
940
941     <div class="example"><p><code>
942       EnableMMAP Off
943     </code></p></div>
944
945     <p>For NFS mounted files, this feature may be disabled explicitly for
946     the offending files by specifying:</p>
947
948     <div class="example"><p><code>
949       &lt;Directory "/path-to-nfs-files"&gt;
950       <span class="indent">
951         EnableMMAP Off
952       </span>
953       &lt;/Directory&gt;
954     </code></p></div>
955
956 </div>
957 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
958 <div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directiva</a></h2>
959 <table class="directive">
960 <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>
961 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
962 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>EnableSendfile Off</code></td></tr>
963 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
964 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
965 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
966 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
967 <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
968 version 2.3.9.</td></tr>
969 </table>
970     <p>This directive controls whether <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use the
971     sendfile support from the kernel to transmit file contents to the client.
972     By default, when the handling of a request requires no access
973     to the data within a file -- for example, when delivering a
974     static file -- Apache httpd uses sendfile to deliver the file contents
975     without ever reading the file if the OS supports it.</p>
976
977     <p>This sendfile mechanism avoids separate read and send operations,
978     and buffer allocations. But on some platforms or within some
979     filesystems, it is better to disable this feature to avoid
980     operational problems:</p>
981
982     <ul>
983     <li>Some platforms may have broken sendfile support that the build
984     system did not detect, especially if the binaries were built on
985     another box and moved to such a machine with broken sendfile
986     support.</li>
987     <li>On Linux the use of sendfile triggers TCP-checksum
988     offloading bugs on certain networking cards when using IPv6.</li>
989     <li>On Linux on Itanium, sendfile may be unable to handle files
990     over 2GB in size.</li>
991     <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS, SMB, CIFS, FUSE),
992     the kernel may be unable to serve the network file through
993     its own cache.</li>
994     </ul>
995
996     <p>For server configurations that are not vulnerable to these problems,
997     you may enable this feature by specifying:</p>
998
999     <div class="example"><p><code>
1000       EnableSendfile On
1001     </code></p></div>
1002
1003     <p>For network mounted files, this feature may be disabled explicitly
1004     for the offending files by specifying:</p>
1005
1006     <div class="example"><p><code>
1007       &lt;Directory "/path-to-nfs-files"&gt;
1008       <span class="indent">
1009         EnableSendfile Off
1010       </span>
1011       &lt;/Directory&gt;
1012     </code></p></div>
1013     <p>Please note that the per-directory and .htaccess configuration
1014        of <code class="directive">EnableSendfile</code> is not supported by
1015        <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code>.
1016        Only global definition of <code class="directive">EnableSendfile</code>
1017        is taken into account by the module.
1018     </p>
1019
1020 </div>
1021 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1022 <div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">Directiva</a></h2>
1023 <table class="directive">
1024 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Abort configuration parsing with a custom error message</td></tr>
1025 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Error <var>message</var></code></td></tr>
1026 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1027 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1028 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1029 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.3.9 and later</td></tr>
1030 </table>
1031     <p>If an error can be detected within the configuration, this
1032     directive can be used to generate a custom error message, and halt
1033     configuration parsing.  The typical use is for reporting required
1034     modules which are missing from the configuration.</p>
1035
1036     <div class="example"><h3>Example</h3><p><code>
1037       # ensure that mod_include is loaded<br />
1038       &lt;IfModule !include_module&gt;<br />
1039       Error mod_include is required by mod_foo.  Load it with LoadModule.<br />
1040       &lt;/IfModule&gt;<br />
1041       <br />
1042       # ensure that exactly one of SSL,NOSSL is defined<br />
1043       &lt;IfDefine SSL&gt;<br />
1044       &lt;IfDefine NOSSL&gt;<br />
1045       Error Both SSL and NOSSL are defined.  Define only one of them.<br />
1046       &lt;/IfDefine&gt;<br />
1047       &lt;/IfDefine&gt;<br />
1048       &lt;IfDefine !SSL&gt;<br />
1049       &lt;IfDefine !NOSSL&gt;<br />
1050       Error Either SSL or NOSSL must be defined.<br />
1051       &lt;/IfDefine&gt;<br />
1052       &lt;/IfDefine&gt;<br />
1053     </code></p></div>
1054
1055
1056 </div>
1057 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1058 <div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directiva</a></h2>
1059 <table class="directive">
1060 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>What the server will return to the client
1061 in case of an error</td></tr>
1062 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
1063 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1064 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
1065 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1066 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1067 </table>
1068     <p>In the event of a problem or error, Apache httpd can be configured
1069     to do one of four things,</p>
1070
1071     <ol>
1072       <li>output a simple hardcoded error message</li>
1073
1074       <li>output a customized message</li>
1075
1076       <li>redirect to a local <var>URL-path</var> to handle the
1077       problem/error</li>
1078
1079       <li>redirect to an external <var>URL</var> to handle the
1080       problem/error</li>
1081     </ol>
1082
1083     <p>The first option is the default, while options 2-4 are
1084     configured using the <code class="directive">ErrorDocument</code>
1085     directive, which is followed by the HTTP response code and a URL
1086     or a message. Apache httpd will sometimes offer additional information
1087     regarding the problem/error.</p>
1088
1089     <p>URLs can begin with a slash (/) for local web-paths (relative
1090     to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a
1091     full URL which the client can resolve. Alternatively, a message
1092     can be provided to be displayed by the browser. Examples:</p>
1093
1094     <div class="example"><p><code>
1095       ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
1096       ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
1097       ErrorDocument 401 /subscription_info.html<br />
1098       ErrorDocument 403 "Sorry can't allow you access today"
1099     </code></p></div>
1100
1101     <p>Additionally, the special value <code>default</code> can be used
1102     to specify Apache httpd's simple hardcoded message.  While not required
1103     under normal circumstances, <code>default</code> will restore
1104     Apache httpd's simple hardcoded message for configurations that would
1105     otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
1106
1107     <div class="example"><p><code>
1108       ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
1109       &lt;Directory /web/docs&gt;<br />
1110       <span class="indent">
1111         ErrorDocument 404 default<br />
1112       </span>
1113       &lt;/Directory&gt;
1114     </code></p></div>
1115
1116     <p>Note that when you specify an <code class="directive">ErrorDocument</code>
1117     that points to a remote URL (ie. anything with a method such as
1118     <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
1119     client to tell it where to find the document, even if the
1120     document ends up being on the same server. This has several
1121     implications, the most important being that the client will not
1122     receive the original error status code, but instead will
1123     receive a redirect status code. This in turn can confuse web
1124     robots and other clients which try to determine if a URL is
1125     valid using the status code. In addition, if you use a remote
1126     URL in an <code>ErrorDocument 401</code>, the client will not
1127     know to prompt the user for a password since it will not
1128     receive the 401 status code. Therefore, <strong>if you use an
1129     <code>ErrorDocument 401</code> directive then it must refer to a local
1130     document.</strong></p>
1131
1132     <p>Microsoft Internet Explorer (MSIE) will by default ignore
1133     server-generated error messages when they are "too small" and substitute
1134     its own "friendly" error messages. The size threshold varies depending on
1135     the type of error, but in general, if you make your error document
1136     greater than 512 bytes, then MSIE will show the server-generated
1137     error rather than masking it.  More information is available in
1138     Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
1139
1140     <p>Although most error messages can be overriden, there are certain
1141     circumstances where the internal messages are used regardless of the
1142     setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>.  In
1143     particular, if a malformed request is detected, normal request processing
1144     will be immediately halted and the internal error message returned.
1145     This is necessary to guard against security problems caused by
1146     bad requests.</p>
1147    
1148     <p>If you are using mod_proxy, you may wish to enable
1149     <code class="directive"><a href="../mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide
1150     custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
1151     Apache httpd will not generate custom error documents for proxied content.</p>
1152
1153 <h3>Consulte también</h3>
1154 <ul>
1155 <li><a href="../custom-error.html">documentation of
1156     customizable responses</a></li>
1157 </ul>
1158 </div>
1159 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1160 <div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directiva</a></h2>
1161 <table class="directive">
1162 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Location where the server will log errors</td></tr>
1163 <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>
1164 <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>
1165 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1166 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1167 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1168 </table>
1169     <p>The <code class="directive">ErrorLog</code> directive sets the name of
1170     the file to which the server will log any errors it encounters. If
1171     the <var>file-path</var> is not absolute then it is assumed to be 
1172     relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
1173
1174     <div class="example"><h3>Example</h3><p><code>
1175     ErrorLog /var/log/httpd/error_log
1176     </code></p></div>
1177
1178     <p>If the <var>file-path</var>
1179     begins with a pipe character "<code>|</code>" then it is assumed to be a
1180     command to spawn to handle the error log.</p>
1181
1182     <div class="example"><h3>Example</h3><p><code>
1183     ErrorLog "|/usr/local/bin/httpd_errors"
1184     </code></p></div>
1185
1186     <p>See the notes on <a href="../logs.html#piped">piped logs</a> for
1187     more information.</p>
1188
1189     <p>Using <code>syslog</code> instead of a filename enables logging
1190     via syslogd(8) if the system supports it. The default is to use
1191     syslog facility <code>local7</code>, but you can override this by
1192     using the <code>syslog:<var>facility</var></code> syntax where
1193     <var>facility</var> can be one of the names usually documented in
1194     syslog(1).  The facility is effectively global, and if it is changed
1195     in individual virtual hosts, the final facility specified affects the
1196     entire server.</p>
1197
1198     <div class="example"><h3>Example</h3><p><code>
1199     ErrorLog syslog:user
1200     </code></p></div>
1201
1202     <p>SECURITY: See the <a href="../misc/security_tips.html#serverroot">security tips</a>
1203     document for details on why your security could be compromised
1204     if the directory where log files are stored is writable by
1205     anyone other than the user that starts the server.</p>
1206     <div class="warning"><h3>Note</h3>
1207       <p>When entering a file path on non-Unix platforms, care should be taken
1208       to make sure that only forward slashed are used even though the platform
1209       may allow the use of back slashes. In general it is a good idea to always 
1210       use forward slashes throughout the configuration files.</p>
1211     </div>
1212
1213 <h3>Consulte también</h3>
1214 <ul>
1215 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
1216 <li><a href="../logs.html">Apache HTTP Server Log Files</a></li>
1217 </ul>
1218 </div>
1219 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1220 <div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">Directiva</a></h2>
1221 <table class="directive">
1222 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Format specification for error log entries</td></tr>
1223 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code> ErrorLog [connection|request] <var>format</var></code></td></tr>
1224 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1225 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1226 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1227 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.3.9 and later</td></tr>
1228 </table>
1229     <p><code class="directive">ErrorLogFormat</code> allows to specify what
1230     supplementary information is logged in the error log in addition to the
1231     actual log message.</p>
1232
1233     <div class="example"><h3>Simple example</h3><p><code>
1234         ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
1235     </code></p></div>
1236
1237     <p>Specifying <code>connection</code> or <code>request</code> as first
1238     paramter allows to specify additional formats, causing additional
1239     information to be logged when the first message is logged for a specific
1240     connection or request, respectivly. This additional information is only
1241     logged once per connection/request. If a connection or request is processed
1242     without causing any log message, the additional information is not logged
1243     either.</p>
1244
1245     <p>It can happen that some format string items do not produce output.  For
1246     example, the Referer header is only present if the log message is
1247     associated to a request and the log message happens at a time when the
1248     Referer header has already been read from the client.  If no output is
1249     produced, the default behaviour is to delete everything from the preceeding
1250     space character to the next space character.  This means the log line is
1251     implicitly divided into fields on non-whitespace to whitespace transitions.
1252     If a format string item does not produce output, the whole field is
1253     ommitted.  For example, if the remote address <code>%a</code> in the log
1254     format <code>[%t] [%l] [%a] %M&nbsp;</code> is not available, the surrounding
1255     brackets are not logged either.  Space characters can be escaped with a
1256     backslash to prevent them from delimiting a field.  The combination '%&nbsp;'
1257     (percent space) is a zero-witdh field delimiter that does not produce any
1258     output.</p>
1259
1260     <p>The above behaviour can be changed by adding modifiers to the format
1261     string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
1262     respective item does not produce any output. In once-per-connection/request
1263     formats, it is also possible to use the <code>+</code> (plus) modifier. If an
1264     item with the plus modifier does not produce any output, the whole line is
1265     ommitted.</p>
1266
1267     <p>A number as modifier can be used to assign a log severity level to a
1268     format item. The item will only be logged if the severity of the log
1269     message is not higher than the specified log severity level. The number can
1270     range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
1271
1272     <p>Some format string items accept additional parameters in braces.</p>
1273
1274     <table class="bordered"><tr class="header"><th>Format&nbsp;String</th> <th>Description</th></tr>
1275 <tr><td><code>%%</code></td>
1276         <td>The percent sign</td></tr>
1277 <tr class="odd"><td><code>%...a</code></td>
1278         <td>Remote IP-address and port</td></tr>
1279 <tr><td><code>%...A</code></td>
1280         <td>Local IP-address and port</td></tr>
1281 <tr class="odd"><td><code>%...{name}e</code></td>
1282         <td>Request environment variable <code>name</code></td></tr>
1283 <tr><td><code>%...E</code></td>
1284         <td>APR/OS error status code and string</td></tr>
1285 <tr class="odd"><td><code>%...F</code></td>
1286         <td>Source file name and line number of the log call</td></tr>
1287 <tr><td><code>%...{name}i</code></td>
1288         <td>Request header <code>name</code></td></tr>
1289 <tr class="odd"><td><code>%...k</code></td>
1290         <td>Number of keep-alive requests on this connection</td></tr>
1291 <tr><td><code>%...l</code></td>
1292         <td>Loglevel of the message</td></tr>
1293 <tr class="odd"><td><code>%...L</code></td>
1294         <td>Log ID of the request</td></tr>
1295 <tr><td><code>%...{c}L</code></td>
1296         <td>Log ID of the connection</td></tr>
1297 <tr class="odd"><td><code>%...{C}L</code></td>
1298         <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
1299 <tr><td><code>%...m</code></td>
1300         <td>Name of the module logging the message</td></tr>
1301 <tr class="odd"><td><code>%M</code></td>
1302         <td>The actual log message</td></tr>
1303 <tr><td><code>%...{name}n</code></td>
1304         <td>Request note <code>name</code></td></tr>
1305 <tr class="odd"><td><code>%...P</code></td>
1306         <td>Process ID of current process</td></tr>
1307 <tr><td><code>%...T</code></td>
1308         <td>Thread ID of current thread</td></tr>
1309 <tr class="odd"><td><code>%...t</code></td>
1310         <td>The current time</td></tr>
1311 <tr><td><code>%...{u}t</code></td>
1312         <td>The current time including micro-seconds</td></tr>
1313 <tr class="odd"><td><code>%...{cu}t</code></td>
1314         <td>The current time in compact ISO 8601 format, including
1315             micro-seconds</td></tr>
1316 <tr><td><code>%...v</code></td>
1317         <td>The canonical <code class="directive"><a href="#servername">ServerName</a></code>
1318             of the current server.</td></tr>
1319 <tr class="odd"><td><code>%...V</code></td>
1320         <td>The server name of the server serving the request according to the
1321             <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>
1322             setting.</td></tr>
1323 <tr><td><code>\&nbsp;</code> (backslash space)</td>
1324         <td>Non-field delimiting space</td></tr>
1325 <tr class="odd"><td><code>%&nbsp;</code> (percent space)</td>
1326         <td>Field delimiter (no output)</td></tr>
1327 </table>
1328
1329     <p>The log ID format <code>%L</code> produces a unique id for a connection
1330     or request. This can be used to correlate which log lines belong to the
1331     same connection or request, which request happens on which connection.
1332     A <code>%L</code> format string is also available in
1333     <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code>, to allow to correlate access log entries
1334     with error log lines. If <code class="module"><a href="../mod/mod_unique_id.html">mod_unique_id</a></code> is loaded, its
1335     unique id will be used as log ID for requests.</p>
1336
1337     <div class="example"><h3>Example (somewhat similar to default format)</h3><p><code>
1338         ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P] %7F: %E: [client\ %a]
1339         %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
1340     </code></p></div>
1341
1342     <div class="example"><h3>Example (similar to the 2.2.x format)</h3><p><code>
1343         ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a]
1344         %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
1345     </code></p></div>
1346
1347     <div class="example"><h3>Advanced example with request/connection log IDs</h3><p><code>
1348         ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"<br />
1349         ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"<br />
1350         ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"<br />
1351         ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"<br />
1352         ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"<br />
1353     </code></p></div>
1354
1355
1356 <h3>Consulte también</h3>
1357 <ul>
1358 <li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
1359 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
1360 <li><a href="../logs.html">Apache HTTP Server Log Files</a></li>
1361 </ul>
1362 </div>
1363 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1364 <div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Directiva</a></h2>
1365 <table class="directive">
1366 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Keep track of extended status information for each 
1367 request</td></tr>
1368 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ExtendedStatus On|Off</code></td></tr>
1369 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr>
1370 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
1371 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1372 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1373 </table>
1374     <p>This option tracks additional data per worker about the
1375     currently executing request, and a utilization summary; you 
1376     can see these variables during runtime by configuring 
1377     <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>.  Note that other modules may
1378     rely on this scoreboard.</p>
1379
1380     <p>This setting applies to the entire server, and cannot be
1381     enabled or disabled on a virtualhost-by-virtualhost basis.
1382     The collection of extended status information can slow down
1383     the server.  Also note that this setting cannot be changed
1384     during a graceful restart.</p>
1385
1386     <div class="note">
1387     <p>Note that loading <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> will change 
1388     the default behavior to ExtendedStatus On, while other
1389     third party modules may do the same.  Such modules rely on
1390     collecting detailed information about the state of all workers.
1391     The default is changed by <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> beginning
1392     with version 2.3.6; the previous default was always Off.</p>
1393     </div>
1394
1395
1396 </div>
1397 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1398 <div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directiva</a></h2>
1399 <table class="directive">
1400 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>File attributes used to create the ETag
1401 HTTP response header for static files</td></tr>
1402 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
1403 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>FileETag INode MTime Size</code></td></tr>
1404 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1405 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
1406 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1407 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1408 </table>
1409     <p>
1410     The <code class="directive">FileETag</code> directive configures the file
1411     attributes that are used to create the <code>ETag</code> (entity
1412     tag) response header field when the document is based on a static file.
1413     (The <code>ETag</code> value is used in cache management to save
1414     network bandwidth.) The
1415     <code class="directive">FileETag</code> directive allows you to choose
1416     which of these -- if any -- should be used. The recognized keywords are:
1417     </p>
1418
1419     <dl>
1420      <dt><strong>INode</strong></dt>
1421      <dd>The file's i-node number will be included in the calculation</dd>
1422      <dt><strong>MTime</strong></dt>
1423      <dd>The date and time the file was last modified will be included</dd>
1424      <dt><strong>Size</strong></dt>
1425      <dd>The number of bytes in the file will be included</dd>
1426      <dt><strong>All</strong></dt>
1427      <dd>All available fields will be used. This is equivalent to:
1428          <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd>
1429      <dt><strong>None</strong></dt>
1430      <dd>If a document is file-based, no <code>ETag</code> field will be
1431        included in the response</dd>
1432     </dl>
1433
1434     <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
1435     keywords may be prefixed with either <code>+</code> or <code>-</code>,
1436     which allow changes to be made to the default setting inherited
1437     from a broader scope. Any keyword appearing without such a prefix
1438     immediately and completely cancels the inherited setting.</p>
1439
1440     <p>If a directory's configuration includes
1441     <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
1442     subdirectory's includes <code>FileETag&nbsp;-INode</code>,
1443     the setting for that subdirectory (which will be inherited by
1444     any sub-subdirectories that don't override it) will be equivalent to
1445     <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
1446     <div class="warning"><h3>Warning</h3>
1447     Do not change the default for directories or locations that have WebDAV
1448     enabled and use <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider.
1449     <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>INode&nbsp;MTime&nbsp;Size</code>
1450     as a fixed format for <code>ETag</code> comparisons on conditional requests.
1451     These conditional requests will break if the <code>ETag</code> format is
1452     changed via <code class="directive">FileETag</code>.
1453     </div>
1454     <div class="note"><h3>Server Side Includes</h3>
1455     An ETag is not generated for responses parsed by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>, 
1456     since the response entity can change without a change of the INode, MTime, or Size 
1457     of the static file with embedded SSI directives.
1458     </div>
1459
1460
1461 </div>
1462 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1463 <div class="directive-section"><h2><a name="Files" id="Files">&lt;Files&gt;</a> <a name="files" id="files">Directiva</a></h2>
1464 <table class="directive">
1465 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply to matched
1466 filenames</td></tr>
1467 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</code></td></tr>
1468 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1469 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1470 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1471 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1472 </table>
1473     <p>The <code class="directive">&lt;Files&gt;</code> directive
1474     limits the scope of the enclosed directives by filename. It is comparable
1475     to the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
1476     and <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
1477     directives. It should be matched with a <code>&lt;/Files&gt;</code>
1478     directive. The directives given within this section will be applied to
1479     any object with a basename (last component of filename) matching the
1480     specified filename. <code class="directive">&lt;Files&gt;</code>
1481     sections are processed in the order they appear in the
1482     configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
1483     <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location">&lt;Location&gt;</a></code> sections. Note
1484     that <code class="directive">&lt;Files&gt;</code> can be nested
1485     inside <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections to restrict the
1486     portion of the filesystem they apply to.</p>
1487
1488     <p>The <var>filename</var> argument should include a filename, or
1489     a wild-card string, where <code>?</code> matches any single character,
1490     and <code>*</code> matches any sequences of characters.
1491     <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular expressions</a> 
1492     can also be used, with the addition of the
1493     <code>~</code> character. For example:</p>
1494
1495     <div class="example"><p><code>
1496       &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
1497     </code></p></div>
1498
1499     <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch">&lt;FilesMatch&gt;</a></code> is preferred,
1500     however.</p>
1501
1502     <p>Note that unlike <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> and <code class="directive"><a href="#location">&lt;Location&gt;</a></code> sections, <code class="directive">&lt;Files&gt;</code> sections can be used inside
1503     <code>.htaccess</code> files. This allows users to control access to
1504     their own files, at a file-by-file level.</p>
1505
1506
1507 <h3>Consulte también</h3>
1508 <ul>
1509 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
1510     and &lt;Files&gt; sections work</a> for an explanation of how these
1511     different sections are combined when a request is received</li>
1512 </ul>
1513 </div>
1514 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1515 <div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch">&lt;FilesMatch&gt;</a> <a name="filesmatch" id="filesmatch">Directiva</a></h2>
1516 <table class="directive">
1517 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply to regular-expression matched
1518 filenames</td></tr>
1519 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</code></td></tr>
1520 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1521 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1522 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1523 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1524 </table>
1525     <p>The <code class="directive">&lt;FilesMatch&gt;</code> directive
1526     limits the scope of the enclosed directives by filename, just as the
1527     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> directive
1528     does. However, it accepts a <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular 
1529     expression</a>. For example:</p>
1530
1531     <div class="example"><p><code>
1532       &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
1533     </code></p></div>
1534
1535     <p>would match most common Internet graphics formats.</p>
1536
1537 <h3>Consulte también</h3>
1538 <ul>
1539 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
1540     and &lt;Files&gt; sections work</a> for an explanation of how these
1541     different sections are combined when a request is received</li>
1542 </ul>
1543 </div>
1544 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1545 <div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directiva</a></h2>
1546 <table class="directive">
1547 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Forces all matching files to be served with the specified
1548 media type in the HTTP Content-Type header field</td></tr>
1549 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr>
1550 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
1551 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
1552 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1553 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1554 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Moved to the core in Apache httpd 2.0</td></tr>
1555 </table>
1556     <p>When placed into an <code>.htaccess</code> file or a
1557     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, or
1558     <code class="directive"><a href="#location">&lt;Location&gt;</a></code> or
1559     <code class="directive"><a href="#files">&lt;Files&gt;</a></code>
1560     section, this directive forces all matching files to be served
1561     with the content type identification given by
1562     <var>media-type</var>. For example, if you had a directory full of
1563     GIF files, but did not want to label them all with <code>.gif</code>,
1564     you might want to use:</p>
1565
1566     <div class="example"><p><code>
1567       ForceType image/gif
1568     </code></p></div>
1569
1570     <p>Note that this directive overrides other indirect media type
1571     associations defined in mime.types or via the
1572     <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code>.</p>
1573
1574     <p>You can also override more general
1575     <code class="directive">ForceType</code> settings
1576     by using the value of <code>None</code>:</p>
1577
1578     <div class="example"><p><code>
1579       # force all files to be image/gif:<br />
1580       &lt;Location /images&gt;<br />
1581         <span class="indent">
1582           ForceType image/gif<br />
1583         </span>
1584       &lt;/Location&gt;<br />
1585       <br />
1586       # but normal mime-type associations here:<br />
1587       &lt;Location /images/mixed&gt;<br />
1588       <span class="indent">
1589         ForceType None<br />
1590       </span>
1591       &lt;/Location&gt;
1592     </code></p></div>
1593
1594     <p>This directive primarily overrides the content types generated for
1595     static files served out of the filesystem.  For resources other than 
1596     static files, where the generator of the response typically specifies 
1597     a Content-Type, this directive has no effect.</p>
1598
1599
1600 </div>
1601 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1602 <div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">Directiva</a></h2>
1603 <table class="directive">
1604 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Directory to write gmon.out profiling data to.  </td></tr>
1605 <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>
1606 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1607 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1608 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1609 </table>
1610     <p>When the server has been compiled with gprof profiling suppport,
1611     <code class="directive">GprofDir</code> causes <code>gmon.out</code> files to
1612     be written to the specified directory when the process exits.  If the
1613     argument ends with a percent symbol ('%'), subdirectories are created
1614     for each process id.</p>
1615
1616     <p>This directive currently only works with the <code class="module"><a href="../mod/prefork.html">prefork</a></code> 
1617     MPM.</p>
1618
1619 </div>
1620 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1621 <div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directiva</a></h2>
1622 <table class="directive">
1623 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
1624 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
1625 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>HostnameLookups Off</code></td></tr>
1626 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
1627 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1628 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1629 </table>
1630     <p>This directive enables DNS lookups so that host names can be
1631     logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
1632     The value <code>Double</code> refers to doing double-reverse
1633     DNS lookup. That is, after a reverse lookup is performed, a forward
1634     lookup is then performed on that result. At least one of the IP
1635     addresses in the forward lookup must match the original
1636     address. (In "tcpwrappers" terminology this is called
1637     <code>PARANOID</code>.)</p>
1638
1639     <p>Regardless of the setting, when <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> is
1640     used for controlling access by hostname, a double reverse lookup
1641     will be performed.  This is necessary for security. Note that the
1642     result of this double-reverse isn't generally available unless you
1643     set <code>HostnameLookups Double</code>. For example, if only
1644     <code>HostnameLookups On</code> and a request is made to an object
1645     that is protected by hostname restrictions, regardless of whether
1646     the double-reverse fails or not, CGIs will still be passed the
1647     single-reverse result in <code>REMOTE_HOST</code>.</p>
1648
1649     <p>The default is <code>Off</code> in order to save the network
1650     traffic for those sites that don't truly need the reverse
1651     lookups done. It is also better for the end users because they
1652     don't have to suffer the extra latency that a lookup entails.
1653     Heavily loaded sites should leave this directive
1654     <code>Off</code>, since DNS lookups can take considerable
1655     amounts of time. The utility <code class="program"><a href="../programs/logresolve.html">logresolve</a></code>, compiled by
1656     default to the <code>bin</code> subdirectory of your installation
1657     directory, can be used to look up host names from logged IP addresses
1658     offline.</p>
1659
1660 </div>
1661 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1662 <div class="directive-section"><h2><a name="If" id="If">&lt;If&gt;</a> <a name="if" id="if">Directiva</a></h2>
1663 <table class="directive">
1664 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if a condition is
1665 satisfied by a request at runtime</td></tr>
1666 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;If <var>expression</var>&gt; ... &lt;/If&gt;</code></td></tr>
1667 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1668 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1669 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1670 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1671 </table>
1672     <p>The <code class="directive">&lt;If&gt;</code> directive
1673     evaluates an expression at runtime, and applies the enclosed
1674     directives if and only if the expression evaluates to true.
1675     For example:</p>
1676
1677     <div class="example"><p><code>
1678         &lt;If "$req{Host} = ''"&gt;
1679     </code></p></div>
1680
1681     <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
1682
1683     <p>You may compare the value of any variable in the request headers
1684     ($req), response headers ($resp) or environment ($env) in your
1685     expression.</p>
1686
1687     <p>Apart from <code>=</code>, <code>If</code> can use the <code>IN</code>
1688     operator to compare if the expression is in a given range:</p>
1689
1690     <div class="example"><p><code>
1691         &lt;If %{REQUEST_METHOD} IN GET,HEAD,OPTIONS&gt;
1692     </code></p></div>
1693
1694
1695 <h3>Consulte también</h3>
1696 <ul>
1697 <li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
1698 for a complete reference and more examples.</li>
1699 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
1700     &lt;Files&gt; sections work</a> for an explanation of how these
1701     different sections are combined when a request is received.
1702     <code class="directive">&lt;If&gt;</code> has the same precedence
1703     and usage as <code class="directive">&lt;Files&gt;</code></li>
1704 </ul>
1705 </div>
1706 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1707 <div class="directive-section"><h2><a name="IfDefine" id="IfDefine">&lt;IfDefine&gt;</a> <a name="ifdefine" id="ifdefine">Directiva</a></h2>
1708 <table class="directive">
1709 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that will be processed only
1710 if a test is true at startup</td></tr>
1711 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
1712     &lt;/IfDefine&gt;</code></td></tr>
1713 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1714 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1715 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1716 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1717 </table>
1718     <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
1719     </code> section is used to mark directives that are conditional. The
1720     directives within an <code class="directive">&lt;IfDefine&gt;</code>
1721     section are only processed if the <var>test</var> is true. If <var>
1722     test</var> is false, everything between the start and end markers is
1723     ignored.</p>
1724
1725     <p>The <var>test</var> in the <code class="directive">&lt;IfDefine&gt;</code> section directive can be one of two forms:</p>
1726
1727     <ul>
1728       <li><var>parameter-name</var></li>
1729
1730       <li><code>!</code><var>parameter-name</var></li>
1731     </ul>
1732
1733     <p>In the former case, the directives between the start and end
1734     markers are only processed if the parameter named
1735     <var>parameter-name</var> is defined. The second format reverses
1736     the test, and only processes the directives if
1737     <var>parameter-name</var> is <strong>not</strong> defined.</p>
1738
1739     <p>The <var>parameter-name</var> argument is a define as given on the
1740     <code class="program"><a href="../programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
1741     </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
1742
1743     <p><code class="directive">&lt;IfDefine&gt;</code> sections are
1744     nest-able, which can be used to implement simple
1745     multiple-parameter tests. Example:</p>
1746
1747     <div class="example"><p><code>
1748       httpd -DReverseProxy -DUseCache -DMemCache ...<br />
1749       <br />
1750       # httpd.conf<br />
1751       &lt;IfDefine ReverseProxy&gt;<br />
1752       <span class="indent">
1753         LoadModule proxy_module   modules/mod_proxy.so<br />
1754         LoadModule proxy_http_module   modules/mod_proxy_http.so<br />
1755         &lt;IfDefine UseCache&gt;<br />
1756         <span class="indent">
1757           LoadModule cache_module   modules/mod_cache.so<br />
1758           &lt;IfDefine MemCache&gt;<br />
1759           <span class="indent">
1760             LoadModule mem_cache_module   modules/mod_mem_cache.so<br />
1761           </span>
1762           &lt;/IfDefine&gt;<br />
1763           &lt;IfDefine !MemCache&gt;<br />
1764           <span class="indent">
1765             LoadModule cache_disk_module   modules/mod_cache_disk.so<br />
1766           </span>
1767           &lt;/IfDefine&gt;
1768         </span>
1769         &lt;/IfDefine&gt;
1770       </span>
1771       &lt;/IfDefine&gt;
1772     </code></p></div>
1773
1774 </div>
1775 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1776 <div class="directive-section"><h2><a name="IfModule" id="IfModule">&lt;IfModule&gt;</a> <a name="ifmodule" id="ifmodule">Directiva</a></h2>
1777 <table class="directive">
1778 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that are processed conditional on the
1779 presence or absence of a specific module</td></tr>
1780 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
1781     &lt;/IfModule&gt;</code></td></tr>
1782 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1783 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1784 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1785 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1786 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Module identifiers are available in version 2.1 and
1787 later.</td></tr>
1788 </table>
1789     <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
1790     section is used to mark directives that are conditional on the presence of
1791     a specific module. The directives within an <code class="directive">&lt;IfModule&gt;</code> section are only processed if the <var>test</var>
1792     is true. If <var>test</var> is false, everything between the start and
1793     end markers is ignored.</p>
1794
1795     <p>The <var>test</var> in the <code class="directive">&lt;IfModule&gt;</code> section directive can be one of two forms:</p>
1796
1797     <ul>
1798       <li><var>module</var></li>
1799
1800       <li>!<var>module</var></li>
1801     </ul>
1802
1803     <p>In the former case, the directives between the start and end
1804     markers are only processed if the module named <var>module</var>
1805     is included in Apache httpd -- either compiled in or
1806     dynamically loaded using <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
1807     and only processes the directives if <var>module</var> is
1808     <strong>not</strong> included.</p>
1809
1810     <p>The <var>module</var> argument can be either the module identifier or
1811     the file name of the module, at the time it was compiled.  For example,
1812     <code>rewrite_module</code> is the identifier and
1813     <code>mod_rewrite.c</code> is the file name. If a module consists of
1814     several source files, use the name of the file containing the string
1815     <code>STANDARD20_MODULE_STUFF</code>.</p>
1816
1817     <p><code class="directive">&lt;IfModule&gt;</code> sections are
1818     nest-able, which can be used to implement simple multiple-module
1819     tests.</p>
1820
1821     <div class="note">This section should only be used if you need to have one
1822     configuration file that works whether or not a specific module
1823     is available. In normal operation, directives need not be
1824     placed in <code class="directive">&lt;IfModule&gt;</code>
1825     sections.</div>
1826
1827 </div>
1828 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1829 <div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directiva</a></h2>
1830 <table class="directive">
1831 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Includes other configuration files from within
1832 the server configuration files</td></tr>
1833 <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>
1834 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
1835 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1836 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1837 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Wildcard matching available in 2.0.41 and later, directory
1838 wildcard matching available in 2.3.6 and later</td></tr>
1839 </table>
1840     <p>This directive allows inclusion of other configuration files
1841     from within the server configuration files.</p>
1842
1843     <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
1844     in the filename or directory parts of the path to include several files
1845     at once, in alphabetical order. In addition, if
1846     <code class="directive">Include</code> points to a directory, rather than a file,
1847     Apache httpd will read all files in that directory and any subdirectory.
1848     However, including entire directories is not recommended, because it is
1849     easy to accidentally leave temporary files in a directory that can cause
1850     <code class="program"><a href="../programs/httpd.html">httpd</a></code> to fail. Instead, we encourage you to use the
1851     wildcard syntax shown below, to include files that match a particular
1852     pattern, such as *.conf, for example.</p>
1853
1854     <p>When a wildcard is specified for a <strong>file</strong> component of
1855     the path, and no file matches the wildcard, the
1856     <code class="directive"><a href="#include">Include</a></code>
1857     directive will be <strong>silently ignored</strong>. When a wildcard is
1858     specified for a <strong>directory</strong> component of the path, and
1859     no directory matches the wildcard, the
1860     <code class="directive"><a href="#include">Include</a></code> directive will
1861     <strong>fail with an error</strong> saying the directory cannot be found.
1862     </p>
1863
1864     <p>For further control over the behaviour of the server when no files or
1865     directories match, prefix the path with the modifiers <var>optional</var>
1866     or <var>strict</var>. If <var>optional</var> is specified, any wildcard
1867     file or directory that does not match will be silently ignored. If
1868     <var>strict</var> is specified, any wildcard file or directory that does
1869     not match at least one file will cause server startup to fail.</p>
1870
1871     <p>When a directory or file component of the path is
1872     specified exactly, and that directory or file does not exist,
1873     <code class="directive"><a href="#include">Include</a></code> directive will fail with an
1874     error saying the file or directory cannot be found.</p>
1875
1876     <p>The file path specified may be an absolute path, or may be relative 
1877     to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
1878
1879     <p>Examples:</p>
1880
1881     <div class="example"><p><code>
1882       Include /usr/local/apache2/conf/ssl.conf<br />
1883       Include /usr/local/apache2/conf/vhosts/*.conf
1884     </code></p></div>
1885
1886     <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
1887
1888     <div class="example"><p><code>
1889       Include conf/ssl.conf<br />
1890       Include conf/vhosts/*.conf
1891     </code></p></div>
1892
1893     <p>Wildcards may be included in the directory or file portion of the
1894     path. In the following example, the server will fail to load if no
1895     directories match conf/vhosts/*, but will load successfully if no
1896     files match *.conf.</p>
1897   
1898     <div class="example"><p><code>
1899       Include conf/vhosts/*/vhost.conf<br />
1900       Include conf/vhosts/*/*.conf
1901     </code></p></div>
1902
1903     <p>In this example, the server will fail to load if either
1904     conf/vhosts/* matches no directories, or if *.conf matches no files:</p>
1905
1906     <div class="example"><p><code>
1907       Include strict conf/vhosts/*/*.conf
1908     </code></p></div>
1909   
1910     <p>In this example, the server load successfully if either conf/vhosts/*
1911     matches no directories, or if *.conf matches no files:</p>
1912
1913     <div class="example"><p><code>
1914       Include optional conf/vhosts/*/*.conf
1915     </code></p></div>
1916
1917
1918 <h3>Consulte también</h3>
1919 <ul>
1920 <li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
1921 </ul>
1922 </div>
1923 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1924 <div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directiva</a></h2>
1925 <table class="directive">
1926 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables HTTP persistent connections</td></tr>
1927 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>KeepAlive On|Off</code></td></tr>
1928 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>KeepAlive On</code></td></tr>
1929 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1930 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1931 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1932 </table>
1933     <p>The Keep-Alive extension to HTTP/1.0 and the persistent
1934     connection feature of HTTP/1.1 provide long-lived HTTP sessions
1935     which allow multiple requests to be sent over the same TCP
1936     connection. In some cases this has been shown to result in an
1937     almost 50% speedup in latency times for HTML documents with
1938     many images. To enable Keep-Alive connections, set
1939     <code>KeepAlive On</code>.</p>
1940
1941     <p>For HTTP/1.0 clients, Keep-Alive connections will only be
1942     used if they are specifically requested by a client. In
1943     addition, a Keep-Alive connection with an HTTP/1.0 client can
1944     only be used when the length of the content is known in
1945     advance. This implies that dynamic content such as CGI output,
1946     SSI pages, and server-generated directory listings will
1947     generally not use Keep-Alive connections to HTTP/1.0 clients.
1948     For HTTP/1.1 clients, persistent connections are the default
1949     unless otherwise specified. If the client requests it, chunked
1950     encoding will be used in order to send content of unknown
1951     length over persistent connections.</p>
1952
1953     <p>When a client uses a Keep-Alive connection it will be counted
1954     as a single "request" for the <code class="directive"><a href="../mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code> directive, regardless
1955     of how many requests are sent using the connection.</p>
1956
1957 <h3>Consulte también</h3>
1958 <ul>
1959 <li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
1960 </ul>
1961 </div>
1962 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1963 <div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directiva</a></h2>
1964 <table class="directive">
1965 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Amount of time the server will wait for subsequent
1966 requests on a persistent connection</td></tr>
1967 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr>
1968 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
1969 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1970 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1971 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1972 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Specifying a value in milliseconds is available in 
1973 Apache httpd 2.3.2 and later</td></tr>
1974 </table>
1975     <p>The number of seconds Apache httpd will wait for a subsequent
1976     request before closing the connection. By adding a postfix of ms the
1977     timeout can be also set in milliseconds. Once a request has been
1978     received, the timeout value specified by the
1979     <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
1980
1981     <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
1982     may cause performance problems in heavily loaded servers. The
1983     higher the timeout, the more server processes will be kept
1984     occupied waiting on connections with idle clients.</p>
1985     
1986     <p>In a name-based virtual host context, the value of the first
1987     defined virtual host (the default host) in a set of <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> will be used.
1988     The other values will be ignored.</p>
1989
1990 </div>
1991 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1992 <div class="directive-section"><h2><a name="Limit" id="Limit">&lt;Limit&gt;</a> <a name="limit" id="limit">Directiva</a></h2>
1993 <table class="directive">
1994 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restrict enclosed access controls to only certain HTTP
1995 methods</td></tr>
1996 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
1997     &lt;/Limit&gt;</code></td></tr>
1998 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
1999 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>AuthConfig, Limit</td></tr>
2000 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2001 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2002 </table>
2003     <p>Access controls are normally effective for
2004     <strong>all</strong> access methods, and this is the usual
2005     desired behavior. <strong>In the general case, access control
2006     directives should not be placed within a
2007     <code class="directive">&lt;Limit&gt;</code> section.</strong></p>
2008
2009     <p>The purpose of the <code class="directive">&lt;Limit&gt;</code>
2010     directive is to restrict the effect of the access controls to the
2011     nominated HTTP methods. For all other methods, the access
2012     restrictions that are enclosed in the <code class="directive">&lt;Limit&gt;</code> bracket <strong>will have no
2013     effect</strong>. The following example applies the access control
2014     only to the methods <code>POST</code>, <code>PUT</code>, and
2015     <code>DELETE</code>, leaving all other methods unprotected:</p>
2016
2017     <div class="example"><p><code>
2018       &lt;Limit POST PUT DELETE&gt;<br />
2019       <span class="indent">
2020         Require valid-user<br />
2021       </span>
2022       &lt;/Limit&gt;
2023     </code></p></div>
2024
2025     <p>The method names listed can be one or more of: <code>GET</code>,
2026     <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
2027     <code>CONNECT</code>, <code>OPTIONS</code>,
2028     <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
2029     <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
2030     <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
2031     case-sensitive.</strong> If <code>GET</code> is used it will also
2032     restrict <code>HEAD</code> requests. The <code>TRACE</code> method
2033     cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p>
2034
2035     <div class="warning">A <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section should always be
2036     used in preference to a <code class="directive">&lt;Limit&gt;</code>
2037     section when restricting access, since a <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section provides protection
2038     against arbitrary methods.</div>
2039
2040     <p>The <code class="directive">&lt;Limit&gt;</code> and
2041     <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code>
2042     directives may be nested.  In this case, each successive level of
2043     <code class="directive">&lt;Limit&gt;</code> or <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> directives must
2044     further restrict the set of methods to which access controls apply.</p>
2045
2046     <div class="warning">When using
2047     <code class="directive">&lt;Limit&gt;</code> or
2048     <code class="directive">&lt;LimitExcept&gt;</code> directives with
2049     the <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive,
2050     note that the first <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>
2051     to succeed authorizes the request, regardless of the presence of other
2052     <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directives.</div>
2053
2054     <p>For example, given the following configuration, all users will
2055     be authorized for <code>POST</code> requests, and the
2056     <code>Require group editors</code> directive will be ignored
2057     in all cases:</p>
2058
2059     <div class="example"><p><code>
2060       &lt;LimitExcept GET&gt;
2061       <span class="indent">
2062         Require valid-user
2063       </span> 
2064       &lt;/LimitExcept&gt;<br />
2065       &lt;Limit POST&gt;
2066       <span class="indent">
2067         Require group editors
2068       </span> 
2069       &lt;/Limit&gt;
2070     </code></p></div>
2071
2072 </div>
2073 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2074 <div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept">&lt;LimitExcept&gt;</a> <a name="limitexcept" id="limitexcept">Directiva</a></h2>
2075 <table class="directive">
2076 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restrict access controls to all HTTP methods
2077 except the named ones</td></tr>
2078 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
2079     &lt;/LimitExcept&gt;</code></td></tr>
2080 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
2081 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>AuthConfig, Limit</td></tr>
2082 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2083 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2084 </table>
2085     <p><code class="directive">&lt;LimitExcept&gt;</code> and
2086     <code>&lt;/LimitExcept&gt;</code> are used to enclose
2087     a group of access control directives which will then apply to any
2088     HTTP access method <strong>not</strong> listed in the arguments;
2089     i.e., it is the opposite of a <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> section and can be used to control
2090     both standard and nonstandard/unrecognized methods. See the
2091     documentation for <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> for more details.</p>
2092
2093     <p>For example:</p>
2094
2095     <div class="example"><p><code>
2096       &lt;LimitExcept POST GET&gt;<br />
2097       <span class="indent">
2098         Require valid-user<br />
2099       </span>
2100       &lt;/LimitExcept&gt;
2101     </code></p></div>
2102
2103
2104 </div>
2105 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2106 <div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directiva</a></h2>
2107 <table class="directive">
2108 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determine maximum number of internal redirects and nested
2109 subrequests</td></tr>
2110 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
2111 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
2112 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2113 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2114 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2115 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.0.47 and later</td></tr>
2116 </table>
2117     <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
2118     redirects the original request to a CGI script. A subrequest is Apache httpd's
2119     mechanism to find out what would happen for some URI if it were requested.
2120     For example, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
2121     files listed in the <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
2122     directive.</p>
2123
2124     <p><code class="directive">LimitInternalRecursion</code> prevents the server
2125     from crashing when entering an infinite loop of internal redirects or
2126     subrequests. Such loops are usually caused by misconfigurations.</p>
2127
2128     <p>The directive stores two different limits, which are evaluated on
2129     per-request basis. The first <var>number</var> is the maximum number of
2130     internal redirects, that may follow each other. The second <var>number</var>
2131     determines, how deep subrequests may be nested. If you specify only one
2132     <var>number</var>, it will be assigned to both limits.</p>
2133
2134     <div class="example"><h3>Example</h3><p><code>
2135       LimitInternalRecursion 5
2136     </code></p></div>
2137
2138 </div>
2139 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2140 <div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directiva</a></h2>
2141 <table class="directive">
2142 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restricts the total size of the HTTP request body sent
2143 from the client</td></tr>
2144 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
2145 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestBody 0</code></td></tr>
2146 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2147 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
2148 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2149 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2150 </table>
2151     <p>This directive specifies the number of <var>bytes</var> from 0
2152     (meaning unlimited) to 2147483647 (2GB) that are allowed in a
2153     request body. See the note below for the limited applicability
2154     to proxy requests.</p>
2155
2156     <p>The <code class="directive">LimitRequestBody</code> directive allows
2157     the user to set a limit on the allowed size of an HTTP request
2158     message body within the context in which the directive is given
2159     (server, per-directory, per-file or per-location). If the client
2160     request exceeds that limit, the server will return an error
2161     response instead of servicing the request. The size of a normal
2162     request message body will vary greatly depending on the nature of
2163     the resource and the methods allowed on that resource. CGI scripts
2164     typically use the message body for retrieving form information.
2165     Implementations of the <code>PUT</code> method will require
2166     a value at least as large as any representation that the server
2167     wishes to accept for that resource.</p>
2168
2169     <p>This directive gives the server administrator greater
2170     control over abnormal client request behavior, which may be
2171     useful for avoiding some forms of denial-of-service
2172     attacks.</p>
2173
2174     <p>If, for example, you are permitting file upload to a particular
2175     location, and wish to limit the size of the uploaded file to 100K,
2176     you might use the following directive:</p>
2177
2178     <div class="example"><p><code>
2179       LimitRequestBody 102400
2180     </code></p></div>
2181     
2182     <div class="note"><p>For a full description of how this directive is interpreted by 
2183     proxy requests, see the <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> documentation.</p>
2184     </div>
2185
2186
2187 </div>
2188 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2189 <div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directiva</a></h2>
2190 <table class="directive">
2191 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the number of HTTP request header fields that
2192 will be accepted from the client</td></tr>
2193 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
2194 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestFields 100</code></td></tr>
2195 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2196 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2197 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2198 </table>
2199     <p><var>Number</var> is an integer from 0 (meaning unlimited) to
2200     32767. The default value is defined by the compile-time
2201     constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
2202     distributed).</p>
2203
2204     <p>The <code class="directive">LimitRequestFields</code> directive allows
2205     the server administrator to modify the limit on the number of
2206     request header fields allowed in an HTTP request. A server needs
2207     this value to be larger than the number of fields that a normal
2208     client request might include. The number of request header fields
2209     used by a client rarely exceeds 20, but this may vary among
2210     different client implementations, often depending upon the extent
2211     to which a user has configured their browser to support detailed
2212     content negotiation. Optional HTTP extensions are often expressed
2213     using request header fields.</p>
2214
2215     <p>This directive gives the server administrator greater
2216     control over abnormal client request behavior, which may be
2217     useful for avoiding some forms of denial-of-service attacks.
2218     The value should be increased if normal clients see an error
2219     response from the server that indicates too many fields were
2220     sent in the request.</p>
2221
2222     <p>For example:</p>
2223
2224     <div class="example"><p><code>
2225       LimitRequestFields 50
2226     </code></p></div>
2227
2228      <div class="warning"><h3>Warning</h3>
2229      <p> When name-based virtual hosting is used, the value for this 
2230      directive is taken from the default (first-listed) virtual host for the
2231      <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
2232      </div>
2233
2234
2235 </div>
2236 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2237 <div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directiva</a></h2>
2238 <table class="directive">
2239 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the size of the HTTP request header allowed from the
2240 client</td></tr>
2241 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr>
2242 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr>
2243 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2244 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2245 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2246 </table>
2247     <p>This directive specifies the number of <var>bytes</var>
2248     that will be allowed in an HTTP request header.</p>
2249
2250     <p>The <code class="directive">LimitRequestFieldSize</code> directive
2251     allows the server administrator to reduce or increase the limit 
2252     on the allowed size of an HTTP request header field. A server
2253     needs this value to be large enough to hold any one header field 
2254     from a normal client request. The size of a normal request header 
2255     field will vary greatly among different client implementations, 
2256     often depending upon the extent to which a user has configured
2257     their browser to support detailed content negotiation. SPNEGO
2258     authentication headers can be up to 12392 bytes.</p>
2259
2260     <p>This directive gives the server administrator greater
2261     control over abnormal client request behavior, which may be
2262     useful for avoiding some forms of denial-of-service attacks.</p>
2263
2264     <p>For example:</p>
2265
2266     <div class="example"><p><code>
2267       LimitRequestFieldSize 4094
2268     </code></p></div>
2269
2270     <div class="note">Under normal conditions, the value should not be changed from
2271     the default.</div>
2272
2273     <div class="warning"><h3>Warning</h3>
2274     <p> When name-based virtual hosting is used, the value for this 
2275     directive is taken from the default (first-listed) virtual host for the
2276     <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
2277     </div>
2278
2279
2280 </div>
2281 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2282 <div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directiva</a></h2>
2283 <table class="directive">
2284 <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
2285 from the client</td></tr>
2286 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
2287 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
2288 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2289 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2290 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2291 </table>
2292     <p>This directive sets the number of <var>bytes</var> that will be 
2293     allowed on the HTTP request-line.</p>
2294
2295     <p>The <code class="directive">LimitRequestLine</code> directive allows
2296     the server administrator to reduce or increase the limit on the allowed size
2297     of a client's HTTP request-line. Since the request-line consists of the
2298     HTTP method, URI, and protocol version, the
2299     <code class="directive">LimitRequestLine</code> directive places a
2300     restriction on the length of a request-URI allowed for a request
2301     on the server. A server needs this value to be large enough to
2302     hold any of its resource names, including any information that
2303     might be passed in the query part of a <code>GET</code> request.</p>
2304
2305     <p>This directive gives the server administrator greater
2306     control over abnormal client request behavior, which may be
2307     useful for avoiding some forms of denial-of-service attacks.</p>
2308
2309     <p>For example:</p>
2310
2311     <div class="example"><p><code>
2312       LimitRequestLine 4094
2313     </code></p></div>
2314
2315     <div class="note">Under normal conditions, the value should not be changed from
2316     the default.</div>
2317
2318     <div class="warning"><h3>Warning</h3>
2319     <p> When name-based virtual hosting is used, the value for this 
2320     directive is taken from the default (first-listed) virtual host for the
2321     <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
2322     </div>
2323
2324
2325 </div>
2326 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2327 <div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directiva</a></h2>
2328 <table class="directive">
2329 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the size of an XML-based request body</td></tr>
2330 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
2331 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
2332 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2333 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
2334 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2335 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2336 </table>
2337     <p>Limit (in bytes) on maximum size of an XML-based request
2338     body. A value of <code>0</code> will disable any checking.</p>
2339
2340     <p>Example:</p>
2341
2342     <div class="example"><p><code>
2343       LimitXMLRequestBody 0
2344     </code></p></div>
2345
2346
2347 </div>
2348 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2349 <div class="directive-section"><h2><a name="Location" id="Location">&lt;Location&gt;</a> <a name="location" id="location">Directiva</a></h2>
2350 <table class="directive">
2351 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Applies the enclosed directives only to matching
2352 URLs</td></tr>
2353 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;Location
2354     <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</code></td></tr>
2355 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2356 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2357 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2358 </table>
2359     <p>The <code class="directive">&lt;Location&gt;</code> directive
2360     limits the scope of the enclosed directives by URL. It is similar to the
2361     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
2362     directive, and starts a subsection which is terminated with a
2363     <code>&lt;/Location&gt;</code> directive. <code class="directive">&lt;Location&gt;</code> sections are processed in the
2364     order they appear in the configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
2365     <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.</p>
2366
2367     <p><code class="directive">&lt;Location&gt;</code> sections operate
2368     completely outside the filesystem.  This has several consequences.
2369     Most importantly, <code class="directive">&lt;Location&gt;</code>
2370     directives should not be used to control access to filesystem
2371     locations.  Since several different URLs may map to the same
2372     filesystem location, such access controls may by circumvented.</p>
2373
2374     <p>The enclosed directives will be applied to the request if the path component
2375     of the URL meets <em>any</em> of the following criteria:
2376     </p>
2377     <ul>
2378       <li>The specified location matches exactly the path component of the URL.
2379       </li>
2380       <li>The specified location, which ends in a forward slash, is a prefix 
2381       of the path component of the URL (treated as a context root).
2382       </li>
2383       <li>The specified location, with the addition of a trailing slash, is a 
2384       prefix of the path component of the URL (also treated as a context root).
2385       </li>
2386     </ul>
2387     <p>
2388     In the example below, where no trailing slash is used, requests to 
2389     /private1, /private1/ and /private1/file.txt will have the enclosed
2390     directives applied, but /private1other would not. 
2391     </p>
2392     <div class="example"><p><code>
2393       &lt;Location /private1&gt;
2394           ...
2395     </code></p></div>
2396     <p>
2397     In the example below, where a trailing slash is used, requests to 
2398     /private2/ and /private2/file.txt will have the enclosed
2399     directives applied, but /private2 and /private2other would not. 
2400     </p>
2401     <div class="example"><p><code>
2402       &lt;Location /private2<em>/</em>&gt;
2403           ...
2404     </code></p></div>
2405
2406     <div class="note"><h3>When to use <code class="directive">&lt;Location&gt;</code></h3>
2407
2408     <p>Use <code class="directive">&lt;Location&gt;</code> to apply
2409     directives to content that lives outside the filesystem.  For
2410     content that lives in the filesystem, use <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> and <code class="directive"><a href="#files">&lt;Files&gt;</a></code>.  An exception is
2411     <code>&lt;Location /&gt;</code>, which is an easy way to 
2412     apply a configuration to the entire server.</p>
2413     </div>
2414
2415     <p>For all origin (non-proxy) requests, the URL to be matched is a
2416     URL-path of the form <code>/path/</code>.  <em>No scheme, hostname,
2417     port, or query string may be included.</em>  For proxy requests, the
2418     URL to be matched is of the form
2419     <code>scheme://servername/path</code>, and you must include the
2420     prefix.</p>
2421
2422     <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
2423     any single character, and <code>*</code> matches any sequences of
2424     characters. Neither wildcard character matches a / in the URL-path.</p>
2425
2426     <p><a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular expressions</a>
2427     can also be used, with the addition of the <code>~</code> 
2428     character. For example:</p>
2429
2430     <div class="example"><p><code>
2431       &lt;Location ~ "/(extra|special)/data"&gt;
2432     </code></p></div>
2433
2434     <p>would match URLs that contained the substring <code>/extra/data</code>
2435     or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code> behaves
2436     identical to the regex version of <code class="directive">&lt;Location&gt;</code>, and is preferred, for the
2437     simple reason that <code>~</code> is hard to distinguish from
2438     <code>-</code> in many fonts.</p>
2439
2440     <p>The <code class="directive">&lt;Location&gt;</code>
2441     functionality is especially useful when combined with the
2442     <code class="directive"><a href="#sethandler">SetHandler</a></code>
2443     directive. For example, to enable status requests, but allow them
2444     only from browsers at <code>example.com</code>, you might use:</p>
2445
2446     <div class="example"><p><code>
2447       &lt;Location /status&gt;<br />
2448       <span class="indent">
2449         SetHandler server-status<br />
2450         Require host example.com<br />
2451       </span>
2452       &lt;/Location&gt;
2453     </code></p></div>
2454
2455     <div class="note"><h3>Note about / (slash)</h3>
2456       <p>The slash character has special meaning depending on where in a
2457       URL it appears. People may be used to its behavior in the filesystem
2458       where multiple adjacent slashes are frequently collapsed to a single
2459       slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
2460       <code>/home/foo</code>). In URL-space this is not necessarily true.
2461       The <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code>
2462       directive and the regex version of <code class="directive">&lt;Location&gt;</code> require you to explicitly specify multiple
2463       slashes if that is your intention.</p>
2464
2465       <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
2466       the request URL <code>/abc</code> but not the request URL <code>
2467       //abc</code>. The (non-regex) <code class="directive">&lt;Location&gt;</code> directive behaves similarly when used for
2468       proxy requests. But when (non-regex) <code class="directive">&lt;Location&gt;</code> is used for non-proxy requests it will
2469       implicitly match multiple slashes with a single slash. For example,
2470       if you specify <code>&lt;Location /abc/def&gt;</code> and the
2471       request is to <code>/abc//def</code> then it will match.</p>
2472     </div>
2473
2474 <h3>Consulte también</h3>
2475 <ul>
2476 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
2477     and &lt;Files&gt; sections work</a> for an explanation of how these
2478     different sections are combined when a request is received.</li>
2479 <li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li>
2480 </ul>
2481 </div>
2482 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2483 <div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch">&lt;LocationMatch&gt;</a> <a name="locationmatch" id="locationmatch">Directiva</a></h2>
2484 <table class="directive">
2485 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Applies the enclosed directives only to regular-expression
2486 matching URLs</td></tr>
2487 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;LocationMatch
2488     <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</code></td></tr>
2489 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2490 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2491 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2492 </table>
2493     <p>The <code class="directive">&lt;LocationMatch&gt;</code> directive
2494     limits the scope of the enclosed directives by URL, in an identical manner
2495     to <code class="directive"><a href="#location">&lt;Location&gt;</a></code>. However,
2496     it takes a <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular expression</a>
2497     as an argument instead of a simple string. For example:</p>
2498
2499     <div class="example"><p><code>
2500       &lt;LocationMatch "/(extra|special)/data"&gt;
2501     </code></p></div>
2502
2503     <p>would match URLs that contained the substring <code>/extra/data</code>
2504     or <code>/special/data</code>.</p>
2505
2506 <h3>Consulte también</h3>
2507 <ul>
2508 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
2509     and &lt;Files&gt; sections work</a> for an explanation of how these
2510     different sections are combined when a request is received</li>
2511 </ul>
2512 </div>
2513 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2514 <div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directiva</a></h2>
2515 <table class="directive">
2516 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
2517 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LogLevel [<var>module</var>:]<var>level</var>
2518     [<var>module</var>:<var>level</var>] ...
2519 </code></td></tr>
2520 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LogLevel warn</code></td></tr>
2521 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
2522 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2523 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2524 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Per-module and per-directory configuration is available in
2525     Apache HTTP Server 2.3.6 and later</td></tr>
2526 </table>
2527     <p><code class="directive">LogLevel</code> adjusts the verbosity of the
2528     messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
2529     <var>level</var>s are available, in order of decreasing
2530     significance:</p>
2531
2532     <table class="bordered">
2533     
2534       <tr>
2535         <th><strong>Level</strong> </th>
2536
2537         <th><strong>Description</strong> </th>
2538
2539         <th><strong>Example</strong> </th>
2540       </tr>
2541
2542       <tr>
2543         <td><code>emerg</code> </td>
2544
2545         <td>Emergencies - system is unusable.</td>
2546
2547         <td>"Child cannot open lock file. Exiting"</td>
2548       </tr>
2549
2550       <tr>
2551         <td><code>alert</code> </td>
2552
2553         <td>Action must be taken immediately.</td>
2554
2555         <td>"getpwuid: couldn't determine user name from uid"</td>
2556       </tr>
2557
2558       <tr>
2559         <td><code>crit</code> </td>
2560
2561         <td>Critical Conditions.</td>
2562
2563         <td>"socket: Failed to get a socket, exiting child"</td>
2564       </tr>
2565
2566       <tr>
2567         <td><code>error</code> </td>
2568
2569         <td>Error conditions.</td>
2570
2571         <td>"Premature end of script headers"</td>
2572       </tr>
2573
2574       <tr>
2575         <td><code>warn</code> </td>
2576
2577         <td>Warning conditions.</td>
2578
2579         <td>"child process 1234 did not exit, sending another
2580         SIGHUP"</td>
2581       </tr>
2582
2583       <tr>
2584         <td><code>notice</code> </td>
2585
2586         <td>Normal but significant condition.</td>
2587
2588         <td>"httpd: caught SIGBUS, attempting to dump core in
2589         ..."</td>
2590       </tr>
2591
2592       <tr>
2593         <td><code>info</code> </td>
2594
2595         <td>Informational.</td>
2596
2597         <td>"Server seems busy, (you may need to increase
2598         StartServers, or Min/MaxSpareServers)..."</td>
2599       </tr>
2600
2601       <tr>
2602         <td><code>debug</code> </td>
2603
2604         <td>Debug-level messages</td>
2605
2606         <td>"Opening config file ..."</td>
2607       </tr>
2608       <tr>
2609         <td><code>trace1</code> </td>
2610
2611         <td>Trace messages</td>
2612
2613         <td>"proxy: FTP: control connection complete"</td>
2614       </tr>
2615       <tr>
2616         <td><code>trace2</code> </td>
2617
2618         <td>Trace messages</td>
2619
2620         <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td>
2621       </tr>
2622       <tr>
2623         <td><code>trace3</code> </td>
2624
2625         <td>Trace messages</td>
2626
2627         <td>"openssl: Handshake: start"</td>
2628       </tr>
2629       <tr>
2630         <td><code>trace4</code> </td>
2631
2632         <td>Trace messages</td>
2633
2634         <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td>
2635       </tr>
2636       <tr>
2637         <td><code>trace5</code> </td>
2638
2639         <td>Trace messages</td>
2640
2641         <td>"map lookup FAILED: map=rewritemap key=keyname"</td>
2642       </tr>
2643       <tr>
2644         <td><code>trace6</code> </td>
2645
2646         <td>Trace messages</td>
2647
2648         <td>"cache lookup FAILED, forcing new map lookup"</td>
2649       </tr>
2650       <tr>
2651         <td><code>trace7</code> </td>
2652
2653         <td>Trace messages, dumping large amounts of data</td>
2654
2655         <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
2656       </tr>
2657       <tr>
2658         <td><code>trace8</code> </td>
2659
2660         <td>Trace messages, dumping large amounts of data</td>
2661
2662         <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
2663       </tr>
2664     </table>
2665
2666     <p>When a particular level is specified, messages from all
2667     other levels of higher significance will be reported as well.
2668     <em>E.g.</em>, when <code>LogLevel info</code> is specified,
2669     then messages with log levels of <code>notice</code> and
2670     <code>warn</code> will also be posted.</p>
2671
2672     <p>Using a level of at least <code>crit</code> is
2673     recommended.</p>
2674
2675     <p>For example:</p>
2676
2677     <div class="example"><p><code>
2678       LogLevel notice
2679     </code></p></div>
2680
2681     <div class="note"><h3>Note</h3>
2682       <p>When logging to a regular file messages of the level
2683       <code>notice</code> cannot be suppressed and thus are always
2684       logged. However, this doesn't apply when logging is done
2685       using <code>syslog</code>.</p>
2686     </div>
2687
2688     <p>Specifying a level without a module name will reset the level
2689     for all modules to that level.  Specifying a level with a module
2690     name will set the level for that module only. It is possible to
2691     use the module source file name, the module identifier, or the
2692     module identifier with the trailing <code>_module</code> omitted
2693     as module specification. This means the following three specifications
2694     are equivalent:</p>
2695
2696     <div class="example"><p><code>
2697       LogLevel info ssl:warn<br />
2698       LogLevel info mod_ssl.c:warn<br />
2699       LogLevel info ssl_module:warn<br />
2700     </code></p></div>
2701
2702     <p>It is also possible to change the level per directory:</p>
2703
2704     <div class="example"><p><code>
2705         LogLevel info<br />
2706         &lt;Directory /usr/local/apache/htdocs/app&gt;<br />
2707         &nbsp; LogLevel debug<br />
2708         &lt;/Files&gt;
2709     </code></p></div>
2710
2711     <div class="note">
2712         Per directory loglevel configuration only affects messages that are
2713         logged after the request has been parsed and that are associated with
2714         the request. Log messages which are associated with the connection or
2715         the server are not affected.
2716     </div>
2717
2718 </div>
2719 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2720 <div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directiva</a></h2>
2721 <table class="directive">
2722 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Number of requests allowed on a persistent
2723 connection</td></tr>
2724 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
2725 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
2726 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2727 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2728 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2729 </table>
2730     <p>The <code class="directive">MaxKeepAliveRequests</code> directive
2731     limits the number of requests allowed per connection when
2732     <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
2733     set to <code>0</code>, unlimited requests will be allowed. We
2734     recommend that this setting be kept to a high value for maximum
2735     server performance.</p>
2736
2737     <p>For example:</p>
2738
2739     <div class="example"><p><code>
2740       MaxKeepAliveRequests 500
2741     </code></p></div>
2742
2743 </div>
2744 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2745 <div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Directiva</a></h2>
2746 <table class="directive">
2747 <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
2748         resource </td></tr>
2749 <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>
2750 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr>
2751 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
2752 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2753 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2754 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
2755 </table><p>The documentation for this directive has
2756             not been translated yet. Please have a look at the English
2757             version.</p></div>
2758 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2759 <div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Directiva</a></h2>
2760 <table class="directive">
2761 <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
2762         resource </td></tr>
2763 <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>
2764 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRangeReversals 20</code></td></tr>
2765 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
2766 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2767 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2768 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
2769 </table><p>The documentation for this directive has
2770             not been translated yet. Please have a look at the English
2771             version.</p></div>
2772 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2773 <div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Directiva</a></h2>
2774 <table class="directive">
2775 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Number of ranges allowed before returning the complete
2776 resource </td></tr>
2777 <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>
2778 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRanges 200</code></td></tr>
2779 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
2780 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2781 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2782 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
2783 </table><p>The documentation for this directive has
2784             not been translated yet. Please have a look at the English
2785             version.</p></div>
2786 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2787 <div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Directiva</a></h2>
2788 <table class="directive">
2789 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures mutex mechanism and lock file directory for all
2790 or specified mutexes</td></tr>
2791 <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>
2792 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Mutex default</code></td></tr>
2793 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
2794 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2795 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2796 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr>
2797 </table>
2798     <p>The <code class="directive">Mutex</code> directive sets the mechanism,
2799     and optionally the lock file location, that httpd and modules use
2800     to serialize access to resources.  Specify <code>default</code> as
2801     the first argument to change the settings for all mutexes; specify
2802     a mutex name (see table below) as the first argument to override
2803     defaults only for that mutex.</p>
2804
2805     <p>The <code class="directive">Mutex</code> directive is typically used in
2806     the following exceptional situations:</p>
2807
2808     <ul>
2809         <li>change the mutex mechanism when the default mechanism selected
2810         by <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a> has a functional or performance
2811         problem</li>
2812
2813         <li>change the directory used by file-based mutexes when the
2814         default directory does not support locking</li>
2815     </ul>
2816
2817     <div class="note"><h3>Supported modules</h3>
2818     <p>This directive only configures mutexes which have been registered
2819     with the core server using the <code>ap_mutex_register()</code> API.
2820     All modules bundled with httpd support the <code class="directive">Mutex</code>
2821     directive, but third-party modules may not.  Consult the documentation
2822     of the third-party module, which must indicate the mutex name(s) which
2823     can be configured if this directive is supported.</p>
2824     </div>
2825
2826     <p>The following mutex <em>mechanisms</em> are available:</p>
2827     <ul>
2828         <li><code>default | yes</code>
2829         <p>This selects the default locking implementation, as determined by
2830         <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a>.  The default locking implementation can
2831         be displayed by running <code class="program"><a href="../programs/httpd.html">httpd</a></code> with the 
2832         <code>-V</code> option.</p></li>
2833
2834         <li><code>none | no</code>
2835         <p>This effectively disables the mutex, and is only allowed for a
2836         mutex if the module indicates that it is a valid choice.  Consult the
2837         module documentation for more information.</p></li>
2838
2839         <li><code>posixsem</code>
2840         <p>This is a mutex variant based on a Posix semaphore.</p>
2841
2842         <div class="warning"><h3>Warning</h3>
2843         <p>The semaphore ownership is not recovered if a thread in the process
2844         holding the mutex segfaults, resulting in a hang of the web server.</p>
2845         </div>
2846         </li>
2847
2848         <li><code>sysvsem</code>
2849         <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
2850
2851         <div class="warning"><h3>Warning</h3>
2852         <p>It is possible to "leak" SysV semaphores if processes crash 
2853         before the semaphore is removed.</p>
2854         </div>
2855
2856         <div class="warning"><h3>Security</h3>
2857         <p>The semaphore API allows for a denial of service attack by any
2858         CGIs running under the same uid as the webserver (<em>i.e.</em>,
2859         all CGIs, unless you use something like <code class="program"><a href="../programs/suexec.html">suexec</a></code>
2860         or <code>cgiwrapper</code>).</p>
2861         </div>
2862         </li>
2863
2864         <li><code>sem</code>
2865         <p>This selects the "best" available semaphore implementation, choosing
2866         between Posix and SystemV IPC semaphores, in that order.</p></li>
2867
2868         <li><code>pthread</code>
2869         <p>This is a mutex variant based on cross-process Posix thread
2870         mutexes.</p>
2871
2872         <div class="warning"><h3>Warning</h3>
2873         <p>On most systems, if a child process terminates abnormally while
2874         holding a mutex that uses this implementation, the server will deadlock
2875         and stop responding to requests.  When this occurs, the server will
2876         require a manual restart to recover.</p>
2877         <p>Solaris is a notable exception as it provides a mechanism which
2878         usually allows the mutex to be recovered after a child process
2879         terminates abnormally while holding a mutex.</p>
2880         <p>If your system implements the
2881         <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
2882         to use the <code>pthread</code> option safely.</p>
2883         </div>
2884         </li>
2885
2886         <li><code>fcntl:/path/to/mutex</code>
2887         <p>This is a mutex variant where a physical (lock-)file and the 
2888         <code>fcntl()</code> function are used as the mutex.</p>
2889
2890         <div class="warning"><h3>Warning</h3>
2891         <p>When multiple mutexes based on this mechanism are used within
2892         multi-threaded, multi-process environments, deadlock errors (EDEADLK)
2893         can be reported for valid mutex operations if <code>fcntl()</code>
2894         is not thread-aware, such as on Solaris.</p>
2895         </div>
2896         </li>
2897
2898         <li><code>flock:/path/to/mutex</code>
2899         <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
2900         with the exception that the <code>flock()</code> function is used to
2901         provide file locking.</p></li>
2902
2903         <li><code>file:/path/to/mutex</code>
2904         <p>This selects the "best" available file locking implementation,
2905         choosing between <code>fcntl</code> and <code>flock</code>, in that
2906         order.</p></li>
2907     </ul>
2908
2909     <p>Most mechanisms are only available on selected platforms, where the 
2910     underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a> support it.  Mechanisms
2911     which aren't available on all platforms are <em>posixsem</em>,
2912     <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>, 
2913     <em>flock</em>, and <em>file</em>.</p>
2914
2915     <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
2916     the path, if provided, is a directory where the lock file will be created.
2917     The default directory is httpd's run-time file directory relative to
2918     <code class="directive"><a href="#serverroot">ServerRoot</a></code>.  Always use a local disk
2919     filesystem for <code>/path/to/mutex</code> and never a directory residing
2920     on a NFS- or AFS-filesystem.  The basename of the file will be the mutex
2921     type, an optional instance string provided by the module, and unless the
2922     <code>OmitPID</code> keyword is specified, the process id of the httpd 
2923     parent process will be appended to to make the file name unique, avoiding
2924     conflicts when multiple httpd instances share a lock file directory.  For
2925     example, if the mutex name is <code>mpm-accept</code> and the lock file
2926     directory is <code>/var/httpd/locks</code>, the lock file name for the
2927     httpd instance with parent process id 12345 would be 
2928     <code>/var/httpd/locks/mpm-accept.12345</code>.</p>
2929
2930     <div class="warning"><h3>Security</h3>
2931     <p>It is best to <em>avoid</em> putting mutex files in a world-writable
2932     directory such as <code>/var/tmp</code> because someone could create
2933     a denial of service attack and prevent the server from starting by
2934     creating a lockfile with the same name as the one the server will try
2935     to create.</p>
2936     </div>
2937
2938     <p>The following table documents the names of mutexes used by httpd
2939     and bundled modules.</p>
2940
2941     <table class="bordered"><tr class="header">
2942             <th>Mutex name</th>
2943             <th>Module(s)</th>
2944             <th>Protected resource</th>
2945         </tr>
2946 <tr>
2947             <td><code>mpm-accept</code></td>
2948             <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>
2949             <td>incoming connections, to avoid the thundering herd problem;
2950             for more information, refer to the
2951             <a href="../misc/perf-tuning.html">performance tuning</a>
2952             documentation</td>
2953         </tr>
2954 <tr class="odd">
2955             <td><code>authdigest-client</code></td>
2956             <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
2957             <td>client list in shared memory</td>
2958         </tr>
2959 <tr>
2960             <td><code>authdigest-opaque</code></td>
2961             <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
2962             <td>counter in shared memory</td>
2963         </tr>
2964 <tr class="odd">
2965             <td><code>ldap-cache</code></td>
2966             <td><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code></td>
2967             <td>LDAP result cache</td>
2968         </tr>
2969 <tr>
2970             <td><code>rewrite-map</code></td>
2971             <td><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></td>
2972             <td>communication with external mapping programs, to avoid
2973             intermixed I/O from multiple requests</td>
2974         </tr>
2975 <tr class="odd">
2976             <td><code>ssl-cache</code></td>
2977             <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td>
2978             <td>SSL session cache</td>
2979         </tr>
2980 <tr>
2981             <td><code>ssl-stapling</code></td>
2982             <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td>
2983             <td>OCSP stapling response cache</td>
2984         </tr>
2985 <tr class="odd">
2986             <td><code>watchdog-callback</code></td>
2987             <td><code class="module"><a href="../mod/mod_watchdog.html">mod_watchdog</a></code></td>
2988             <td>callback function of a particular client module</td>
2989         </tr>
2990 </table>
2991
2992     <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
2993     parent process id from the lock file name.</p>
2994
2995     <p>In the following example, the mutex mechanism for the MPM accept
2996     mutex will be changed from the compiled-in default to <code>fcntl</code>,
2997     with the associated lock file created in directory
2998     <code>/var/httpd/locks</code>.  The mutex mechanism for all other mutexes
2999     will be changed from the compiled-in default to <code>sysvsem</code>.</p>
3000
3001     <div class="example"><p><code>
3002     Mutex default sysvsem<br />
3003     Mutex mpm-accept fcntl:/var/httpd/locks
3004     </code></p></div>
3005
3006 </div>
3007 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3008 <div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directiva</a></h2>
3009 <table class="directive">
3010 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Designates an IP address for name-virtual
3011 hosting</td></tr>
3012 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
3013 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3014 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3015 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3016 </table>
3017
3018 <p>A single <code class="directive">NameVirtualHost</code> directive 
3019 identifies a set of identical virtual hosts on which the server will  
3020 further select from on the basis of the <em>hostname</em> 
3021 requested by the client.  The <code class="directive">NameVirtualHost</code>
3022 directive is a required directive if you want to configure 
3023 <a href="../vhosts/">name-based virtual hosts</a>.</p>
3024
3025 <p>This directive, and the corresponding <code class="directive">VirtualHost</code>,
3026 <em>must</em> be qualified with a port number if the server supports both HTTP 
3027 and HTTPS connections.</p>
3028
3029 <p>Although <var>addr</var> can be a hostname, it is recommended
3030 that you always use an IP address or a wildcard.  A wildcard
3031 NameVirtualHost matches only virtualhosts that also have a literal wildcard
3032 as their argument.</p>
3033
3034 <p>In cases where a firewall or other proxy receives the requests and 
3035 forwards them on a different IP address to the server, you must specify the
3036 IP address of the physical interface on the machine which will be
3037 servicing the requests. </p>
3038
3039 <p> In the example below, requests received on interface 192.0.2.1 and port 80 
3040 will only select among the first two virtual hosts. Requests received on
3041 port 80 on any other interface will only select among the third and fourth
3042 virtual hosts. In the common case where the interface isn't important 
3043 to the mapping, only the "*:80" NameVirtualHost and VirtualHost directives 
3044 are necessary.</p>
3045
3046    <div class="example"><p><code>
3047       NameVirtualHost 192.0.2.1:80<br />
3048       NameVirtualHost *:80<br /><br />
3049
3050       &lt;VirtualHost 192.0.2.1:80&gt;<br />
3051       &nbsp; ServerName namebased-a.example.com<br />
3052       &lt;/VirtualHost&gt;<br />
3053       <br />
3054       &lt;VirtualHost 192.0.2.1:80&gt;<br />
3055       &nbsp; Servername namebased-b.example.com<br />
3056       &lt;/VirtualHost&gt;<br />
3057       <br />
3058       &lt;VirtualHost *:80&gt;<br />
3059       &nbsp; ServerName namebased-c.example.com <br />
3060       &lt;/VirtualHost&gt;<br />
3061       <br />
3062       &lt;VirtualHost *:80&gt;<br />
3063       &nbsp; ServerName namebased-d.example.com <br />
3064       &lt;/VirtualHost&gt;<br />
3065       <br />
3066
3067     </code></p></div>
3068
3069     <p>If no matching virtual host is found, then the first listed
3070     virtual host that matches the IP address and port will be used.</p>
3071
3072
3073     <p>IPv6 addresses must be enclosed in square brackets, as shown
3074     in the following example:</p>
3075
3076     <div class="example"><p><code>
3077       NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
3078     </code></p></div>
3079
3080     <div class="note"><h3>Argument to <code class="directive">&lt;VirtualHost&gt;</code>
3081       directive</h3>
3082       <p>Note that the argument to the <code class="directive">&lt;VirtualHost&gt;</code> directive must
3083       exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
3084
3085       <div class="example"><p><code>
3086         NameVirtualHost 192.0.2.2:80<br />
3087         &lt;VirtualHost 192.0.2.2:80&gt;<br />
3088         # ...<br />
3089         &lt;/VirtualHost&gt;<br />
3090       </code></p></div>
3091     </div>
3092
3093 <h3>Consulte también</h3>
3094 <ul>
3095 <li><a href="../vhosts/">Virtual Hosts
3096 documentation</a></li>
3097 </ul>
3098 </div>
3099 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3100 <div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directiva</a></h2>
3101 <table class="directive">
3102 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures what features are available in a particular
3103 directory</td></tr>
3104 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Options
3105     [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
3106 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Options All</code></td></tr>
3107 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3108 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>Options</td></tr>
3109 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3110 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3111 </table>
3112     <p>The <code class="directive">Options</code> directive controls which
3113     server features are available in a particular directory.</p>
3114
3115     <p><var>option</var> can be set to <code>None</code>, in which
3116     case none of the extra features are enabled, or one or more of
3117     the following:</p>
3118
3119     <dl>
3120       <dt><code>All</code></dt>
3121
3122       <dd>All options except for <code>MultiViews</code>. This is the default
3123       setting.</dd>
3124
3125       <dt><code>ExecCGI</code></dt>
3126
3127       <dd>
3128       Execution of CGI scripts using <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>
3129       is permitted.</dd>
3130
3131       <dt><code>FollowSymLinks</code></dt>
3132
3133       <dd>
3134
3135       The server will follow symbolic links in this directory.
3136       <div class="note">
3137       <p>Even though the server follows the symlink it does <em>not</em>
3138       change the pathname used to match against <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections.</p>
3139       <p>Note also, that this option <strong>gets ignored</strong> if set
3140       inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
3141       section.</p>
3142       <p>Omitting this option should not be considered a security restriction,
3143       since symlink testing is subject to race conditions that make it
3144       circumventable.</p>
3145       </div></dd>
3146
3147       <dt><code>Includes</code></dt>
3148
3149       <dd>
3150       Server-side includes provided by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
3151       are permitted.</dd>
3152
3153       <dt><code>IncludesNOEXEC</code></dt>
3154
3155       <dd>
3156
3157       Server-side includes are permitted, but the <code>#exec
3158       cmd</code> and <code>#exec cgi</code> are disabled. It is still
3159       possible to <code>#include virtual</code> CGI scripts from
3160       <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
3161       directories.</dd>
3162
3163       <dt><code>Indexes</code></dt>
3164
3165       <dd>
3166       If a URL which maps to a directory is requested, and there
3167       is no <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
3168       (<em>e.g.</em>, <code>index.html</code>) in that directory, then
3169       <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
3170       of the directory.</dd>
3171
3172       <dt><code>MultiViews</code></dt>
3173
3174       <dd>
3175       <a href="../content-negotiation.html">Content negotiated</a>
3176       "MultiViews" are allowed using
3177       <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>.
3178       <div class="note"><h3>Note</h3> <p>This option gets ignored if set
3179       anywhere other than <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, as <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>
3180       needs real resources to compare against and evaluate from.</p></div>
3181       </dd>
3182
3183       <dt><code>SymLinksIfOwnerMatch</code></dt>
3184
3185       <dd>The server will only follow symbolic links for which the
3186       target file or directory is owned by the same user id as the
3187       link.
3188
3189       <div class="note"><h3>Note</h3> <p>This option gets ignored if
3190       set inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code> section.</p>
3191       <p>This option should not be considered a security restriction,
3192       since symlink testing is subject to race conditions that make it
3193       circumventable.</p></div>
3194       </dd>
3195     </dl>
3196
3197     <p>Normally, if multiple <code class="directive">Options</code> could
3198     apply to a directory, then the most specific one is used and
3199     others are ignored; the options are not merged. (See <a href="../sections.html#mergin">how sections are merged</a>.)
3200     However if <em>all</em> the options on the
3201     <code class="directive">Options</code> directive are preceded by a
3202     <code>+</code> or <code>-</code> symbol, the options are
3203     merged. Any options preceded by a <code>+</code> are added to the
3204     options currently in force, and any options preceded by a
3205     <code>-</code> are removed from the options currently in
3206     force. </p>
3207
3208     <div class="warning"><h3>Warning</h3>
3209     <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
3210     <code>-</code> with those without is not valid syntax, and is likely
3211     to cause unexpected results.</p>
3212     </div>
3213
3214     <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
3215
3216     <div class="example"><p><code>
3217       &lt;Directory /web/docs&gt;<br />
3218       <span class="indent">
3219         Options Indexes FollowSymLinks<br />
3220       </span>
3221       &lt;/Directory&gt;<br />
3222       <br />
3223       &lt;Directory /web/docs/spec&gt;<br />
3224       <span class="indent">
3225         Options Includes<br />
3226       </span>
3227       &lt;/Directory&gt;
3228     </code></p></div>
3229
3230     <p>then only <code>Includes</code> will be set for the
3231     <code>/web/docs/spec</code> directory. However if the second
3232     <code class="directive">Options</code> directive uses the <code>+</code> and
3233     <code>-</code> symbols:</p>
3234
3235     <div class="example"><p><code>
3236       &lt;Directory /web/docs&gt;<br />
3237       <span class="indent">
3238         Options Indexes FollowSymLinks<br />
3239       </span>
3240       &lt;/Directory&gt;<br />
3241       <br />
3242       &lt;Directory /web/docs/spec&gt;<br />
3243       <span class="indent">
3244         Options +Includes -Indexes<br />
3245       </span>
3246       &lt;/Directory&gt;
3247     </code></p></div>
3248
3249     <p>then the options <code>FollowSymLinks</code> and
3250     <code>Includes</code> are set for the <code>/web/docs/spec</code>
3251     directory.</p>
3252
3253     <div class="note"><h3>Note</h3>
3254       <p>Using <code>-IncludesNOEXEC</code> or
3255       <code>-Includes</code> disables server-side includes completely
3256       regardless of the previous setting.</p>
3257     </div>
3258
3259     <p>The default in the absence of any other settings is
3260     <code>All</code>.</p>
3261
3262 </div>
3263 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3264 <div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">Directiva</a></h2>
3265 <table class="directive">
3266 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Protocol for a listening socket</td></tr>
3267 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Protocol <var>protocol</var></code></td></tr>
3268 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
3269 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3270 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3271 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache 2.1.5 and later.
3272 On Windows from Apache 2.3.3 and later.</td></tr>
3273 </table>
3274     <p>This directive specifies the protocol used for a specific listening socket.
3275        The protocol is used to determine which module should handle a request, and
3276        to apply protocol specific optimizations with the <code class="directive">AcceptFilter</code>
3277        directive.</p>
3278
3279     <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>
3280
3281     <p>For example, if you are running <code>https</code> on a non-standard port, specify the protocol explicitly:</p>
3282
3283     <div class="example"><p><code>
3284       Protocol https
3285     </code></p></div>
3286
3287     <p>You can also specify the protocol using the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive.</p>
3288
3289 <h3>Consulte también</h3>
3290 <ul>
3291 <li><code class="directive">AcceptFilter</code></li>
3292 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
3293 </ul>
3294 </div>
3295 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3296 <div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directiva</a></h2>
3297 <table class="directive">
3298 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the CPU consumption of processes launched
3299 by Apache httpd children</td></tr>
3300 <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>
3301 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3302 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3303 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
3304 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3305 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3306 </table>
3307     <p>Takes 1 or 2 parameters. The first parameter sets the soft
3308     resource limit for all processes and the second parameter sets
3309     the maximum resource limit. Either parameter can be a number,
3310     or <code>max</code> to indicate to the server that the limit should
3311     be set to the maximum allowed by the operating system
3312     configuration. Raising the maximum resource limit requires that
3313     the server is running as <code>root</code>, or in the initial startup
3314     phase.</p>
3315
3316     <p>This applies to processes forked off from Apache httpd children
3317     servicing requests, not the Apache httpd children themselves. This
3318     includes CGI scripts and SSI exec commands, but not any
3319     processes forked off from the Apache httpd parent such as piped
3320     logs.</p>
3321
3322     <p>CPU resource limits are expressed in seconds per
3323     process.</p>
3324
3325 <h3>Consulte también</h3>
3326 <ul>
3327 <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
3328 <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
3329 </ul>
3330 </div>
3331 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3332 <div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directiva</a></h2>
3333 <table class="directive">
3334 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the memory consumption of processes launched
3335 by Apache httpd children</td></tr>
3336 <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>
3337 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3338 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3339 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
3340 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3341 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3342 </table>
3343     <p>Takes 1 or 2 parameters. The first parameter sets the soft
3344     resource limit for all processes and the second parameter sets
3345     the maximum resource limit. Either parameter can be a number,
3346     or <code>max</code> to indicate to the server that the limit should
3347     be set to the maximum allowed by the operating system
3348     configuration. Raising the maximum resource limit requires that
3349     the server is running as <code>root</code>, or in the initial startup
3350     phase.</p>
3351
3352     <p>This applies to processes forked off from Apache httpd children
3353     servicing requests, not the Apache httpd children themselves. This
3354     includes CGI scripts and SSI exec commands, but not any
3355     processes forked off from the Apache httpd parent such as piped
3356     logs.</p>
3357
3358     <p>Memory resource limits are expressed in bytes per
3359     process.</p>
3360
3361 <h3>Consulte también</h3>
3362 <ul>
3363 <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
3364 <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
3365 </ul>
3366 </div>
3367 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3368 <div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directiva</a></h2>
3369 <table class="directive">
3370 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the number of processes that can be launched by
3371 processes launched by Apache httpd children</td></tr>
3372 <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>
3373 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3374 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3375 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
3376 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3377 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3378 </table>
3379     <p>Takes 1 or 2 parameters. The first parameter sets the soft
3380     resource limit for all processes and the second parameter sets
3381     the maximum resource limit. Either parameter can be a number,
3382     or <code>max</code> to indicate to the server that the limit
3383     should be set to the maximum allowed by the operating system
3384     configuration. Raising the maximum resource limit requires that
3385     the server is running as <code>root</code>, or in the initial startup
3386     phase.</p>
3387
3388     <p>This applies to processes forked off from Apache httpd children
3389     servicing requests, not the Apache httpd children themselves. This
3390     includes CGI scripts and SSI exec commands, but not any
3391     processes forked off from the Apache httpd parent such as piped
3392     logs.</p>
3393
3394     <p>Process limits control the number of processes per user.</p>
3395
3396     <div class="note"><h3>Note</h3>
3397       <p>If CGI processes are <strong>not</strong> running
3398       under user ids other than the web server user id, this directive
3399       will limit the number of processes that the server itself can
3400       create. Evidence of this situation will be indicated by
3401       <strong><code>cannot fork</code></strong> messages in the
3402       <code>error_log</code>.</p>
3403     </div>
3404
3405 <h3>Consulte también</h3>
3406 <ul>
3407 <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
3408 <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
3409 </ul>
3410 </div>
3411 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3412 <div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directiva</a></h2>
3413 <table class="directive">
3414 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Technique for locating the interpreter for CGI
3415 scripts</td></tr>
3416 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
3417 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
3418 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3419 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
3420 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3421 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3422 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Win32 only;
3423 option <code>Registry-Strict</code> is available in Apache HTTP Server 2.0 and
3424 later</td></tr>
3425 </table>
3426     <p>This directive is used to control how Apache httpd finds the
3427     interpreter used to run CGI scripts. The default setting is
3428     <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
3429     by the shebang line (first line, starting with <code>#!</code>) in the
3430     script. On Win32 systems this line usually looks like:</p>
3431
3432     <div class="example"><p><code>
3433       #!C:/Perl/bin/perl.exe
3434     </code></p></div>
3435
3436     <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
3437
3438     <div class="example"><p><code>
3439       #!perl
3440     </code></p></div>
3441
3442     <p>Setting <code>ScriptInterpreterSource Registry</code> will
3443     cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
3444     searched using the script file extension (e.g., <code>.pl</code>) as a
3445     search key. The command defined by the registry subkey
3446     <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
3447     <code>Shell\Open\Command</code> is used to open the script file. If the
3448     registry keys cannot be found, Apache httpd falls back to the behavior of the
3449     <code>Script</code> option.</p>
3450
3451     <div class="warning"><h3>Security</h3>
3452     <p>Be careful when using <code>ScriptInterpreterSource
3453     Registry</code> with <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
3454     Apache httpd will try to execute <strong>every</strong> file within this
3455     directory. The <code>Registry</code> setting may cause undesired
3456     program calls on files which are typically not executed. For
3457     example, the default open command on <code>.htm</code> files on
3458     most Windows systems will execute Microsoft Internet Explorer, so
3459     any HTTP request for an <code>.htm</code> file existing within the
3460     script directory would start the browser in the background on the
3461     server. This is a good way to crash your system within a minute or
3462     so.</p>
3463     </div>
3464
3465     <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
3466     2.0 does the same thing as <code>Registry</code> but uses only the
3467     subkey <code>Shell\ExecCGI\Command</code>. The
3468     <code>ExecCGI</code> key is not a common one. It must be
3469     configured manually in the windows registry and hence prevents
3470     accidental program calls on your system.</p>
3471
3472 </div>
3473 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3474 <div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">Directiva</a></h2>
3475 <table class="directive">
3476 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determine if mod_status displays the first 63 characters
3477 of a request or the last 63, assuming the request itself is greater than
3478 63 chars.</td></tr>
3479 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SeeRequestTail On|Off</code></td></tr>
3480 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>SeeRequestTail Off</code></td></tr>
3481 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3482 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3483 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3484 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.2.7 and later.</td></tr>
3485 </table>
3486     <p>mod_status with <code>ExtendedStatus On</code>
3487     displays the actual request being handled. 
3488     For historical purposes, only 63 characters of the request
3489     are actually stored for display purposes. This directive
3490     controls whether the 1st 63 characters are stored (the previous
3491     behavior and the default) or if the last 63 characters are. This
3492     is only applicable, of course, if the length of the request is
3493     64 characters or greater.</p>
3494
3495     <p>If Apache httpd is handling <code>GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</code> mod_status displays as follows:
3496     </p>
3497
3498     <table class="bordered">
3499       <tr>
3500         <th>Off (default)</th>
3501         <td>GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
3502       </tr>
3503       <tr>
3504         <th>On</th>
3505         <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</td>
3506       </tr>
3507     </table>
3508
3509
3510 </div>
3511 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3512 <div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directiva</a></h2>
3513 <table class="directive">
3514 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Email address that the server includes in error
3515 messages sent to the client</td></tr>
3516 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr>
3517 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
3518 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3519 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3520 </table>
3521     <p>The <code class="directive">ServerAdmin</code> sets the contact address
3522     that the server includes in any error messages it returns to the
3523     client. If the <code>httpd</code> doesn't recognize the supplied argument
3524     as an URL, it
3525     assumes, that it's an <var>email-address</var> and prepends it with
3526     <code>mailto:</code> in hyperlink targets. However, it's recommended to
3527     actually use an email address, since there are a lot of CGI scripts that
3528     make that assumption. If you want to use an URL, it should point to another
3529     server under your control. Otherwise users may not be able to contact you in
3530     case of errors.</p>
3531
3532     <p>It may be worth setting up a dedicated address for this, e.g.</p>
3533
3534     <div class="example"><p><code>
3535       ServerAdmin www-admin@foo.example.com
3536     </code></p></div>
3537     <p>as users do not always mention that they are talking about the
3538     server!</p>
3539
3540 </div>
3541 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3542 <div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directiva</a></h2>
3543 <table class="directive">
3544 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Alternate names for a host used when matching requests
3545 to name-virtual hosts</td></tr>
3546 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
3547 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>virtual host</td></tr>
3548 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3549 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3550 </table>
3551     <p>The <code class="directive">ServerAlias</code> directive sets the
3552     alternate names for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>. The
3553     <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
3554
3555     <div class="example"><p><code>
3556       &lt;VirtualHost *:80&gt;<br />
3557       ServerName server.domain.com<br />
3558       ServerAlias server server2.domain.com server2<br />
3559       ServerAlias *.example.com<br />
3560       UseCanonicalName Off<br />
3561       # ...<br />
3562       &lt;/VirtualHost&gt;
3563     </code></p></div>
3564
3565 <h3>Consulte también</h3>
3566 <ul>
3567 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
3568 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
3569 </ul>
3570 </div>
3571 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3572 <div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directiva</a></h2>
3573 <table class="directive">
3574 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Hostname and port that the server uses to identify
3575 itself</td></tr>
3576 <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>
3577 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
3578 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3579 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3580 </table>
3581     <p>The <code class="directive">ServerName</code> directive sets the
3582     request scheme, hostname and
3583     port that the server uses to identify itself.  This is used when
3584     creating redirection URLs.</p>
3585
3586     <p>Additionally, <code class="directive">ServerName</code> is used (possibly
3587     in conjunction with <code class="directive">ServerAlias</code>) to uniquely
3588     identify a virtual host, when using <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p>
3589     
3590     <p>For example, if the name of the
3591     machine hosting the web server is <code>simple.example.com</code>,
3592     but the machine also has the DNS alias <code>www.example.com</code>
3593     and you wish the web server to be so identified, the following
3594     directive should be used:</p>
3595
3596     <div class="example"><p><code>
3597       ServerName www.example.com:80
3598     </code></p></div>
3599
3600     <p>The <code class="directive">ServerName</code> directive
3601     may appear anywhere within the definition of a server. However,
3602     each appearance overrides the previous appearance (within that
3603     server).</p>
3604
3605     <p>If no <code class="directive">ServerName</code> is specified, then the
3606     server attempts to deduce the hostname by performing a reverse
3607     lookup on the IP address. If no port is specified in the
3608     <code class="directive">ServerName</code>, then the server will use the
3609     port from the incoming request. For optimal reliability and
3610     predictability, you should specify an explicit hostname and port
3611     using the <code class="directive">ServerName</code> directive.</p>
3612
3613     <p>If you are using <a href="../vhosts/name-based.html">name-based virtual hosts</a>,
3614     the <code class="directive">ServerName</code> inside a
3615     <code class="directive"><a href="#virtualhost">&lt;VirtualHost&gt;</a></code>
3616     section specifies what hostname must appear in the request's
3617     <code>Host:</code> header to match this virtual host.</p>
3618
3619     <p>Sometimes, the server runs behind a device that processes SSL,
3620     such as a reverse proxy, load balancer or SSL offload
3621     appliance. When this is the case, specify the
3622     <code>https://</code> scheme and the port number to which the
3623     clients connect in the <code class="directive">ServerName</code> directive
3624     to make sure that the server generates the correct
3625     self-referential URLs. 
3626     </p>
3627
3628     <p>See the description of the
3629     <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
3630     <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for
3631     settings which determine whether self-referential URLs (e.g., by the
3632     <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> module) will refer to the
3633     specified port, or to the port number given in the client's request.
3634     </p>
3635
3636     <div class="warning">
3637     <p>Failure to set <code class="directive">ServerName</code> to a name that
3638     your server can resolve to an IP address will result in a startup
3639     warning. <code>httpd</code> will then use whatever hostname it can
3640     determine, using the system's <code>hostname</code> command. This
3641     will almost never be the hostname you actually want.</p>
3642     <div class="example"><p><code>
3643     httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName
3644     </code></p></div>
3645     </div>
3646
3647
3648 <h3>Consulte también</h3>
3649 <ul>
3650 <li><a href="../dns-caveats.html">Issues Regarding DNS and
3651     Apache HTTP Server</a></li>
3652 <li><a href="../vhosts/">Apache HTTP Server virtual host
3653     documentation</a></li>
3654 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
3655 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
3656 <li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li>
3657 <li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
3658 </ul>
3659 </div>
3660 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3661 <div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directiva</a></h2>
3662 <table class="directive">
3663 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Legacy URL pathname for a name-based virtual host that
3664 is accessed by an incompatible browser</td></tr>
3665 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
3666 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>virtual host</td></tr>
3667 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3668 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3669 </table>
3670     <p>The <code class="directive">ServerPath</code> directive sets the legacy
3671     URL pathname for a host, for use with <a href="../vhosts/">name-based virtual hosts</a>.</p>
3672
3673 <h3>Consulte también</h3>
3674 <ul>
3675 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
3676 </ul>
3677 </div>
3678 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3679 <div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directiva</a></h2>
3680 <table class="directive">
3681 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Base directory for the server installation</td></tr>
3682 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
3683 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
3684 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3685 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3686 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3687 </table>
3688     <p>The <code class="directive">ServerRoot</code> directive sets the
3689     directory in which the server lives. Typically it will contain the
3690     subdirectories <code>conf/</code> and <code>logs/</code>. Relative
3691     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 
3692     relative to this directory.</p>
3693
3694     <div class="example"><h3>Example</h3><p><code>
3695       ServerRoot /home/httpd
3696     </code></p></div>
3697
3698
3699 <h3>Consulte también</h3>
3700 <ul>
3701 <li><a href="../invoking.html">the <code>-d</code>
3702     option to <code>httpd</code></a></li>
3703 <li><a href="../misc/security_tips.html#serverroot">the
3704     security tips</a> for information on how to properly set
3705     permissions on the <code class="directive">ServerRoot</code></li>
3706 </ul>
3707 </div>
3708 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3709 <div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directiva</a></h2>
3710 <table class="directive">
3711 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures the footer on server-generated documents</td></tr>
3712 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr>
3713 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerSignature Off</code></td></tr>
3714 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3715 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
3716 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3717 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3718 </table>
3719     <p>The <code class="directive">ServerSignature</code> directive allows the
3720     configuration of a trailing footer line under server-generated
3721     documents (error messages, <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> ftp directory
3722     listings, <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
3723     would want to enable such a footer line is that in a chain of proxies,
3724     the user often has no possibility to tell which of the chained servers
3725     actually produced a returned error message.</p>
3726
3727     <p>The <code>Off</code>
3728     setting, which is the default, suppresses the footer line (and is
3729     therefore compatible with the behavior of Apache-1.2 and
3730     below). The <code>On</code> setting simply adds a line with the
3731     server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
3732     and the <code>EMail</code> setting additionally creates a
3733     "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
3734     document.</p>
3735
3736     <p>After version 2.0.44, the details of the server version number
3737     presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p>
3738
3739 <h3>Consulte también</h3>
3740 <ul>
3741 <li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
3742 </ul>
3743 </div>
3744 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3745 <div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directiva</a></h2>
3746 <table class="directive">
3747 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures the <code>Server</code> HTTP response
3748 header</td></tr>
3749 <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>
3750 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerTokens Full</code></td></tr>
3751 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3752 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3753 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3754 </table>
3755     <p>This directive controls whether <code>Server</code> response
3756     header field which is sent back to clients includes a
3757     description of the generic OS-type of the server as well as
3758     information about compiled-in modules.</p>
3759
3760     <dl>
3761       <dt><code>ServerTokens Full</code> (or not specified)</dt>
3762
3763       <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
3764       (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
3765
3766       <dt><code>ServerTokens Prod[uctOnly]</code></dt>
3767
3768       <dd>Server sends (<em>e.g.</em>): <code>Server:
3769       Apache</code></dd>
3770
3771       <dt><code>ServerTokens Major</code></dt>
3772
3773       <dd>Server sends (<em>e.g.</em>): <code>Server:
3774       Apache/2</code></dd>
3775
3776       <dt><code>ServerTokens Minor</code></dt>
3777
3778       <dd>Server sends (<em>e.g.</em>): <code>Server:
3779       Apache/2.4</code></dd>
3780
3781       <dt><code>ServerTokens Min[imal]</code></dt>
3782
3783       <dd>Server sends (<em>e.g.</em>): <code>Server:
3784       Apache/2.4.1</code></dd>
3785
3786       <dt><code>ServerTokens OS</code></dt>
3787
3788       <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
3789       (Unix)</code></dd>
3790
3791     </dl>
3792
3793     <p>This setting applies to the entire server, and cannot be
3794     enabled or disabled on a virtualhost-by-virtualhost basis.</p>
3795
3796     <p>After version 2.0.44, this directive also controls the
3797     information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
3798     
3799     <div class="note">Setting <code class="directive">ServerTokens</code> to less than
3800     <code>minimal</code> is not recommended because it makes it more
3801     difficult to debug interoperational problems. Also note that
3802     disabling the Server: header does nothing at all to make your
3803     server more secure; the idea of "security through obscurity"
3804     is a myth and leads to a false sense of safety.</div>
3805
3806
3807 <h3>Consulte también</h3>
3808 <ul>
3809 <li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
3810 </ul>
3811 </div>
3812 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3813 <div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directiva</a></h2>
3814 <table class="directive">
3815 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Forces all matching files to be processed by a
3816 handler</td></tr>
3817 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr>
3818 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3819 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
3820 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3821 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3822 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Moved into the core in Apache httpd 2.0</td></tr>
3823 </table>
3824     <p>When placed into an <code>.htaccess</code> file or a
3825     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> or
3826     <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
3827     section, this directive forces all matching files to be parsed
3828     through the <a href="../handler.html">handler</a> given by
3829     <var>handler-name</var>. For example, if you had a directory you
3830     wanted to be parsed entirely as imagemap rule files, regardless
3831     of extension, you might put the following into an
3832     <code>.htaccess</code> file in that directory:</p>
3833
3834     <div class="example"><p><code>
3835       SetHandler imap-file
3836     </code></p></div>
3837
3838     <p>Another example: if you wanted to have the server display a
3839     status report whenever a URL of
3840     <code>http://servername/status</code> was called, you might put
3841     the following into <code>httpd.conf</code>:</p>
3842
3843     <div class="example"><p><code>
3844       &lt;Location /status&gt;<br />
3845       <span class="indent">
3846         SetHandler server-status<br />
3847       </span>
3848       &lt;/Location&gt;
3849     </code></p></div>
3850
3851     <p>You can override an earlier defined <code class="directive">SetHandler</code>
3852     directive by using the value <code>None</code>.</p>
3853     <p><strong>Note:</strong> because SetHandler overrides default handlers,
3854     normal behaviour such as handling of URLs ending in a slash (/) as
3855     directories or index files is suppressed.</p>
3856
3857 <h3>Consulte también</h3>
3858 <ul>
3859 <li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li>
3860 </ul>
3861 </div>
3862 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3863 <div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directiva</a></h2>
3864 <table class="directive">
3865 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Sets the filters that will process client requests and POST
3866 input</td></tr>
3867 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
3868 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3869 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
3870 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3871 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3872 </table>
3873     <p>The <code class="directive">SetInputFilter</code> directive sets the
3874     filter or filters which will process client requests and POST
3875     input when they are received by the server. This is in addition to
3876     any filters defined elsewhere, including the
3877     <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
3878     directive.</p>
3879
3880     <p>If more than one filter is specified, they must be separated
3881     by semicolons in the order in which they should process the
3882     content.</p>
3883
3884 <h3>Consulte también</h3>
3885 <ul>
3886 <li><a href="../filter.html">Filters</a> documentation</li>
3887 </ul>
3888 </div>
3889 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3890 <div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directiva</a></h2>
3891 <table class="directive">
3892 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Sets the filters that will process responses from the
3893 server</td></tr>
3894 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
3895 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3896 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
3897 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3898 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3899 </table>
3900     <p>The <code class="directive">SetOutputFilter</code> directive sets the filters
3901     which will process responses from the server before they are
3902     sent to the client. This is in addition to any filters defined
3903     elsewhere, including the
3904     <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
3905     directive.</p>
3906
3907     <p>For example, the following configuration will process all files
3908     in the <code>/www/data/</code> directory for server-side
3909     includes.</p>
3910
3911     <div class="example"><p><code>
3912       &lt;Directory /www/data/&gt;<br />
3913       <span class="indent">
3914         SetOutputFilter INCLUDES<br />
3915       </span>
3916       &lt;/Directory&gt;
3917     </code></p></div>
3918
3919     <p>If more than one filter is specified, they must be separated
3920     by semicolons in the order in which they should process the
3921     content.</p>
3922
3923 <h3>Consulte también</h3>
3924 <ul>
3925 <li><a href="../filter.html">Filters</a> documentation</li>
3926 </ul>
3927 </div>
3928 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3929 <div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directiva</a></h2>
3930 <table class="directive">
3931 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Amount of time the server will wait for
3932 certain events before failing a request</td></tr>
3933 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
3934 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>TimeOut 300</code></td></tr>
3935 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
3936 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3937 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3938 </table>
3939     <p>The <code class="directive">TimeOut</code> directive defines the length
3940     of time Apache httpd will wait for I/O in various circumstances:</p>
3941
3942     <ol>
3943       <li>When reading data from the client, the length of time to
3944       wait for a TCP packet to arrive if the read buffer is
3945       empty.</li>
3946
3947       <li>When writing data to the client, the length of time to wait
3948       for an acknowledgement of a packet if the send buffer is
3949       full.</li>
3950
3951       <li>In <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, the length of time to wait for
3952       output from a CGI script.</li>
3953
3954       <li>In <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to
3955       wait for output from a filtering process.</li>
3956
3957       <li>In <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if
3958       <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not
3959       configured.</li>
3960     </ol>
3961
3962
3963 </div>
3964 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3965 <div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directiva</a></h2>
3966 <table class="directive">
3967 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determines the behaviour on <code>TRACE</code> requests</td></tr>
3968 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
3969 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>TraceEnable on</code></td></tr>
3970 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3971 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3972 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3973 <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>
3974 </table>
3975     <p>This directive overrides the behavior of <code>TRACE</code> for both
3976     the core server and <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>.  The default
3977     <code>TraceEnable on</code> permits <code>TRACE</code> requests per
3978     RFC 2616, which disallows any request body to accompany the request.
3979     <code>TraceEnable off</code> causes the core server and
3980     <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
3981     allowed) error to the client.</p>
3982
3983     <p>Finally, for testing and diagnostic purposes only, request
3984     bodies may be allowed using the non-compliant <code>TraceEnable 
3985     extended</code> directive.  The core (as an origin server) will
3986     restrict the request body to 64k (plus 8k for chunk headers if
3987     <code>Transfer-Encoding: chunked</code> is used).  The core will
3988     reflect the full headers and all chunk headers with the response
3989     body.  As a proxy server, the request body is not restricted to 64k.</p>
3990
3991 </div>
3992 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3993 <div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Directiva</a></h2>
3994 <table class="directive">
3995 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Undefine the existence of a variable</td></tr>
3996 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr>
3997 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3998 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3999 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4000 </table>
4001     <p>Undoes the effect of a <code class="directive"><a href="#define">Define</a></code> or
4002     of passing a <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p>
4003     <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine">&lt;IfDefine&gt;</a></code> sections without needing to alter
4004     <code>-D</code> arguments in any startup scripts.</p>
4005
4006 </div>
4007 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4008 <div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directiva</a></h2>
4009 <table class="directive">
4010 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures how the server determines its own name and
4011 port</td></tr>
4012 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
4013 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>UseCanonicalName Off</code></td></tr>
4014 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
4015 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4016 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4017 </table>
4018     <p>In many situations Apache httpd must construct a <em>self-referential</em>
4019     URL -- that is, a URL that refers back to the same server. With
4020     <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
4021     specified in the <code class="directive"><a href="#servername">ServerName</a></code>
4022     directive to construct the canonical name for the server. This name
4023     is used in all self-referential URLs, and for the values of
4024     <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
4025
4026     <p>With <code>UseCanonicalName Off</code> Apache httpd will form
4027     self-referential URLs using the hostname and port supplied by
4028     the client if any are supplied (otherwise it will use the
4029     canonical name, as defined above). These values are the same
4030     that are used to implement <a href="../vhosts/name-based.html">name-based virtual hosts</a>,
4031     and are available with the same clients. The CGI variables
4032     <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
4033     constructed from the client supplied values as well.</p>
4034
4035     <p>An example where this may be useful is on an intranet server
4036     where you have users connecting to the machine using short
4037     names such as <code>www</code>. You'll notice that if the users
4038     type a shortname, and a URL which is a directory, such as
4039     <code>http://www/splat</code>, <em>without the trailing
4040     slash</em> then Apache httpd will redirect them to
4041     <code>http://www.domain.com/splat/</code>. If you have
4042     authentication enabled, this will cause the user to have to
4043     authenticate twice (once for <code>www</code> and once again
4044     for <code>www.domain.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
4045     FAQ on this subject for more information</a>). But if
4046     <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
4047     Apache httpd will redirect to <code>http://www/splat/</code>.</p>
4048
4049     <p>There is a third option, <code>UseCanonicalName DNS</code>,
4050     which is intended for use with mass IP-based virtual hosting to
4051     support ancient clients that do not provide a
4052     <code>Host:</code> header. With this option Apache httpd does a
4053     reverse DNS lookup on the server IP address that the client
4054     connected to in order to work out self-referential URLs.</p>
4055
4056     <div class="warning"><h3>Warning</h3>
4057     <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
4058     they may be broken by this option. The client is essentially free
4059     to give whatever value they want as a hostname. But if the CGI is
4060     only using <code>SERVER_NAME</code> to construct self-referential URLs
4061     then it should be just fine.</p>
4062     </div>
4063
4064 <h3>Consulte también</h3>
4065 <ul>
4066 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
4067 <li><code class="directive"><a href="#servername">ServerName</a></code></li>
4068 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
4069 </ul>
4070 </div>
4071 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4072 <div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directiva</a></h2>
4073 <table class="directive">
4074 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures how the server determines its own name and
4075 port</td></tr>
4076 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
4077 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
4078 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
4079 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4080 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4081 </table>
4082     <p>In many situations Apache httpd must construct a <em>self-referential</em>
4083     URL -- that is, a URL that refers back to the same server. With
4084     <code>UseCanonicalPhysicalPort On</code> Apache httpd will, when
4085     constructing the canonical port for the server to honor
4086     the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
4087     provide the actual physical port number being used by this request
4088     as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
4089     Apache httpd will not ever use the actual physical port number, instead
4090     relying on all configured information to construct a valid port number.</p>
4091
4092     <div class="note"><h3>Note</h3>
4093     <p>The ordering of when the physical port is used is as follows:<br /><br />
4094      <code>UseCanonicalName On</code></p>
4095      <ul>
4096       <li>Port provided in <code>Servername</code></li>
4097       <li>Physical port</li>
4098       <li>Default port</li>
4099      </ul>
4100      <code>UseCanonicalName Off | DNS</code>
4101      <ul>
4102       <li>Parsed port from <code>Host:</code> header</li>
4103       <li>Physical port</li>
4104       <li>Port provided in <code>Servername</code></li>
4105       <li>Default port</li>
4106      </ul>
4107     
4108     <p>With <code>UseCanonicalPhysicalPort Off</code>, the
4109     physical ports are removed from the ordering.</p>
4110     </div>
4111
4112
4113 <h3>Consulte también</h3>
4114 <ul>
4115 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
4116 <li><code class="directive"><a href="#servername">ServerName</a></code></li>
4117 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
4118 </ul>
4119 </div>
4120 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4121 <div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost">&lt;VirtualHost&gt;</a> <a name="virtualhost" id="virtualhost">Directiva</a></h2>
4122 <table class="directive">
4123 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only to a specific
4124 hostname or IP address</td></tr>
4125 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>&lt;VirtualHost
4126     <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
4127     ...&gt; ... &lt;/VirtualHost&gt;</code></td></tr>
4128 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
4129 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4130 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4131 </table>
4132     <p><code class="directive">&lt;VirtualHost&gt;</code> and
4133     <code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
4134     directives that will apply only to a particular virtual host. Any
4135     directive that is allowed in a virtual host context may be
4136     used. When the server receives a request for a document on a
4137     particular virtual host, it uses the configuration directives
4138     enclosed in the <code class="directive">&lt;VirtualHost&gt;</code>
4139     section. <var>Addr</var> can be:</p>
4140
4141     <ul>
4142       <li>The IP address of the virtual host;</li>
4143
4144       <li>A fully qualified domain name for the IP address of the
4145       virtual host (not recommended);</li>
4146
4147       <li>The character <code>*</code>, which is used only in combination with
4148       <code>NameVirtualHost *</code> to match all IP addresses; or</li>
4149
4150       <li>The string <code>_default_</code>, which is used only
4151       with IP virtual hosting to catch unmatched IP addresses.</li>
4152     </ul>
4153
4154     <div class="example"><h3>Example</h3><p><code>
4155       &lt;VirtualHost 10.1.2.3&gt;<br />
4156       <span class="indent">
4157         ServerAdmin webmaster@host.example.com<br />
4158         DocumentRoot /www/docs/host.example.com<br />
4159         ServerName host.example.com<br />
4160         ErrorLog logs/host.example.com-error_log<br />
4161         TransferLog logs/host.example.com-access_log<br />
4162       </span>
4163       &lt;/VirtualHost&gt;
4164     </code></p></div>
4165
4166
4167     <p>IPv6 addresses must be specified in square brackets because
4168     the optional port number could not be determined otherwise.  An
4169     IPv6 example is shown below:</p>
4170
4171     <div class="example"><p><code>
4172       &lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]&gt;<br />
4173       <span class="indent">
4174         ServerAdmin webmaster@host.example.com<br />
4175         DocumentRoot /www/docs/host.example.com<br />
4176         ServerName host.example.com<br />
4177         ErrorLog logs/host.example.com-error_log<br />
4178         TransferLog logs/host.example.com-access_log<br />
4179       </span>
4180       &lt;/VirtualHost&gt;
4181     </code></p></div>
4182
4183     <p>Each Virtual Host must correspond to a different IP address,
4184     different port number or a different host name for the server,
4185     in the former case the server machine must be configured to
4186     accept IP packets for multiple addresses. (If the machine does
4187     not have multiple network interfaces, then this can be
4188     accomplished with the <code>ifconfig alias</code> command -- if
4189     your OS supports it).</p>
4190
4191     <div class="note"><h3>Note</h3>
4192     <p>The use of <code class="directive">&lt;VirtualHost&gt;</code> does
4193     <strong>not</strong> affect what addresses Apache httpd listens on. You
4194     may need to ensure that Apache httpd is listening on the correct addresses
4195     using <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p>
4196     </div>
4197
4198     <p>When using IP-based virtual hosting, the special name
4199     <code>_default_</code> can be specified in
4200     which case this virtual host will match any IP address that is
4201     not explicitly listed in another virtual host. In the absence
4202     of any <code>_default_</code> virtual host the "main" server config,
4203     consisting of all those definitions outside any VirtualHost
4204     section, is used when no IP-match occurs.</p>
4205
4206     <p>You can specify a <code>:port</code> to change the port that is
4207     matched. If unspecified then it defaults to the same port as the
4208     most recent <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>
4209     statement of the main server. You may also specify <code>:*</code>
4210     to match all ports on that address. (This is recommended when used
4211     with <code>_default_</code>.)</p>
4212
4213     <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
4214     specified inside each <code class="directive">&lt;VirtualHost&gt;</code> block. If it is absent, the
4215     <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
4216     server configuration will be inherited.</p>
4217
4218     <p>If no matching virtual host is found, then the first listed
4219     virtual host that matches the IP address will be used.  As a
4220     consequence, the first listed virtual host is the default virtual
4221     host.</p>
4222
4223     <div class="warning"><h3>Security</h3>
4224     <p>See the <a href="../misc/security_tips.html">security tips</a>
4225     document for details on why your security could be compromised if the
4226     directory where log files are stored is writable by anyone other
4227     than the user that starts the server.</p>
4228     </div>
4229
4230 <h3>Consulte también</h3>
4231 <ul>
4232 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
4233 <li><a href="../dns-caveats.html">Issues Regarding DNS and
4234     Apache HTTP Server</a></li>
4235 <li><a href="../bind.html">Setting
4236     which addresses and ports Apache HTTP Server uses</a></li>
4237 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
4238     and &lt;Files&gt; sections work</a> for an explanation of how these
4239     different sections are combined when a request is received</li>
4240 </ul>
4241 </div>
4242 </div>
4243 <div class="bottomlang">
4244 <p><span>Idiomas disponibles: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
4245 <a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
4246 <a href="../es/mod/core.html" title="Español">&nbsp;es&nbsp;</a> |
4247 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
4248 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
4249 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
4250 </div><div id="footer">
4251 <p class="apache">Copyright 2011 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>
4252 <p class="menu"><a href="../mod/">Módulos</a> | <a href="../mod/directives.html">Directivas</a> | <a href="../faq/">Preguntas Frecuentes</a> | <a href="../glossary.html">Glosario</a> | <a href="../sitemap.html">Mapa de este sitio web</a></p></div>
4253 </body></html>