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
8 <title>core - Servidor HTTP Apache Versión 2.5</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" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
12 <script src="../style/scripts/prettify.min.js" type="text/javascript">
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
17 <div id="page-header">
18 <p class="menu"><a href="../mod/">Módulos</a> | <a href="../mod/quickreference.html">Directivas</a> | <a href="http://wiki.apache.org/httpd/FAQ">Preguntas Frecuentes</a> | <a href="../glossary.html">Glosario</a> | <a href="../sitemap.html">Mapa de este sitio web</a></p>
19 <p class="apache">Versión 2.5 del Servidor HTTP Apache</p>
20 <img alt="" src="../images/feather.gif" /></div>
21 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
23 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">Servidor HTTP</a> > <a href="http://httpd.apache.org/docs/">Documentación</a> > <a href="../">Versión 2.5</a> > <a href="./">Módulos</a></div>
24 <div id="page-content">
25 <div id="preamble"><h1>Funcionalidad Básica de Apache</h1>
27 <p><span>Idiomas disponibles: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
28 <a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> |
29 <a href="../es/mod/core.html" title="Español"> es </a> |
30 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
31 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
32 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
34 <div class="outofdate">Esta traducción podría estar
35 obsoleta. Consulte la versión en inglés de la
36 documentación para comprobar si se han producido cambios
38 <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>
39 <tr><th><a href="module-dict.html#Status">Estado:</a></th><td>Core</td></tr></table>
41 <div id="quickview"><h3 class="directives">Directivas</h3>
43 <li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
65 <li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
66 <li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li>
67 <li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li>
68 <li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li>
69 <li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#if"><If></a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li>
83 <li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
84 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
85 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
88 <li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li>
90 <li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li>
91 <li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
92 <li><img alt="" src="../images/down.gif" /> <a href="#logleveloverride">LogLevelOverride</a></li>
93 <li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
94 <li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li>
95 <li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li>
96 <li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li>
97 <li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li>
98 <li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li>
99 <li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
100 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
101 <li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li>
102 <li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li>
103 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
104 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
105 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
106 <li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
107 <li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li>
108 <li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
109 <li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
110 <li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li>
111 <li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
112 <li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
113 <li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
114 <li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
115 <li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
116 <li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
117 <li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
118 <li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li>
119 <li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
120 <li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li>
121 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
122 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
123 <li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li>
124 <li><img alt="" src="../images/down.gif" /> <a href="#warning">Warning</a></li>
126 <ul class="seealso"><li><a href="#comments_section">Comentarios</a></li></ul></div>
128 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
129 <div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directiva</a></h2>
130 <table class="directive">
131 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configura mejoras para un Protocolo de Escucha de Sockets</td></tr>
132 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr>
133 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
134 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
135 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
136 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Disponible en Apache httpd 2.1.5 y posteriores.
137 En Windows desde Apache httpd 2.3.3 y posteriores.</td></tr>
139 <p>Esta directiva hace posible mejoras específicas a nivel de sistema operativo
140 y a través del tipo de Protocolo para un socket que escucha.
141 La premisa básica es que el kernel no envíe un socket al servidor
142 hasta que o bien los datos se hayan recibido o bien se haya almacenado
143 en el buffer una Respuesta HTTP completa.
144 Actualmente sólo están soportados
145 <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9">
146 Accept Filters</a> sobre FreeBSD, <code>TCP_DEFER_ACCEPT</code> sobre Linux,
147 y AcceptEx() sobre Windows.</p>
149 <p>El uso de <code>none</code> para un argumento desactiva cualquier filtro
150 aceptado para ese protocolo. Esto es útil para protocolos que requieren que un
151 servidor envíe datos primeros, tales como <code>ftp:</code> o <code>nntp</code>:</p>
152 <div class="example"><p><code>AcceptFilter nntp none</code></p></div>
154 <p>Los nombres de protocolo por defecto son <code>https</code> para el puerto 443
155 y <code>http</code> para todos los demás puertos. Para especificar que se está
156 utilizando otro protocolo con un puerto escuchando, añade el argumento <var>protocol</var>
157 a la directiva <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p>
159 <p>Sobre FreeBDS los valores por defecto:</p>
160 <div class="example"><p><code>
161 AcceptFilter http httpready <br />
162 AcceptFilter https dataready
165 <p>El filtro <code>httpready</code> almacena en el buffer peticiones HTTP completas
166 a nivel de kernel. Una vez que la petición es recibida, el kernel la envía al servidor.
167 Consulta la página man de
168 <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9">
169 accf_http(9)</a> para más detalles. Puesto que las peticiones HTTPS
170 están encriptadas, sólo se utiliza el filtro
171 <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">accf_data(9)</a>.</p>
173 <p>Sobre Linux los valores por defecto son:</p>
174 <div class="example"><p><code>
175 AcceptFilter http data <br />
176 AcceptFilter https data
179 <p>En Linux, <code>TCP_DEFER_ACCEPT</code> no soporta el buffering en peticiones http.
180 Cualquier valor además de <code>none</code> habilitará
181 <code>TCP_DEFER_ACCEPT</code> en ese socket. Para más detalles
182 ver la página man de Linux
183 <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
186 <p>Sobre Windows los valores por defecto son:</p>
187 <div class="example"><p><code>
188 AcceptFilter http data <br />
189 AcceptFilter https data
192 <p>Sobre Windows mpm_winnt interpreta el argumento AcceptFilter para conmutar la API
193 AcceptEx(), y no soporta el buffering sobre el protocolo http. Hay dos valores
194 que utilizan la API Windows AcceptEx() y que recuperan sockets de red
195 entre conexciones. <code>data</code> espera hasta que los datos han sido
196 transmitidos como se comentaba anteriormente, y el buffer inicial de datos y las
197 direcciones de red son recuperadas a partir de una única llamada AcceptEx().
198 <code>connect</code> utiliza la API AcceptEx() API, y recupera también
199 las direcciones de red, pero a diferencia de <code>none</code>
200 la opción <code>connect</code> no espera a la transmisión inicial de los datos.</p>
202 <p>Sobre Windows, <code>none</code> prefiere accept() antes que AcceptEx()
203 y no recuperará sockets entre las conexiones. Lo que es útil para los adaptadores de
204 red con un soporte precario de drivers, así como para algunos proveedores de red
205 tales como drivers vpn, o filtros de spam, de virus o de spyware.</p>
208 <h3>Consulte también</h3>
210 <li><code class="directive">Protocol</code></li>
213 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
214 <div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directiva</a></h2>
215 <table class="directive">
216 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Los recursos aceptan información sobre su ruta</td></tr>
217 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
218 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
219 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
220 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
221 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
222 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
223 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Disponible en Apache httpd 2.0.30 y posteriores</td></tr>
226 <p>Esta directiva controla si las peticiones que contienen información sobre la ruta
227 que sigue un fichero que existe (o un fichero que no existe pero en un directorio que
228 sí existe) serán aceptadas o denegadas. La información de ruta puede estar disponible
229 para los scripts en la variable de entorno <code>PATH_INFO</code>.</p>
231 <p>Por ejemplo, asumamos que la ubicación <code>/test/</code> apunta a
232 un directorio que contiene únicamente el fichero
233 <code>here.html</code>. Entonces, las peticiones tanto para
234 <code>/test/here.html/more</code> como para
235 <code>/test/nothere.html/more</code> recogen
236 <code>/more</code> como <code>PATH_INFO</code>.</p>
238 <p>Los tres posibles argumentos para la directiva
239 <code class="directive">AcceptPathInfo</code> son los siguientes:</p>
241 <dt><code>Off</code></dt><dd>Una petición sólo será aceptada si
242 se corresponde con una ruta literal que existe. Por lo tanto, una petición
243 con una información de ruta después del nombre de fichero tal como
244 <code>/test/here.html/more</code> en el ejemplo anterior devolverá
245 un error 404 NOT FOUND.</dd>
247 <dt><code>On</code></dt><dd>Una petición será aceptada si una
248 ruta principal de acceso se corresponde con un fichero que existe. El ejemplo
249 anterior <code>/test/here.html/more</code> será aceptado si
250 <code>/test/here.html</code> corresponde a un fichero válido.</dd>
252 <dt><code>Default</code></dt><dd>La gestión de las peticiones
253 con información de ruta está determinada por el <a href="../handler.html">controlador</a> responsable de la petición.
254 El controlador principal para para ficheros normales rechaza por defecto
255 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
256 <code>PATH_INFO</code> por defecto.</dd>
259 <p>El objetivo principal de la directiva <code>AcceptPathInfo</code>
260 es permitirte sobreescribir la opción del controlador
261 de aceptar or rechazar <code>PATH_INFO</code>. Este tipo de sobreescritura se necesita,
262 por ejemplo, cuando utilizas un <a href="../filter.html">filtro</a>, tal como
263 <a href="mod_include.html">INCLUDES</a>, para generar contenido
264 basado en <code>PATH_INFO</code>. El controlador principal normalmente rechazaría
265 la petición, de modo que puedes utilizar la siguiente configuración para habilitarla
268 <div class="example"><p><code>
269 <Files "mypaths.shtml"><br />
270 <span class="indent">
271 Options +Includes<br />
272 SetOutputFilter INCLUDES<br />
273 AcceptPathInfo On<br />
280 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
281 <div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directiva</a></h2>
282 <table class="directive">
283 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Nombre del fichero distribuido de configuración</td></tr>
284 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
285 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
286 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
287 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
288 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
290 <p>Mientras que procesa una petición el servidor busca
291 el primer fichero de configuración existente dentro de un listado de nombres en
292 cada directorio de la ruta del documento, si los ficheros distribuidos
293 de configuración están <a href="#allowoverride">habilitados para ese
294 directorio</a>. Por ejemplo:</p>
296 <div class="example"><p><code>
300 <p>antes de servir el documento
301 <code>/usr/local/web/index.html</code>, el servidor leerá
302 <code>/.acl</code>, <code>/usr/.acl</code>,
303 <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
304 para las directivas, salvo que estén deshabilitadas with</p>
306 <div class="example"><p><code>
307 <Directory /><br />
308 <span class="indent">
309 AllowOverride None<br />
314 <h3>Consulte también</h3>
316 <li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
317 <li><a href="../configuring.html">Configuration Files</a></li>
318 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
321 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
322 <div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directiva</a></h2>
323 <table class="directive">
324 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Default charset parameter to be added when a response
325 content-type is <code>text/plain</code> or <code>text/html</code></td></tr>
326 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
327 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
328 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
329 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
330 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
331 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
333 <p>This directive specifies a default value for the media type
334 charset parameter (the name of a character encoding) to be added
335 to a response if and only if the response's content-type is either
336 <code>text/plain</code> or <code>text/html</code>. This should override
337 any charset specified in the body of the response via a <code>META</code>
338 element, though the exact behavior is often dependent on the user's client
339 configuration. A setting of <code>AddDefaultCharset Off</code>
340 disables this functionality. <code>AddDefaultCharset On</code> enables
341 a default charset of <code>iso-8859-1</code>. Any other value is assumed
342 to be the <var>charset</var> to be used, which should be one of the
343 <a href="http://www.iana.org/assignments/character-sets">IANA registered
344 charset values</a> for use in Internet media types (MIME types).
347 <div class="example"><p><code>
348 AddDefaultCharset utf-8
351 <p><code class="directive">AddDefaultCharset</code> should only be used when all
352 of the text resources to which it applies are known to be in that
353 character encoding and it is too inconvenient to label their charset
354 individually. One such example is to add the charset parameter
355 to resources containing generated content, such as legacy CGI
356 scripts, that might be vulnerable to cross-site scripting attacks
357 due to user-provided data being included in the output. Note, however,
358 that a better solution is to just fix (or delete) those scripts, since
359 setting a default charset does not protect users that have enabled
360 the "auto-detect character encoding" feature on their browser.</p>
362 <h3>Consulte también</h3>
364 <li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li>
367 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
368 <div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directiva</a></h2>
369 <table class="directive">
370 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determines whether encoded path separators in URLs are allowed to
371 be passed through</td></tr>
372 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
373 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
374 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
375 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
376 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
377 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.0.46 and later</td></tr>
379 <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
380 which contain encoded path separators (<code>%2F</code> for <code>/</code>
381 and additionally <code>%5C</code> for <code>\</code> on according systems)
382 to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
384 <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
385 mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
387 <div class="note"><h3>Note</h3>
388 <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
389 Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
390 according systems) will be left as such in the otherwise decoded URL
394 <h3>Consulte también</h3>
396 <li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
399 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
400 <div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directiva</a></h2>
401 <table class="directive">
402 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Types of directives that are allowed in
403 <code>.htaccess</code> files</td></tr>
404 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
405 [<var>directive-type</var>] ...</code></td></tr>
406 <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>
407 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory</td></tr>
408 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
409 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
411 <p>When the server finds an <code>.htaccess</code> file (as
412 specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
413 it needs to know which directives declared in that file can override
414 earlier configuration directives.</p>
416 <div class="note"><h3>Only available in <Directory> sections</h3>
417 <code class="directive">AllowOverride</code> is valid only in
418 <code class="directive"><a href="#directory"><Directory></a></code>
419 sections specified without regular expressions, not in <code class="directive"><a href="#location"><Location></a></code>, <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> or
420 <code class="directive"><a href="#files"><Files></a></code> sections.
423 <p>When this directive is set to <code>None</code>, then
424 <a href="#accessfilename">.htaccess</a> files are completely ignored.
425 In this case, the server will not even attempt to read
426 <code>.htaccess</code> files in the filesystem.</p>
428 <p>When this directive is set to <code>All</code>, then any
429 directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
430 <code>.htaccess</code> files.</p>
432 <p>The <var>directive-type</var> can be one of the following
433 groupings of directives.</p>
440 Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
441 <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
442 <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
443 <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>,
444 <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>
449 Allow use of the directives controlling document types
450 (<code class="directive"><a href="#errordocument">ErrorDocument</a></code>,
451 <code class="directive"><a href="#forcetype">ForceType</a></code>,
452 <code class="directive"><a href="../mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
453 <code class="directive"><a href="#sethandler">SetHandler</a></code>,
454 <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>,
455 <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
456 <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives),
457 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>),
458 <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
459 <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> from
460 <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>.
466 Allow use of the directives controlling directory indexing
467 (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
468 <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>,
469 <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
470 <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>,
476 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>
478 <dt>Options[=<var>Option</var>,...]</dt>
481 Allow use of the directives controlling specific directory
482 features (<code class="directive"><a href="#options">Options</a></code> and
483 <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>).
484 An equal sign may be given followed by a comma (but no spaces)
485 separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.</dd>
490 <div class="example"><p><code>
491 AllowOverride AuthConfig Indexes
494 <p>In the example above all directives that are neither in the group
495 <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
498 <div class="note"><p>For security and performance reasons, do not set
499 <code>AllowOverride</code> to anything other than <code>None</code>
500 in your <code><Directory /></code> block. Instead, find (or
501 create) the <code><Directory></code> block that refers to the
502 directory where you're actually planning to place a
503 <code>.htaccess</code> file.</p>
506 <h3>Consulte también</h3>
508 <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
509 <li><a href="../configuring.html">Configuration Files</a></li>
510 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
513 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
514 <div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">Directiva</a></h2>
515 <table class="directive">
516 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Individual directives that are allowed in
517 <code>.htaccess</code> files</td></tr>
518 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>AllowOverrideList None|<var>directive</var>
519 [<var>directive-type</var>] ...</code></td></tr>
520 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>AllowOverrideList None</code></td></tr>
521 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory</td></tr>
522 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
523 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
524 </table><p>The documentation for this directive has
525 not been translated yet. Please have a look at the English
526 version.</p><h3>Consulte también</h3>
528 <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
529 <li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
530 <li><a href="../configuring.html">Configuration Files</a></li>
531 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
534 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
535 <div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directiva</a></h2>
536 <table class="directive">
537 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Technique for locating the interpreter for CGI
539 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
540 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
541 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
542 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
543 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
544 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>NetWare only</td></tr>
546 <p>This directive is used to control how Apache httpd finds the
547 interpreter used to run CGI scripts. For example, setting
548 <code>CGIMapExtension sys:\foo.nlm .foo</code> will
549 cause all CGI script files with a <code>.foo</code> extension to
550 be passed to the FOO interpreter.</p>
553 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
554 <div class="directive-section"><h2><a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a> <a name="cgipassauth" id="cgipassauth">Directiva</a></h2>
555 <table class="directive">
556 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables passing HTTP authorization headers to scripts as CGI
558 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>CGIPassAuth On|Off</code></td></tr>
559 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>CGIPassAuth Off</code></td></tr>
560 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
561 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>AuthConfig</td></tr>
562 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
563 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
564 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.4.13 and later</td></tr>
565 </table><p>The documentation for this directive has
566 not been translated yet. Please have a look at the English
568 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
569 <div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directiva</a></h2>
570 <table class="directive">
571 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response
573 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ContentDigest On|Off</code></td></tr>
574 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ContentDigest Off</code></td></tr>
575 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
576 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>Options</td></tr>
577 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
578 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
580 <p>This directive enables the generation of
581 <code>Content-MD5</code> headers as defined in RFC1864
582 respectively RFC2616.</p>
584 <p>MD5 is an algorithm for computing a "message digest"
585 (sometimes called "fingerprint") of arbitrary-length data, with
586 a high degree of confidence that any alterations in the data
587 will be reflected in alterations in the message digest.</p>
589 <p>The <code>Content-MD5</code> header provides an end-to-end
590 message integrity check (MIC) of the entity-body. A proxy or
591 client may check this header for detecting accidental
592 modification of the entity-body in transit. Example header:</p>
594 <div class="example"><p><code>
595 Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
598 <p>Note that this can cause performance problems on your server
599 since the message digest is computed on every request (the
600 values are not cached).</p>
602 <p><code>Content-MD5</code> is only sent for documents served
603 by the <code class="module"><a href="../mod/core.html">core</a></code>, and not by any module. For example,
604 SSI documents, output from CGI scripts, and byte range responses
605 do not have this header.</p>
608 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
609 <div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">Directiva</a></h2>
610 <table class="directive">
611 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Base directory for the server run-time files</td></tr>
612 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr>
613 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr>
614 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
615 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
616 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
617 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache 2.4.2 and later</td></tr>
618 </table><p>The documentation for this directive has
619 not been translated yet. Please have a look at the English
620 version.</p><h3>Consulte también</h3>
622 <li><a href="../misc/security_tips.html#serverroot">the
623 security tips</a> for information on how to properly set
624 permissions on the <code class="directive">ServerRoot</code></li>
627 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
628 <div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directiva</a></h2>
629 <table class="directive">
630 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>This directive has no effect other than to emit warnings
631 if the value is not <code>none</code>. In prior versions, DefaultType
632 would specify a default media type to assign to response content for
633 which no other media type configuration could be found.
635 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr>
636 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>DefaultType none</code></td></tr>
637 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
638 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
639 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
640 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
641 <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>
643 <p>This directive has been disabled. For backwards compatibility
644 of configuration files, it may be specified with the value
645 <code>none</code>, meaning no default media type. For example:</p>
647 <div class="example"><p><code>
651 <p><code>DefaultType None</code> is only available in
652 httpd-2.2.7 and later.</p>
654 <p>Use the mime.types configuration file and the
655 <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> to configure media
656 type assignments via file extensions, or the
657 <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure
658 the media type for specific resources. Otherwise, the server will
659 send the response without a Content-Type header field and the
660 recipient may attempt to guess the media type.</p>
663 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
664 <div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directiva</a></h2>
665 <table class="directive">
666 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Define the existence of a variable</td></tr>
667 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Define <var>parameter-name</var></code></td></tr>
668 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
669 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
670 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
672 <p>Equivalent to passing the <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p>
673 <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine"><IfDefine></a></code> sections without needing to alter
674 <code>-D</code> arguments in any startup scripts.</p>
677 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
678 <div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">Directiva</a></h2>
679 <table class="directive">
680 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enclose a group of directives that apply only to the
681 named file-system directory, sub-directories, and their contents.</td></tr>
682 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Directory <var>directory-path</var>>
683 ... </Directory></code></td></tr>
684 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
685 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
686 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
688 <p><code class="directive"><Directory></code> and
689 <code></Directory></code> are used to enclose a group of
690 directives that will apply only to the named directory,
691 sub-directories of that directory, and the files within the respective
692 directories. Any directive that is allowed
693 in a directory context may be used. <var>Directory-path</var> is
694 either the full path to a directory, or a wild-card string using
695 Unix shell-style matching. In a wild-card string, <code>?</code> matches
696 any single character, and <code>*</code> matches any sequences of
697 characters. You may also use <code>[]</code> character ranges. None
698 of the wildcards match a `/' character, so <code><Directory
699 /*/public_html></code> will not match
700 <code>/home/user/public_html</code>, but <code><Directory
701 /home/*/public_html></code> will match. Example:</p>
703 <div class="example"><p><code>
704 <Directory /usr/local/httpd/htdocs><br />
705 <span class="indent">
706 Options Indexes FollowSymLinks<br />
712 <p>Be careful with the <var>directory-path</var> arguments:
713 They have to literally match the filesystem path which Apache httpd uses
714 to access the files. Directives applied to a particular
715 <code><Directory></code> will not apply to files accessed from
716 that same directory via a different path, such as via different symbolic
720 <p><a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular
721 expressions</a> can also be used, with the addition of the
722 <code>~</code> character. For example:</p>
724 <div class="example"><p><code>
725 <Directory ~ "^/www/.*/[0-9]{3}">
728 <p>would match directories in <code>/www/</code> that consisted of
731 <p>If multiple (non-regular expression) <code class="directive"><Directory></code> sections
732 match the directory (or one of its parents) containing a document,
733 then the directives are applied in the order of shortest match
734 first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
737 <div class="example"><p><code>
738 <Directory /><br />
739 <span class="indent">
740 AllowOverride None<br />
742 </Directory><br />
744 <Directory /home/><br />
745 <span class="indent">
746 AllowOverride FileInfo<br />
751 <p>for access to the document <code>/home/web/dir/doc.html</code>
755 <li>Apply directive <code>AllowOverride None</code>
756 (disabling <code>.htaccess</code> files).</li>
758 <li>Apply directive <code>AllowOverride FileInfo</code> (for
759 directory <code>/home</code>).</li>
761 <li>Apply any <code>FileInfo</code> directives in
762 <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
763 <code>/home/web/dir/.htaccess</code> in that order.</li>
766 <p>Regular expressions are not considered until after all of the
767 normal sections have been applied. Then all of the regular
768 expressions are tested in the order they appeared in the
769 configuration file. For example, with</p>
771 <div class="example"><p><code>
772 <Directory ~ abc$><br />
773 <span class="indent">
774 # ... directives here ...<br />
779 <p>the regular expression section won't be considered until after
780 all normal <code class="directive"><Directory></code>s and
781 <code>.htaccess</code> files have been applied. Then the regular
782 expression will match on <code>/home/abc/public_html/abc</code> and
783 the corresponding <code class="directive"><Directory></code> will
786 <p><strong>Note that the default access for
787 <code><Directory /></code> is <code>Allow from All</code>.
788 This means that Apache httpd will serve any file mapped from an URL. It is
789 recommended that you change this with a block such
792 <div class="example"><p><code>
793 <Directory /><br />
794 <span class="indent">
795 Order Deny,Allow<br />
801 <p><strong>and then override this for directories you
802 <em>want</em> accessible. See the <a href="../misc/security_tips.html">Security Tips</a> page for more
803 details.</strong></p>
805 <p>The directory sections occur in the <code>httpd.conf</code> file.
806 <code class="directive"><Directory></code> directives
807 cannot nest, and cannot appear in a <code class="directive"><a href="#limit"><Limit></a></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section.</p>
809 <h3>Consulte también</h3>
811 <li><a href="../sections.html">How <Directory>,
812 <Location> and <Files> sections work</a> for an
813 explanation of how these different sections are combined when a
814 request is received</li>
817 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
818 <div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">Directiva</a></h2>
819 <table class="directive">
820 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enclose directives that apply to
821 the contents of file-system directories matching a regular expression.</td></tr>
822 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><DirectoryMatch <var>regex</var>>
823 ... </DirectoryMatch></code></td></tr>
824 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
825 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
826 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
828 <p><code class="directive"><DirectoryMatch></code> and
829 <code></DirectoryMatch></code> are used to enclose a group
830 of directives which will apply only to the named directory (and the files within),
831 the same as <code class="directive"><a href="#directory"><Directory></a></code>.
832 However, it takes as an argument a
833 <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular expression</a>. For example:</p>
835 <div class="example"><p><code>
836 <DirectoryMatch "^/www/(.+/)?[0-9]{3}">
839 <p>would match directories in <code>/www/</code> that consisted of three
842 <div class="note"><h3>Compatability</h3>
843 Prior to 2.3.9, this directive implicitly applied to sub-directories
844 (like <code class="directive"><a href="#directory"><Directory></a></code>) and
845 could not match the end of line symbol ($). In 2.3.9 and later,
846 only directories that match the expression are affected by the enclosed
850 <div class="note"><h3>Trailing Slash</h3>
851 This directive applies to requests for directories that may or may
852 not end in a trailing slash, so expressions that are anchored to the
853 end of line ($) must be written with care.
856 <h3>Consulte también</h3>
858 <li><code class="directive"><a href="#directory"><Directory></a></code> for
859 a description of how regular expressions are mixed in with normal
860 <code class="directive"><Directory></code>s</li>
861 <li><a href="../sections.html">How <Directory>, <Location> and
862 <Files> sections work</a> for an explanation of how these different
863 sections are combined when a request is received</li>
866 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
867 <div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directiva</a></h2>
868 <table class="directive">
869 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Directory that forms the main document tree visible
870 from the web</td></tr>
871 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
872 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
873 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
874 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
875 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
877 <p>This directive sets the directory from which <code class="program"><a href="../programs/httpd.html">httpd</a></code>
878 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
879 path from the requested URL to the document root to make the
880 path to the document. Example:</p>
882 <div class="example"><p><code>
883 DocumentRoot /usr/web
887 <code>http://www.my.host.com/index.html</code> refers to
888 <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
889 not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
891 <p>The <code class="directive">DocumentRoot</code> should be specified without
892 a trailing slash.</p>
894 <h3>Consulte también</h3>
896 <li><a href="../urlmapping.html#documentroot">Mapping URLs to Filesystem
900 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
901 <div class="directive-section"><h2><a name="Else" id="Else"><Else></a> <a name="else" id="else">Directiva</a></h2>
902 <table class="directive">
903 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if the condition of a
904 previous <code class="directive"><a href="#if"><If></a></code> or
905 <code class="directive"><a href="#elseif"><ElseIf></a></code> section is not
906 satisfied by a request at runtime</td></tr>
907 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Else> ... </Else></code></td></tr>
908 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
909 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
910 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
911 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
912 </table><p>The documentation for this directive has
913 not been translated yet. Please have a look at the English
914 version.</p><h3>Consulte también</h3>
916 <li><code class="directive"><a href="#if"><If></a></code></li>
917 <li><code class="directive"><a href="#elseif"><ElseIf></a></code></li>
918 <li><a href="../sections.html">How <Directory>, <Location>,
919 <Files> sections work</a> for an explanation of how these
920 different sections are combined when a request is received.
921 <code class="directive"><If></code>,
922 <code class="directive"><ElseIf></code>, and
923 <code class="directive"><Else></code> are applied last.</li>
926 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
927 <div class="directive-section"><h2><a name="ElseIf" id="ElseIf"><ElseIf></a> <a name="elseif" id="elseif">Directiva</a></h2>
928 <table class="directive">
929 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if a condition is satisfied
930 by a request at runtime while the condition of a previous
931 <code class="directive"><a href="#if"><If></a></code> or
932 <code class="directive"><ElseIf></code> section is not
934 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></code></td></tr>
935 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
936 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
937 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
938 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
939 </table><p>The documentation for this directive has
940 not been translated yet. Please have a look at the English
941 version.</p><h3>Consulte también</h3>
943 <li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
944 for a complete reference and more examples.</li>
945 <li><code class="directive"><a href="#if"><If></a></code></li>
946 <li><code class="directive"><a href="#else"><Else></a></code></li>
947 <li><a href="../sections.html">How <Directory>, <Location>,
948 <Files> sections work</a> for an explanation of how these
949 different sections are combined when a request is received.
950 <code class="directive"><If></code>,
951 <code class="directive"><ElseIf></code>, and
952 <code class="directive"><Else></code> are applied last.</li>
955 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
956 <div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directiva</a></h2>
957 <table class="directive">
958 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
959 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
960 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>EnableMMAP On</code></td></tr>
961 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
962 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
963 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
964 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
966 <p>This directive controls whether the <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use
967 memory-mapping if it needs to read the contents of a file during
968 delivery. By default, when the handling of a request requires
969 access to the data within a file -- for example, when delivering a
970 server-parsed file using <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache httpd
971 memory-maps the file if the OS supports it.</p>
973 <p>This memory-mapping sometimes yields a performance improvement.
974 But in some environments, it is better to disable the memory-mapping
975 to prevent operational problems:</p>
978 <li>On some multiprocessor systems, memory-mapping can reduce the
979 performance of the <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</li>
980 <li>Deleting or truncating a file while <code class="program"><a href="../programs/httpd.html">httpd</a></code>
981 has it memory-mapped can cause <code class="program"><a href="../programs/httpd.html">httpd</a></code> to
982 crash with a segmentation fault.
986 <p>For server configurations that are vulnerable to these problems,
987 you should disable memory-mapping of delivered files by specifying:</p>
989 <div class="example"><p><code>
993 <p>For NFS mounted files, this feature may be disabled explicitly for
994 the offending files by specifying:</p>
996 <div class="example"><p><code>
997 <Directory "/path-to-nfs-files">
998 <span class="indent">
1005 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1006 <div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directiva</a></h2>
1007 <table class="directive">
1008 <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>
1009 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
1010 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>EnableSendfile Off</code></td></tr>
1011 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1012 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
1013 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1014 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1015 <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
1016 version 2.3.9.</td></tr>
1018 <p>This directive controls whether <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use the
1019 sendfile support from the kernel to transmit file contents to the client.
1020 By default, when the handling of a request requires no access
1021 to the data within a file -- for example, when delivering a
1022 static file -- Apache httpd uses sendfile to deliver the file contents
1023 without ever reading the file if the OS supports it.</p>
1025 <p>This sendfile mechanism avoids separate read and send operations,
1026 and buffer allocations. But on some platforms or within some
1027 filesystems, it is better to disable this feature to avoid
1028 operational problems:</p>
1031 <li>Some platforms may have broken sendfile support that the build
1032 system did not detect, especially if the binaries were built on
1033 another box and moved to such a machine with broken sendfile
1035 <li>On Linux the use of sendfile triggers TCP-checksum
1036 offloading bugs on certain networking cards when using IPv6.</li>
1037 <li>On Linux on Itanium, sendfile may be unable to handle files
1038 over 2GB in size.</li>
1039 <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS, SMB, CIFS, FUSE),
1040 the kernel may be unable to serve the network file through
1044 <p>For server configurations that are not vulnerable to these problems,
1045 you may enable this feature by specifying:</p>
1047 <div class="example"><p><code>
1051 <p>For network mounted files, this feature may be disabled explicitly
1052 for the offending files by specifying:</p>
1054 <div class="example"><p><code>
1055 <Directory "/path-to-nfs-files">
1056 <span class="indent">
1061 <p>Please note that the per-directory and .htaccess configuration
1062 of <code class="directive">EnableSendfile</code> is not supported by
1063 <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code>.
1064 Only global definition of <code class="directive">EnableSendfile</code>
1065 is taken into account by the module.
1069 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1070 <div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">Directiva</a></h2>
1071 <table class="directive">
1072 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Abort configuration parsing with a custom error message</td></tr>
1073 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Error <var>message</var></code></td></tr>
1074 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1075 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1076 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1077 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.3.9 and later</td></tr>
1079 <p>If an error can be detected within the configuration, this
1080 directive can be used to generate a custom error message, and halt
1081 configuration parsing. The typical use is for reporting required
1082 modules which are missing from the configuration.</p>
1084 <div class="example"><h3>Example</h3><p><code>
1085 # ensure that mod_include is loaded<br />
1086 <IfModule !include_module><br />
1087 Error mod_include is required by mod_foo. Load it with LoadModule.<br />
1088 </IfModule><br />
1090 # ensure that exactly one of SSL,NOSSL is defined<br />
1091 <IfDefine SSL><br />
1092 <IfDefine NOSSL><br />
1093 Error Both SSL and NOSSL are defined. Define only one of them.<br />
1094 </IfDefine><br />
1095 </IfDefine><br />
1096 <IfDefine !SSL><br />
1097 <IfDefine !NOSSL><br />
1098 Error Either SSL or NOSSL must be defined.<br />
1099 </IfDefine><br />
1100 </IfDefine><br />
1105 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1106 <div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directiva</a></h2>
1107 <table class="directive">
1108 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>What the server will return to the client
1109 in case of an error</td></tr>
1110 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
1111 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1112 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
1113 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1114 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1116 <p>In the event of a problem or error, Apache httpd can be configured
1117 to do one of four things,</p>
1120 <li>output a simple hardcoded error message</li>
1122 <li>output a customized message</li>
1124 <li>redirect to a local <var>URL-path</var> to handle the
1127 <li>redirect to an external <var>URL</var> to handle the
1131 <p>The first option is the default, while options 2-4 are
1132 configured using the <code class="directive">ErrorDocument</code>
1133 directive, which is followed by the HTTP response code and a URL
1134 or a message. Apache httpd will sometimes offer additional information
1135 regarding the problem/error.</p>
1137 <p>URLs can begin with a slash (/) for local web-paths (relative
1138 to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a
1139 full URL which the client can resolve. Alternatively, a message
1140 can be provided to be displayed by the browser. Examples:</p>
1142 <div class="example"><p><code>
1143 ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
1144 ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
1145 ErrorDocument 401 /subscription_info.html<br />
1146 ErrorDocument 403 "Sorry can't allow you access today"
1149 <p>Additionally, the special value <code>default</code> can be used
1150 to specify Apache httpd's simple hardcoded message. While not required
1151 under normal circumstances, <code>default</code> will restore
1152 Apache httpd's simple hardcoded message for configurations that would
1153 otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
1155 <div class="example"><p><code>
1156 ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
1157 <Directory /web/docs><br />
1158 <span class="indent">
1159 ErrorDocument 404 default<br />
1164 <p>Note that when you specify an <code class="directive">ErrorDocument</code>
1165 that points to a remote URL (ie. anything with a method such as
1166 <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
1167 client to tell it where to find the document, even if the
1168 document ends up being on the same server. This has several
1169 implications, the most important being that the client will not
1170 receive the original error status code, but instead will
1171 receive a redirect status code. This in turn can confuse web
1172 robots and other clients which try to determine if a URL is
1173 valid using the status code. In addition, if you use a remote
1174 URL in an <code>ErrorDocument 401</code>, the client will not
1175 know to prompt the user for a password since it will not
1176 receive the 401 status code. Therefore, <strong>if you use an
1177 <code>ErrorDocument 401</code> directive then it must refer to a local
1178 document.</strong></p>
1180 <p>Microsoft Internet Explorer (MSIE) will by default ignore
1181 server-generated error messages when they are "too small" and substitute
1182 its own "friendly" error messages. The size threshold varies depending on
1183 the type of error, but in general, if you make your error document
1184 greater than 512 bytes, then MSIE will show the server-generated
1185 error rather than masking it. More information is available in
1186 Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
1188 <p>Although most error messages can be overriden, there are certain
1189 circumstances where the internal messages are used regardless of the
1190 setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. In
1191 particular, if a malformed request is detected, normal request processing
1192 will be immediately halted and the internal error message returned.
1193 This is necessary to guard against security problems caused by
1196 <p>If you are using mod_proxy, you may wish to enable
1197 <code class="directive"><a href="../mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide
1198 custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
1199 Apache httpd will not generate custom error documents for proxied content.</p>
1201 <h3>Consulte también</h3>
1203 <li><a href="../custom-error.html">documentation of
1204 customizable responses</a></li>
1207 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1208 <div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directiva</a></h2>
1209 <table class="directive">
1210 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Location where the server will log errors</td></tr>
1211 <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>
1212 <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>
1213 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1214 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1215 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1217 <p>The <code class="directive">ErrorLog</code> directive sets the name of
1218 the file to which the server will log any errors it encounters. If
1219 the <var>file-path</var> is not absolute then it is assumed to be
1220 relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
1222 <div class="example"><h3>Example</h3><p><code>
1223 ErrorLog /var/log/httpd/error_log
1226 <p>If the <var>file-path</var>
1227 begins with a pipe character "<code>|</code>" then it is assumed to be a
1228 command to spawn to handle the error log.</p>
1230 <div class="example"><h3>Example</h3><p><code>
1231 ErrorLog "|/usr/local/bin/httpd_errors"
1234 <p>See the notes on <a href="../logs.html#piped">piped logs</a> for
1235 more information.</p>
1237 <p>Using <code>syslog</code> instead of a filename enables logging
1238 via syslogd(8) if the system supports it. The default is to use
1239 syslog facility <code>local7</code>, but you can override this by
1240 using the <code>syslog:<var>facility</var></code> syntax where
1241 <var>facility</var> can be one of the names usually documented in
1242 syslog(1). The facility is effectively global, and if it is changed
1243 in individual virtual hosts, the final facility specified affects the
1246 <div class="example"><h3>Example</h3><p><code>
1247 ErrorLog syslog:user
1250 <p>SECURITY: See the <a href="../misc/security_tips.html#serverroot">security tips</a>
1251 document for details on why your security could be compromised
1252 if the directory where log files are stored is writable by
1253 anyone other than the user that starts the server.</p>
1254 <div class="warning"><h3>Note</h3>
1255 <p>When entering a file path on non-Unix platforms, care should be taken
1256 to make sure that only forward slashed are used even though the platform
1257 may allow the use of back slashes. In general it is a good idea to always
1258 use forward slashes throughout the configuration files.</p>
1261 <h3>Consulte también</h3>
1263 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
1264 <li><a href="../logs.html">Apache HTTP Server Log Files</a></li>
1267 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1268 <div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">Directiva</a></h2>
1269 <table class="directive">
1270 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Format specification for error log entries</td></tr>
1271 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code> ErrorLog [connection|request] <var>format</var></code></td></tr>
1272 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1273 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1274 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1275 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.3.9 and later</td></tr>
1277 <p><code class="directive">ErrorLogFormat</code> allows to specify what
1278 supplementary information is logged in the error log in addition to the
1279 actual log message.</p>
1281 <div class="example"><h3>Simple example</h3><p><code>
1282 ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
1285 <p>Specifying <code>connection</code> or <code>request</code> as first
1286 paramter allows to specify additional formats, causing additional
1287 information to be logged when the first message is logged for a specific
1288 connection or request, respectivly. This additional information is only
1289 logged once per connection/request. If a connection or request is processed
1290 without causing any log message, the additional information is not logged
1293 <p>It can happen that some format string items do not produce output. For
1294 example, the Referer header is only present if the log message is
1295 associated to a request and the log message happens at a time when the
1296 Referer header has already been read from the client. If no output is
1297 produced, the default behaviour is to delete everything from the preceeding
1298 space character to the next space character. This means the log line is
1299 implicitly divided into fields on non-whitespace to whitespace transitions.
1300 If a format string item does not produce output, the whole field is
1301 ommitted. For example, if the remote address <code>%a</code> in the log
1302 format <code>[%t] [%l] [%a] %M </code> is not available, the surrounding
1303 brackets are not logged either. Space characters can be escaped with a
1304 backslash to prevent them from delimiting a field. The combination '% '
1305 (percent space) is a zero-witdh field delimiter that does not produce any
1308 <p>The above behaviour can be changed by adding modifiers to the format
1309 string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
1310 respective item does not produce any output. In once-per-connection/request
1311 formats, it is also possible to use the <code>+</code> (plus) modifier. If an
1312 item with the plus modifier does not produce any output, the whole line is
1315 <p>A number as modifier can be used to assign a log severity level to a
1316 format item. The item will only be logged if the severity of the log
1317 message is not higher than the specified log severity level. The number can
1318 range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
1320 <p>Some format string items accept additional parameters in braces.</p>
1322 <table class="bordered"><tr class="header"><th>Format String</th> <th>Description</th></tr>
1323 <tr><td><code>%%</code></td>
1324 <td>The percent sign</td></tr>
1325 <tr class="odd"><td><code>%...a</code></td>
1326 <td>Remote IP-address and port</td></tr>
1327 <tr><td><code>%...A</code></td>
1328 <td>Local IP-address and port</td></tr>
1329 <tr class="odd"><td><code>%...{name}e</code></td>
1330 <td>Request environment variable <code>name</code></td></tr>
1331 <tr><td><code>%...E</code></td>
1332 <td>APR/OS error status code and string</td></tr>
1333 <tr class="odd"><td><code>%...F</code></td>
1334 <td>Source file name and line number of the log call</td></tr>
1335 <tr><td><code>%...{name}i</code></td>
1336 <td>Request header <code>name</code></td></tr>
1337 <tr class="odd"><td><code>%...k</code></td>
1338 <td>Number of keep-alive requests on this connection</td></tr>
1339 <tr><td><code>%...l</code></td>
1340 <td>Loglevel of the message</td></tr>
1341 <tr class="odd"><td><code>%...L</code></td>
1342 <td>Log ID of the request</td></tr>
1343 <tr><td><code>%...{c}L</code></td>
1344 <td>Log ID of the connection</td></tr>
1345 <tr class="odd"><td><code>%...{C}L</code></td>
1346 <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
1347 <tr><td><code>%...m</code></td>
1348 <td>Name of the module logging the message</td></tr>
1349 <tr class="odd"><td><code>%M</code></td>
1350 <td>The actual log message</td></tr>
1351 <tr><td><code>%...{name}n</code></td>
1352 <td>Request note <code>name</code></td></tr>
1353 <tr class="odd"><td><code>%...P</code></td>
1354 <td>Process ID of current process</td></tr>
1355 <tr><td><code>%...T</code></td>
1356 <td>Thread ID of current thread</td></tr>
1357 <tr class="odd"><td><code>%...t</code></td>
1358 <td>The current time</td></tr>
1359 <tr><td><code>%...{u}t</code></td>
1360 <td>The current time including micro-seconds</td></tr>
1361 <tr class="odd"><td><code>%...{cu}t</code></td>
1362 <td>The current time in compact ISO 8601 format, including
1363 micro-seconds</td></tr>
1364 <tr><td><code>%...v</code></td>
1365 <td>The canonical <code class="directive"><a href="#servername">ServerName</a></code>
1366 of the current server.</td></tr>
1367 <tr class="odd"><td><code>%...V</code></td>
1368 <td>The server name of the server serving the request according to the
1369 <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>
1371 <tr><td><code>\ </code> (backslash space)</td>
1372 <td>Non-field delimiting space</td></tr>
1373 <tr class="odd"><td><code>% </code> (percent space)</td>
1374 <td>Field delimiter (no output)</td></tr>
1377 <p>The log ID format <code>%L</code> produces a unique id for a connection
1378 or request. This can be used to correlate which log lines belong to the
1379 same connection or request, which request happens on which connection.
1380 A <code>%L</code> format string is also available in
1381 <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code>, to allow to correlate access log entries
1382 with error log lines. If <code class="module"><a href="../mod/mod_unique_id.html">mod_unique_id</a></code> is loaded, its
1383 unique id will be used as log ID for requests.</p>
1385 <div class="example"><h3>Example (somewhat similar to default format)</h3><p><code>
1386 ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P] %7F: %E: [client\ %a]
1387 %M% ,\ referer\ %{Referer}i"
1390 <div class="example"><h3>Example (similar to the 2.2.x format)</h3><p><code>
1391 ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a]
1392 %M% ,\ referer\ %{Referer}i"
1395 <div class="example"><h3>Advanced example with request/connection log IDs</h3><p><code>
1396 ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"<br />
1397 ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"<br />
1398 ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"<br />
1399 ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"<br />
1400 ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"<br />
1404 <h3>Consulte también</h3>
1406 <li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
1407 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
1408 <li><a href="../logs.html">Apache HTTP Server Log Files</a></li>
1411 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1412 <div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Directiva</a></h2>
1413 <table class="directive">
1414 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Keep track of extended status information for each
1416 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ExtendedStatus On|Off</code></td></tr>
1417 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr>
1418 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
1419 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1420 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1422 <p>This option tracks additional data per worker about the
1423 currently executing request, and a utilization summary; you
1424 can see these variables during runtime by configuring
1425 <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>. Note that other modules may
1426 rely on this scoreboard.</p>
1428 <p>This setting applies to the entire server, and cannot be
1429 enabled or disabled on a virtualhost-by-virtualhost basis.
1430 The collection of extended status information can slow down
1431 the server. Also note that this setting cannot be changed
1432 during a graceful restart.</p>
1435 <p>Note that loading <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> will change
1436 the default behavior to ExtendedStatus On, while other
1437 third party modules may do the same. Such modules rely on
1438 collecting detailed information about the state of all workers.
1439 The default is changed by <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> beginning
1440 with version 2.3.6; the previous default was always Off.</p>
1445 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1446 <div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directiva</a></h2>
1447 <table class="directive">
1448 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>File attributes used to create the ETag
1449 HTTP response header for static files</td></tr>
1450 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
1451 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>FileETag INode MTime Size</code></td></tr>
1452 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1453 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
1454 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1455 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1458 The <code class="directive">FileETag</code> directive configures the file
1459 attributes that are used to create the <code>ETag</code> (entity
1460 tag) response header field when the document is based on a static file.
1461 (The <code>ETag</code> value is used in cache management to save
1462 network bandwidth.) The
1463 <code class="directive">FileETag</code> directive allows you to choose
1464 which of these -- if any -- should be used. The recognized keywords are:
1468 <dt><strong>INode</strong></dt>
1469 <dd>The file's i-node number will be included in the calculation</dd>
1470 <dt><strong>MTime</strong></dt>
1471 <dd>The date and time the file was last modified will be included</dd>
1472 <dt><strong>Size</strong></dt>
1473 <dd>The number of bytes in the file will be included</dd>
1474 <dt><strong>All</strong></dt>
1475 <dd>All available fields will be used. This is equivalent to:
1476 <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd>
1477 <dt><strong>None</strong></dt>
1478 <dd>If a document is file-based, no <code>ETag</code> field will be
1479 included in the response</dd>
1482 <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
1483 keywords may be prefixed with either <code>+</code> or <code>-</code>,
1484 which allow changes to be made to the default setting inherited
1485 from a broader scope. Any keyword appearing without such a prefix
1486 immediately and completely cancels the inherited setting.</p>
1488 <p>If a directory's configuration includes
1489 <code>FileETag INode MTime Size</code>, and a
1490 subdirectory's includes <code>FileETag -INode</code>,
1491 the setting for that subdirectory (which will be inherited by
1492 any sub-subdirectories that don't override it) will be equivalent to
1493 <code>FileETag MTime Size</code>.</p>
1494 <div class="warning"><h3>Warning</h3>
1495 Do not change the default for directories or locations that have WebDAV
1496 enabled and use <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider.
1497 <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>INode MTime Size</code>
1498 as a fixed format for <code>ETag</code> comparisons on conditional requests.
1499 These conditional requests will break if the <code>ETag</code> format is
1500 changed via <code class="directive">FileETag</code>.
1502 <div class="note"><h3>Server Side Includes</h3>
1503 An ETag is not generated for responses parsed by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>,
1504 since the response entity can change without a change of the INode, MTime, or Size
1505 of the static file with embedded SSI directives.
1510 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1511 <div class="directive-section"><h2><a name="Files" id="Files"><Files></a> <a name="files" id="files">Directiva</a></h2>
1512 <table class="directive">
1513 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply to matched
1515 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Files <var>filename</var>> ... </Files></code></td></tr>
1516 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1517 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1518 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1519 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1521 <p>The <code class="directive"><Files></code> directive
1522 limits the scope of the enclosed directives by filename. It is comparable
1523 to the <code class="directive"><a href="#directory"><Directory></a></code>
1524 and <code class="directive"><a href="#location"><Location></a></code>
1525 directives. It should be matched with a <code></Files></code>
1526 directive. The directives given within this section will be applied to
1527 any object with a basename (last component of filename) matching the
1528 specified filename. <code class="directive"><Files></code>
1529 sections are processed in the order they appear in the
1530 configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and
1531 <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location"><Location></a></code> sections. Note
1532 that <code class="directive"><Files></code> can be nested
1533 inside <code class="directive"><a href="#directory"><Directory></a></code> sections to restrict the
1534 portion of the filesystem they apply to.</p>
1536 <p>The <var>filename</var> argument should include a filename, or
1537 a wild-card string, where <code>?</code> matches any single character,
1538 and <code>*</code> matches any sequences of characters.
1539 <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular expressions</a>
1540 can also be used, with the addition of the
1541 <code>~</code> character. For example:</p>
1543 <div class="example"><p><code>
1544 <Files ~ "\.(gif|jpe?g|png)$">
1547 <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> is preferred,
1550 <p>Note that unlike <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#location"><Location></a></code> sections, <code class="directive"><Files></code> sections can be used inside
1551 <code>.htaccess</code> files. This allows users to control access to
1552 their own files, at a file-by-file level.</p>
1555 <h3>Consulte también</h3>
1557 <li><a href="../sections.html">How <Directory>, <Location>
1558 and <Files> sections work</a> for an explanation of how these
1559 different sections are combined when a request is received</li>
1562 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1563 <div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a> <a name="filesmatch" id="filesmatch">Directiva</a></h2>
1564 <table class="directive">
1565 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply to regular-expression matched
1567 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr>
1568 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1569 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1570 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1571 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1573 <p>The <code class="directive"><FilesMatch></code> directive
1574 limits the scope of the enclosed directives by filename, just as the
1575 <code class="directive"><a href="#files"><Files></a></code> directive
1576 does. However, it accepts a <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular
1577 expression</a>. For example:</p>
1579 <div class="example"><p><code>
1580 <FilesMatch "\.(gif|jpe?g|png)$">
1583 <p>would match most common Internet graphics formats.</p>
1585 <h3>Consulte también</h3>
1587 <li><a href="../sections.html">How <Directory>, <Location>
1588 and <Files> sections work</a> for an explanation of how these
1589 different sections are combined when a request is received</li>
1592 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1593 <div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directiva</a></h2>
1594 <table class="directive">
1595 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Forces all matching files to be served with the specified
1596 media type in the HTTP Content-Type header field</td></tr>
1597 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr>
1598 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
1599 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
1600 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1601 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1602 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Moved to the core in Apache httpd 2.0</td></tr>
1604 <p>When placed into an <code>.htaccess</code> file or a
1605 <code class="directive"><a href="#directory"><Directory></a></code>, or
1606 <code class="directive"><a href="#location"><Location></a></code> or
1607 <code class="directive"><a href="#files"><Files></a></code>
1608 section, this directive forces all matching files to be served
1609 with the content type identification given by
1610 <var>media-type</var>. For example, if you had a directory full of
1611 GIF files, but did not want to label them all with <code>.gif</code>,
1612 you might want to use:</p>
1614 <div class="example"><p><code>
1618 <p>Note that this directive overrides other indirect media type
1619 associations defined in mime.types or via the
1620 <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code>.</p>
1622 <p>You can also override more general
1623 <code class="directive">ForceType</code> settings
1624 by using the value of <code>None</code>:</p>
1626 <div class="example"><p><code>
1627 # force all files to be image/gif:<br />
1628 <Location /images><br />
1629 <span class="indent">
1630 ForceType image/gif<br />
1632 </Location><br />
1634 # but normal mime-type associations here:<br />
1635 <Location /images/mixed><br />
1636 <span class="indent">
1637 ForceType None<br />
1642 <p>This directive primarily overrides the content types generated for
1643 static files served out of the filesystem. For resources other than
1644 static files, where the generator of the response typically specifies
1645 a Content-Type, this directive has no effect.</p>
1649 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1650 <div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">Directiva</a></h2>
1651 <table class="directive">
1652 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Directory to write gmon.out profiling data to. </td></tr>
1653 <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>
1654 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1655 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1656 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1658 <p>When the server has been compiled with gprof profiling support,
1659 <code class="directive">GprofDir</code> causes <code>gmon.out</code> files to
1660 be written to the specified directory when the process exits. If the
1661 argument ends with a percent symbol ('%'), subdirectories are created
1662 for each process id.</p>
1664 <p>This directive currently only works with the <code class="module"><a href="../mod/prefork.html">prefork</a></code>
1668 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1669 <div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directiva</a></h2>
1670 <table class="directive">
1671 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
1672 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
1673 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>HostnameLookups Off</code></td></tr>
1674 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
1675 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1676 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1678 <p>This directive enables DNS lookups so that host names can be
1679 logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
1680 The value <code>Double</code> refers to doing double-reverse
1681 DNS lookup. That is, after a reverse lookup is performed, a forward
1682 lookup is then performed on that result. At least one of the IP
1683 addresses in the forward lookup must match the original
1684 address. (In "tcpwrappers" terminology this is called
1685 <code>PARANOID</code>.)</p>
1687 <p>Regardless of the setting, when <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> is
1688 used for controlling access by hostname, a double reverse lookup
1689 will be performed. This is necessary for security. Note that the
1690 result of this double-reverse isn't generally available unless you
1691 set <code>HostnameLookups Double</code>. For example, if only
1692 <code>HostnameLookups On</code> and a request is made to an object
1693 that is protected by hostname restrictions, regardless of whether
1694 the double-reverse fails or not, CGIs will still be passed the
1695 single-reverse result in <code>REMOTE_HOST</code>.</p>
1697 <p>The default is <code>Off</code> in order to save the network
1698 traffic for those sites that don't truly need the reverse
1699 lookups done. It is also better for the end users because they
1700 don't have to suffer the extra latency that a lookup entails.
1701 Heavily loaded sites should leave this directive
1702 <code>Off</code>, since DNS lookups can take considerable
1703 amounts of time. The utility <code class="program"><a href="../programs/logresolve.html">logresolve</a></code>, compiled by
1704 default to the <code>bin</code> subdirectory of your installation
1705 directory, can be used to look up host names from logged IP addresses
1709 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1710 <div class="directive-section"><h2><a name="If" id="If"><If></a> <a name="if" id="if">Directiva</a></h2>
1711 <table class="directive">
1712 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only if a condition is
1713 satisfied by a request at runtime</td></tr>
1714 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr>
1715 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1716 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1717 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1718 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1720 <p>The <code class="directive"><If></code> directive
1721 evaluates an expression at runtime, and applies the enclosed
1722 directives if and only if the expression evaluates to true.
1725 <div class="example"><p><code>
1726 <If "$req{Host} = ''">
1729 <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
1731 <p>You may compare the value of any variable in the request headers
1732 ($req), response headers ($resp) or environment ($env) in your
1735 <p>Apart from <code>=</code>, <code>If</code> can use the <code>IN</code>
1736 operator to compare if the expression is in a given range:</p>
1738 <div class="example"><p><code>
1739 <If %{REQUEST_METHOD} IN GET,HEAD,OPTIONS>
1743 <h3>Consulte también</h3>
1745 <li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
1746 for a complete reference and more examples.</li>
1747 <li><a href="../sections.html">How <Directory>, <Location>,
1748 <Files> sections work</a> for an explanation of how these
1749 different sections are combined when a request is received.
1750 <code class="directive"><If></code> has the same precedence
1751 and usage as <code class="directive"><Files></code></li>
1754 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1755 <div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a> <a name="ifdefine" id="ifdefine">Directiva</a></h2>
1756 <table class="directive">
1757 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that will be processed only
1758 if a test is true at startup</td></tr>
1759 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ...
1760 </IfDefine></code></td></tr>
1761 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1762 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1763 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1764 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1766 <p>The <code><IfDefine <var>test</var>>...</IfDefine>
1767 </code> section is used to mark directives that are conditional. The
1768 directives within an <code class="directive"><IfDefine></code>
1769 section are only processed if the <var>test</var> is true. If <var>
1770 test</var> is false, everything between the start and end markers is
1773 <p>The <var>test</var> in the <code class="directive"><IfDefine></code> section directive can be one of two forms:</p>
1776 <li><var>parameter-name</var></li>
1778 <li><code>!</code><var>parameter-name</var></li>
1781 <p>In the former case, the directives between the start and end
1782 markers are only processed if the parameter named
1783 <var>parameter-name</var> is defined. The second format reverses
1784 the test, and only processes the directives if
1785 <var>parameter-name</var> is <strong>not</strong> defined.</p>
1787 <p>The <var>parameter-name</var> argument is a define as given on the
1788 <code class="program"><a href="../programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
1789 </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
1791 <p><code class="directive"><IfDefine></code> sections are
1792 nest-able, which can be used to implement simple
1793 multiple-parameter tests. Example:</p>
1795 <div class="example"><p><code>
1796 httpd -DReverseProxy -DUseCache -DMemCache ...<br />
1799 <IfDefine ReverseProxy><br />
1800 <span class="indent">
1801 LoadModule proxy_module modules/mod_proxy.so<br />
1802 LoadModule proxy_http_module modules/mod_proxy_http.so<br />
1803 <IfDefine UseCache><br />
1804 <span class="indent">
1805 LoadModule cache_module modules/mod_cache.so<br />
1806 <IfDefine MemCache><br />
1807 <span class="indent">
1808 LoadModule mem_cache_module modules/mod_mem_cache.so<br />
1810 </IfDefine><br />
1811 <IfDefine !MemCache><br />
1812 <span class="indent">
1813 LoadModule cache_disk_module modules/mod_cache_disk.so<br />
1823 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1824 <div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a> <a name="ifmodule" id="ifmodule">Directiva</a></h2>
1825 <table class="directive">
1826 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Encloses directives that are processed conditional on the
1827 presence or absence of a specific module</td></tr>
1828 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ...
1829 </IfModule></code></td></tr>
1830 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1831 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
1832 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1833 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1834 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Module identifiers are available in version 2.1 and
1837 <p>The <code><IfModule <var>test</var>>...</IfModule></code>
1838 section is used to mark directives that are conditional on the presence of
1839 a specific module. The directives within an <code class="directive"><IfModule></code> section are only processed if the <var>test</var>
1840 is true. If <var>test</var> is false, everything between the start and
1841 end markers is ignored.</p>
1843 <p>The <var>test</var> in the <code class="directive"><IfModule></code> section directive can be one of two forms:</p>
1846 <li><var>module</var></li>
1848 <li>!<var>module</var></li>
1851 <p>In the former case, the directives between the start and end
1852 markers are only processed if the module named <var>module</var>
1853 is included in Apache httpd -- either compiled in or
1854 dynamically loaded using <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
1855 and only processes the directives if <var>module</var> is
1856 <strong>not</strong> included.</p>
1858 <p>The <var>module</var> argument can be either the module identifier or
1859 the file name of the module, at the time it was compiled. For example,
1860 <code>rewrite_module</code> is the identifier and
1861 <code>mod_rewrite.c</code> is the file name. If a module consists of
1862 several source files, use the name of the file containing the string
1863 <code>STANDARD20_MODULE_STUFF</code>.</p>
1865 <p><code class="directive"><IfModule></code> sections are
1866 nest-able, which can be used to implement simple multiple-module
1869 <div class="note">This section should only be used if you need to have one
1870 configuration file that works whether or not a specific module
1871 is available. In normal operation, directives need not be
1872 placed in <code class="directive"><IfModule></code>
1876 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1877 <div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directiva</a></h2>
1878 <table class="directive">
1879 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Includes other configuration files from within
1880 the server configuration files</td></tr>
1881 <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>
1882 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
1883 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1884 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1885 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Wildcard matching available in 2.0.41 and later, directory
1886 wildcard matching available in 2.3.6 and later</td></tr>
1888 <p>This directive allows inclusion of other configuration files
1889 from within the server configuration files.</p>
1891 <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
1892 in the filename or directory parts of the path to include several files
1893 at once, in alphabetical order. In addition, if
1894 <code class="directive">Include</code> points to a directory, rather than a file,
1895 Apache httpd will read all files in that directory and any subdirectory.
1896 However, including entire directories is not recommended, because it is
1897 easy to accidentally leave temporary files in a directory that can cause
1898 <code class="program"><a href="../programs/httpd.html">httpd</a></code> to fail. Instead, we encourage you to use the
1899 wildcard syntax shown below, to include files that match a particular
1900 pattern, such as *.conf, for example.</p>
1902 <p>When a wildcard is specified for a <strong>file</strong> component of
1903 the path, and no file matches the wildcard, the
1904 <code class="directive"><a href="#include">Include</a></code>
1905 directive will be <strong>silently ignored</strong>. When a wildcard is
1906 specified for a <strong>directory</strong> component of the path, and
1907 no directory matches the wildcard, the
1908 <code class="directive"><a href="#include">Include</a></code> directive will
1909 <strong>fail with an error</strong> saying the directory cannot be found.
1912 <p>For further control over the behaviour of the server when no files or
1913 directories match, prefix the path with the modifiers <var>optional</var>
1914 or <var>strict</var>. If <var>optional</var> is specified, any wildcard
1915 file or directory that does not match will be silently ignored. If
1916 <var>strict</var> is specified, any wildcard file or directory that does
1917 not match at least one file will cause server startup to fail.</p>
1919 <p>When a directory or file component of the path is
1920 specified exactly, and that directory or file does not exist,
1921 <code class="directive"><a href="#include">Include</a></code> directive will fail with an
1922 error saying the file or directory cannot be found.</p>
1924 <p>The file path specified may be an absolute path, or may be relative
1925 to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
1929 <div class="example"><p><code>
1930 Include /usr/local/apache2/conf/ssl.conf<br />
1931 Include /usr/local/apache2/conf/vhosts/*.conf
1934 <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
1936 <div class="example"><p><code>
1937 Include conf/ssl.conf<br />
1938 Include conf/vhosts/*.conf
1941 <p>Wildcards may be included in the directory or file portion of the
1942 path. In the following example, the server will fail to load if no
1943 directories match conf/vhosts/*, but will load successfully if no
1944 files match *.conf.</p>
1946 <div class="example"><p><code>
1947 Include conf/vhosts/*/vhost.conf<br />
1948 Include conf/vhosts/*/*.conf
1951 <p>In this example, the server will fail to load if either
1952 conf/vhosts/* matches no directories, or if *.conf matches no files:</p>
1954 <div class="example"><p><code>
1955 Include strict conf/vhosts/*/*.conf
1958 <p>In this example, the server load successfully if either conf/vhosts/*
1959 matches no directories, or if *.conf matches no files:</p>
1961 <div class="example"><p><code>
1962 Include optional conf/vhosts/*/*.conf
1966 <h3>Consulte también</h3>
1968 <li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
1971 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1972 <div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">Directiva</a></h2>
1973 <table class="directive">
1974 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Includes other configuration files from within
1975 the server configuration files</td></tr>
1976 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr>
1977 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
1978 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1979 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1980 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in 2.3.6 and later</td></tr>
1981 </table><p>The documentation for this directive has
1982 not been translated yet. Please have a look at the English
1983 version.</p><h3>Consulte también</h3>
1985 <li><code class="directive"><a href="#include">Include</a></code></li>
1986 <li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
1989 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1990 <div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directiva</a></h2>
1991 <table class="directive">
1992 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Enables HTTP persistent connections</td></tr>
1993 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>KeepAlive On|Off</code></td></tr>
1994 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>KeepAlive On</code></td></tr>
1995 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
1996 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
1997 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
1999 <p>The Keep-Alive extension to HTTP/1.0 and the persistent
2000 connection feature of HTTP/1.1 provide long-lived HTTP sessions
2001 which allow multiple requests to be sent over the same TCP
2002 connection. In some cases this has been shown to result in an
2003 almost 50% speedup in latency times for HTML documents with
2004 many images. To enable Keep-Alive connections, set
2005 <code>KeepAlive On</code>.</p>
2007 <p>For HTTP/1.0 clients, Keep-Alive connections will only be
2008 used if they are specifically requested by a client. In
2009 addition, a Keep-Alive connection with an HTTP/1.0 client can
2010 only be used when the length of the content is known in
2011 advance. This implies that dynamic content such as CGI output,
2012 SSI pages, and server-generated directory listings will
2013 generally not use Keep-Alive connections to HTTP/1.0 clients.
2014 For HTTP/1.1 clients, persistent connections are the default
2015 unless otherwise specified. If the client requests it, chunked
2016 encoding will be used in order to send content of unknown
2017 length over persistent connections.</p>
2019 <p>When a client uses a Keep-Alive connection it will be counted
2020 as a single "request" for the <code class="directive"><a href="../mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code> directive, regardless
2021 of how many requests are sent using the connection.</p>
2023 <h3>Consulte también</h3>
2025 <li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
2028 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2029 <div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directiva</a></h2>
2030 <table class="directive">
2031 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Amount of time the server will wait for subsequent
2032 requests on a persistent connection</td></tr>
2033 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr>
2034 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
2035 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2036 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2037 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2038 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Specifying a value in milliseconds is available in
2039 Apache httpd 2.3.2 and later</td></tr>
2041 <p>The number of seconds Apache httpd will wait for a subsequent
2042 request before closing the connection. By adding a postfix of ms the
2043 timeout can be also set in milliseconds. Once a request has been
2044 received, the timeout value specified by the
2045 <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
2047 <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
2048 may cause performance problems in heavily loaded servers. The
2049 higher the timeout, the more server processes will be kept
2050 occupied waiting on connections with idle clients.</p>
2052 <p>In a name-based virtual host context, the value of the first
2053 defined virtual host (the default host) in a set of <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> will be used.
2054 The other values will be ignored.</p>
2057 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2058 <div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">Directiva</a></h2>
2059 <table class="directive">
2060 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restrict enclosed access controls to only certain HTTP
2062 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ...
2063 </Limit></code></td></tr>
2064 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
2065 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>AuthConfig, Limit</td></tr>
2066 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2067 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2069 <p>Access controls are normally effective for
2070 <strong>all</strong> access methods, and this is the usual
2071 desired behavior. <strong>In the general case, access control
2072 directives should not be placed within a
2073 <code class="directive"><Limit></code> section.</strong></p>
2075 <p>The purpose of the <code class="directive"><Limit></code>
2076 directive is to restrict the effect of the access controls to the
2077 nominated HTTP methods. For all other methods, the access
2078 restrictions that are enclosed in the <code class="directive"><Limit></code> bracket <strong>will have no
2079 effect</strong>. The following example applies the access control
2080 only to the methods <code>POST</code>, <code>PUT</code>, and
2081 <code>DELETE</code>, leaving all other methods unprotected:</p>
2083 <div class="example"><p><code>
2084 <Limit POST PUT DELETE><br />
2085 <span class="indent">
2086 Require valid-user<br />
2091 <p>The method names listed can be one or more of: <code>GET</code>,
2092 <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
2093 <code>CONNECT</code>, <code>OPTIONS</code>,
2094 <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
2095 <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
2096 <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
2097 case-sensitive.</strong> If <code>GET</code> is used it will also
2098 restrict <code>HEAD</code> requests. The <code>TRACE</code> method
2099 cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p>
2101 <div class="warning">A <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section should always be
2102 used in preference to a <code class="directive"><Limit></code>
2103 section when restricting access, since a <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section provides protection
2104 against arbitrary methods.</div>
2106 <p>The <code class="directive"><Limit></code> and
2107 <code class="directive"><a href="#limitexcept"><LimitExcept></a></code>
2108 directives may be nested. In this case, each successive level of
2109 <code class="directive"><Limit></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> directives must
2110 further restrict the set of methods to which access controls apply.</p>
2112 <div class="warning">When using
2113 <code class="directive"><Limit></code> or
2114 <code class="directive"><LimitExcept></code> directives with
2115 the <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive,
2116 note that the first <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>
2117 to succeed authorizes the request, regardless of the presence of other
2118 <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directives.</div>
2120 <p>For example, given the following configuration, all users will
2121 be authorized for <code>POST</code> requests, and the
2122 <code>Require group editors</code> directive will be ignored
2125 <div class="example"><p><code>
2126 <LimitExcept GET>
2127 <span class="indent">
2130 </LimitExcept><br />
2132 <span class="indent">
2133 Require group editors
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="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">Directiva</a></h2>
2141 <table class="directive">
2142 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restrict access controls to all HTTP methods
2143 except the named ones</td></tr>
2144 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ...
2145 </LimitExcept></code></td></tr>
2146 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>directory, .htaccess</td></tr>
2147 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>AuthConfig, Limit</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>
2151 <p><code class="directive"><LimitExcept></code> and
2152 <code></LimitExcept></code> are used to enclose
2153 a group of access control directives which will then apply to any
2154 HTTP access method <strong>not</strong> listed in the arguments;
2155 i.e., it is the opposite of a <code class="directive"><a href="#limit"><Limit></a></code> section and can be used to control
2156 both standard and nonstandard/unrecognized methods. See the
2157 documentation for <code class="directive"><a href="#limit"><Limit></a></code> for more details.</p>
2161 <div class="example"><p><code>
2162 <LimitExcept POST GET><br />
2163 <span class="indent">
2164 Require valid-user<br />
2166 </LimitExcept>
2171 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2172 <div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directiva</a></h2>
2173 <table class="directive">
2174 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determine maximum number of internal redirects and nested
2175 subrequests</td></tr>
2176 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
2177 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
2178 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2179 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2180 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2181 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.0.47 and later</td></tr>
2183 <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
2184 redirects the original request to a CGI script. A subrequest is Apache httpd's
2185 mechanism to find out what would happen for some URI if it were requested.
2186 For example, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
2187 files listed in the <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
2190 <p><code class="directive">LimitInternalRecursion</code> prevents the server
2191 from crashing when entering an infinite loop of internal redirects or
2192 subrequests. Such loops are usually caused by misconfigurations.</p>
2194 <p>The directive stores two different limits, which are evaluated on
2195 per-request basis. The first <var>number</var> is the maximum number of
2196 internal redirects, that may follow each other. The second <var>number</var>
2197 determines, how deep subrequests may be nested. If you specify only one
2198 <var>number</var>, it will be assigned to both limits.</p>
2200 <div class="example"><h3>Example</h3><p><code>
2201 LimitInternalRecursion 5
2205 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2206 <div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directiva</a></h2>
2207 <table class="directive">
2208 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Restricts the total size of the HTTP request body sent
2209 from the client</td></tr>
2210 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
2211 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestBody 0</code></td></tr>
2212 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2213 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
2214 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2215 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2217 <p>This directive specifies the number of <var>bytes</var> from 0
2218 (meaning unlimited) to 2147483647 (2GB) that are allowed in a
2219 request body. See the note below for the limited applicability
2220 to proxy requests.</p>
2222 <p>The <code class="directive">LimitRequestBody</code> directive allows
2223 the user to set a limit on the allowed size of an HTTP request
2224 message body within the context in which the directive is given
2225 (server, per-directory, per-file or per-location). If the client
2226 request exceeds that limit, the server will return an error
2227 response instead of servicing the request. The size of a normal
2228 request message body will vary greatly depending on the nature of
2229 the resource and the methods allowed on that resource. CGI scripts
2230 typically use the message body for retrieving form information.
2231 Implementations of the <code>PUT</code> method will require
2232 a value at least as large as any representation that the server
2233 wishes to accept for that resource.</p>
2235 <p>This directive gives the server administrator greater
2236 control over abnormal client request behavior, which may be
2237 useful for avoiding some forms of denial-of-service
2240 <p>If, for example, you are permitting file upload to a particular
2241 location, and wish to limit the size of the uploaded file to 100K,
2242 you might use the following directive:</p>
2244 <div class="example"><p><code>
2245 LimitRequestBody 102400
2248 <div class="note"><p>For a full description of how this directive is interpreted by
2249 proxy requests, see the <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> documentation.</p>
2254 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2255 <div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directiva</a></h2>
2256 <table class="directive">
2257 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the number of HTTP request header fields that
2258 will be accepted from the client</td></tr>
2259 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
2260 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestFields 100</code></td></tr>
2261 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2262 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2263 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2265 <p><var>Number</var> is an integer from 0 (meaning unlimited) to
2266 32767. The default value is defined by the compile-time
2267 constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
2270 <p>The <code class="directive">LimitRequestFields</code> directive allows
2271 the server administrator to modify the limit on the number of
2272 request header fields allowed in an HTTP request. A server needs
2273 this value to be larger than the number of fields that a normal
2274 client request might include. The number of request header fields
2275 used by a client rarely exceeds 20, but this may vary among
2276 different client implementations, often depending upon the extent
2277 to which a user has configured their browser to support detailed
2278 content negotiation. Optional HTTP extensions are often expressed
2279 using request header fields.</p>
2281 <p>This directive gives the server administrator greater
2282 control over abnormal client request behavior, which may be
2283 useful for avoiding some forms of denial-of-service attacks.
2284 The value should be increased if normal clients see an error
2285 response from the server that indicates too many fields were
2286 sent in the request.</p>
2290 <div class="example"><p><code>
2291 LimitRequestFields 50
2294 <div class="warning"><h3>Warning</h3>
2295 <p> When name-based virtual hosting is used, the value for this
2296 directive is taken from the default (first-listed) virtual host for the
2297 <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
2302 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2303 <div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directiva</a></h2>
2304 <table class="directive">
2305 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the size of the HTTP request header allowed from the
2307 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr>
2308 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr>
2309 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2310 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2311 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2313 <p>This directive specifies the number of <var>bytes</var>
2314 that will be allowed in an HTTP request header.</p>
2316 <p>The <code class="directive">LimitRequestFieldSize</code> directive
2317 allows the server administrator to reduce or increase the limit
2318 on the allowed size of an HTTP request header field. A server
2319 needs this value to be large enough to hold any one header field
2320 from a normal client request. The size of a normal request header
2321 field will vary greatly among different client implementations,
2322 often depending upon the extent to which a user has configured
2323 their browser to support detailed content negotiation. SPNEGO
2324 authentication headers can be up to 12392 bytes.</p>
2326 <p>This directive gives the server administrator greater
2327 control over abnormal client request behavior, which may be
2328 useful for avoiding some forms of denial-of-service attacks.</p>
2332 <div class="example"><p><code>
2333 LimitRequestFieldSize 4094
2336 <div class="note">Under normal conditions, the value should not be changed from
2339 <div class="warning"><h3>Warning</h3>
2340 <p> When name-based virtual hosting is used, the value for this
2341 directive is taken from the default (first-listed) virtual host for the
2342 <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
2347 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2348 <div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directiva</a></h2>
2349 <table class="directive">
2350 <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
2351 from the client</td></tr>
2352 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
2353 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
2354 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2355 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2356 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2358 <p>This directive sets the number of <var>bytes</var> that will be
2359 allowed on the HTTP request-line.</p>
2361 <p>The <code class="directive">LimitRequestLine</code> directive allows
2362 the server administrator to reduce or increase the limit on the allowed size
2363 of a client's HTTP request-line. Since the request-line consists of the
2364 HTTP method, URI, and protocol version, the
2365 <code class="directive">LimitRequestLine</code> directive places a
2366 restriction on the length of a request-URI allowed for a request
2367 on the server. A server needs this value to be large enough to
2368 hold any of its resource names, including any information that
2369 might be passed in the query part of a <code>GET</code> request.</p>
2371 <p>This directive gives the server administrator greater
2372 control over abnormal client request behavior, which may be
2373 useful for avoiding some forms of denial-of-service attacks.</p>
2377 <div class="example"><p><code>
2378 LimitRequestLine 4094
2381 <div class="note">Under normal conditions, the value should not be changed from
2384 <div class="warning"><h3>Warning</h3>
2385 <p> When name-based virtual hosting is used, the value for this
2386 directive is taken from the default (first-listed) virtual host for the
2387 <code class="directive">NameVirtualHost</code> the connection was mapped to.</p>
2392 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2393 <div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directiva</a></h2>
2394 <table class="directive">
2395 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the size of an XML-based request body</td></tr>
2396 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
2397 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
2398 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2399 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
2400 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2401 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2403 <p>Limit (in bytes) on maximum size of an XML-based request
2404 body. A value of <code>0</code> will disable any checking.</p>
2408 <div class="example"><p><code>
2409 LimitXMLRequestBody 0
2414 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2415 <div class="directive-section"><h2><a name="Location" id="Location"><Location></a> <a name="location" id="location">Directiva</a></h2>
2416 <table class="directive">
2417 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Applies the enclosed directives only to matching
2419 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><Location
2420 <var>URL-path</var>|<var>URL</var>> ... </Location></code></td></tr>
2421 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2422 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2423 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2425 <p>The <code class="directive"><Location></code> directive
2426 limits the scope of the enclosed directives by URL. It is similar to the
2427 <code class="directive"><a href="#directory"><Directory></a></code>
2428 directive, and starts a subsection which is terminated with a
2429 <code></Location></code> directive. <code class="directive"><Location></code> sections are processed in the
2430 order they appear in the configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and
2431 <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files"><Files></a></code> sections.</p>
2433 <p><code class="directive"><Location></code> sections operate
2434 completely outside the filesystem. This has several consequences.
2435 Most importantly, <code class="directive"><Location></code>
2436 directives should not be used to control access to filesystem
2437 locations. Since several different URLs may map to the same
2438 filesystem location, such access controls may by circumvented.</p>
2440 <p>The enclosed directives will be applied to the request if the path component
2441 of the URL meets <em>any</em> of the following criteria:
2444 <li>The specified location matches exactly the path component of the URL.
2446 <li>The specified location, which ends in a forward slash, is a prefix
2447 of the path component of the URL (treated as a context root).
2449 <li>The specified location, with the addition of a trailing slash, is a
2450 prefix of the path component of the URL (also treated as a context root).
2454 In the example below, where no trailing slash is used, requests to
2455 /private1, /private1/ and /private1/file.txt will have the enclosed
2456 directives applied, but /private1other would not.
2458 <div class="example"><p><code>
2459 <Location /private1>
2463 In the example below, where a trailing slash is used, requests to
2464 /private2/ and /private2/file.txt will have the enclosed
2465 directives applied, but /private2 and /private2other would not.
2467 <div class="example"><p><code>
2468 <Location /private2<em>/</em>>
2472 <div class="note"><h3>When to use <code class="directive"><Location></code></h3>
2474 <p>Use <code class="directive"><Location></code> to apply
2475 directives to content that lives outside the filesystem. For
2476 content that lives in the filesystem, use <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#files"><Files></a></code>. An exception is
2477 <code><Location /></code>, which is an easy way to
2478 apply a configuration to the entire server.</p>
2481 <p>For all origin (non-proxy) requests, the URL to be matched is a
2482 URL-path of the form <code>/path/</code>. <em>No scheme, hostname,
2483 port, or query string may be included.</em> For proxy requests, the
2484 URL to be matched is of the form
2485 <code>scheme://servername/path</code>, and you must include the
2488 <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
2489 any single character, and <code>*</code> matches any sequences of
2490 characters. Neither wildcard character matches a / in the URL-path.</p>
2492 <p><a class="glossarylink" href="../glossary.html#regex" title="ver glosario">Regular expressions</a>
2493 can also be used, with the addition of the <code>~</code>
2494 character. For example:</p>
2496 <div class="example"><p><code>
2497 <Location ~ "/(extra|special)/data">
2500 <p>would match URLs that contained the substring <code>/extra/data</code>
2501 or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> behaves
2502 identical to the regex version of <code class="directive"><Location></code>, and is preferred, for the
2503 simple reason that <code>~</code> is hard to distinguish from
2504 <code>-</code> in many fonts.</p>
2506 <p>The <code class="directive"><Location></code>
2507 functionality is especially useful when combined with the
2508 <code class="directive"><a href="#sethandler">SetHandler</a></code>
2509 directive. For example, to enable status requests, but allow them
2510 only from browsers at <code>example.com</code>, you might use:</p>
2512 <div class="example"><p><code>
2513 <Location /status><br />
2514 <span class="indent">
2515 SetHandler server-status<br />
2516 Require host example.com<br />
2521 <div class="note"><h3>Note about / (slash)</h3>
2522 <p>The slash character has special meaning depending on where in a
2523 URL it appears. People may be used to its behavior in the filesystem
2524 where multiple adjacent slashes are frequently collapsed to a single
2525 slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
2526 <code>/home/foo</code>). In URL-space this is not necessarily true.
2527 The <code class="directive"><a href="#locationmatch"><LocationMatch></a></code>
2528 directive and the regex version of <code class="directive"><Location></code> require you to explicitly specify multiple
2529 slashes if that is your intention.</p>
2531 <p>For example, <code><LocationMatch ^/abc></code> would match
2532 the request URL <code>/abc</code> but not the request URL <code>
2533 //abc</code>. The (non-regex) <code class="directive"><Location></code> directive behaves similarly when used for
2534 proxy requests. But when (non-regex) <code class="directive"><Location></code> is used for non-proxy requests it will
2535 implicitly match multiple slashes with a single slash. For example,
2536 if you specify <code><Location /abc/def></code> and the
2537 request is to <code>/abc//def</code> then it will match.</p>
2540 <h3>Consulte también</h3>
2542 <li><a href="../sections.html">How <Directory>, <Location>
2543 and <Files> sections work</a> for an explanation of how these
2544 different sections are combined when a request is received.</li>
2545 <li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li>
2548 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2549 <div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">Directiva</a></h2>
2550 <table class="directive">
2551 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Applies the enclosed directives only to regular-expression
2552 matching URLs</td></tr>
2553 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><LocationMatch
2554 <var>regex</var>> ... </LocationMatch></code></td></tr>
2555 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2556 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2557 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2559 <p>The <code class="directive"><LocationMatch></code> directive
2560 limits the scope of the enclosed directives by URL, in an identical manner
2561 to <code class="directive"><a href="#location"><Location></a></code>. However,
2562 it takes a <a class="glossarylink" href="../glossary.html#regex" title="ver glosario">regular expression</a>
2563 as an argument instead of a simple string. For example:</p>
2565 <div class="example"><p><code>
2566 <LocationMatch "/(extra|special)/data">
2569 <p>would match URLs that contained the substring <code>/extra/data</code>
2570 or <code>/special/data</code>.</p>
2572 <h3>Consulte también</h3>
2574 <li><a href="../sections.html">How <Directory>, <Location>
2575 and <Files> sections work</a> for an explanation of how these
2576 different sections are combined when a request is received</li>
2579 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2580 <div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directiva</a></h2>
2581 <table class="directive">
2582 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
2583 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LogLevel [<var>module</var>:]<var>level</var>
2584 [<var>module</var>:<var>level</var>] ...
2586 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>LogLevel warn</code></td></tr>
2587 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
2588 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2589 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2590 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Per-module and per-directory configuration is available in
2591 Apache HTTP Server 2.3.6 and later</td></tr>
2593 <p><code class="directive">LogLevel</code> adjusts the verbosity of the
2594 messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
2595 <var>level</var>s are available, in order of decreasing
2598 <table class="bordered">
2601 <th><strong>Level</strong> </th>
2603 <th><strong>Description</strong> </th>
2605 <th><strong>Example</strong> </th>
2609 <td><code>emerg</code> </td>
2611 <td>Emergencies - system is unusable.</td>
2613 <td>"Child cannot open lock file. Exiting"</td>
2617 <td><code>alert</code> </td>
2619 <td>Action must be taken immediately.</td>
2621 <td>"getpwuid: couldn't determine user name from uid"</td>
2625 <td><code>crit</code> </td>
2627 <td>Critical Conditions.</td>
2629 <td>"socket: Failed to get a socket, exiting child"</td>
2633 <td><code>error</code> </td>
2635 <td>Error conditions.</td>
2637 <td>"Premature end of script headers"</td>
2641 <td><code>warn</code> </td>
2643 <td>Warning conditions.</td>
2645 <td>"child process 1234 did not exit, sending another
2650 <td><code>notice</code> </td>
2652 <td>Normal but significant condition.</td>
2654 <td>"httpd: caught SIGBUS, attempting to dump core in
2659 <td><code>info</code> </td>
2661 <td>Informational.</td>
2663 <td>"Server seems busy, (you may need to increase
2664 StartServers, or Min/MaxSpareServers)..."</td>
2668 <td><code>debug</code> </td>
2670 <td>Debug-level messages</td>
2672 <td>"Opening config file ..."</td>
2675 <td><code>trace1</code> </td>
2677 <td>Trace messages</td>
2679 <td>"proxy: FTP: control connection complete"</td>
2682 <td><code>trace2</code> </td>
2684 <td>Trace messages</td>
2686 <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td>
2689 <td><code>trace3</code> </td>
2691 <td>Trace messages</td>
2693 <td>"openssl: Handshake: start"</td>
2696 <td><code>trace4</code> </td>
2698 <td>Trace messages</td>
2700 <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td>
2703 <td><code>trace5</code> </td>
2705 <td>Trace messages</td>
2707 <td>"map lookup FAILED: map=rewritemap key=keyname"</td>
2710 <td><code>trace6</code> </td>
2712 <td>Trace messages</td>
2714 <td>"cache lookup FAILED, forcing new map lookup"</td>
2717 <td><code>trace7</code> </td>
2719 <td>Trace messages, dumping large amounts of data</td>
2721 <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
2724 <td><code>trace8</code> </td>
2726 <td>Trace messages, dumping large amounts of data</td>
2728 <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
2732 <p>When a particular level is specified, messages from all
2733 other levels of higher significance will be reported as well.
2734 <em>E.g.</em>, when <code>LogLevel info</code> is specified,
2735 then messages with log levels of <code>notice</code> and
2736 <code>warn</code> will also be posted.</p>
2738 <p>Using a level of at least <code>crit</code> is
2743 <div class="example"><p><code>
2747 <div class="note"><h3>Note</h3>
2748 <p>When logging to a regular file messages of the level
2749 <code>notice</code> cannot be suppressed and thus are always
2750 logged. However, this doesn't apply when logging is done
2751 using <code>syslog</code>.</p>
2754 <p>Specifying a level without a module name will reset the level
2755 for all modules to that level. Specifying a level with a module
2756 name will set the level for that module only. It is possible to
2757 use the module source file name, the module identifier, or the
2758 module identifier with the trailing <code>_module</code> omitted
2759 as module specification. This means the following three specifications
2762 <div class="example"><p><code>
2763 LogLevel info ssl:warn<br />
2764 LogLevel info mod_ssl.c:warn<br />
2765 LogLevel info ssl_module:warn<br />
2768 <p>It is also possible to change the level per directory:</p>
2770 <div class="example"><p><code>
2772 <Directory /usr/local/apache/htdocs/app><br />
2773 LogLevel debug<br />
2778 Per directory loglevel configuration only affects messages that are
2779 logged after the request has been parsed and that are associated with
2780 the request. Log messages which are associated with the connection or
2781 the server are not affected.
2785 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2786 <div class="directive-section"><h2><a name="LogLevelOverride" id="LogLevelOverride">LogLevelOverride</a> <a name="logleveloverride" id="logleveloverride">Directiva</a></h2>
2787 <table class="directive">
2788 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Override the verbosity of the ErrorLog for certain clients</td></tr>
2789 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>LogLevel <var>ipaddress</var>[/<var>prefixlen</var>]
2790 [<var>module</var>:]<var>level</var> [<var>module</var>:<var>level</var>] ...
2792 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>unset</code></td></tr>
2793 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</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.5.0 and later</td></tr>
2797 </table><p>The documentation for this directive has
2798 not been translated yet. Please have a look at the English
2799 version.</p><h3>Consulte también</h3>
2801 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
2804 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2805 <div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directiva</a></h2>
2806 <table class="directive">
2807 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Number of requests allowed on a persistent
2808 connection</td></tr>
2809 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
2810 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
2811 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2812 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2813 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2815 <p>The <code class="directive">MaxKeepAliveRequests</code> directive
2816 limits the number of requests allowed per connection when
2817 <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
2818 set to <code>0</code>, unlimited requests will be allowed. We
2819 recommend that this setting be kept to a high value for maximum
2820 server performance.</p>
2824 <div class="example"><p><code>
2825 MaxKeepAliveRequests 500
2829 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2830 <div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Directiva</a></h2>
2831 <table class="directive">
2832 <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
2834 <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>
2835 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr>
2836 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
2837 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2838 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2839 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
2840 </table><p>The documentation for this directive has
2841 not been translated yet. Please have a look at the English
2843 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2844 <div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Directiva</a></h2>
2845 <table class="directive">
2846 <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
2848 <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>
2849 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRangeReversals 20</code></td></tr>
2850 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
2851 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2852 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2853 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
2854 </table><p>The documentation for this directive has
2855 not been translated yet. Please have a look at the English
2857 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2858 <div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Directiva</a></h2>
2859 <table class="directive">
2860 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Number of ranges allowed before returning the complete
2862 <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>
2863 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MaxRanges 200</code></td></tr>
2864 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
2865 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2866 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2867 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
2868 </table><p>The documentation for this directive has
2869 not been translated yet. Please have a look at the English
2871 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2872 <div class="directive-section"><h2><a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a> <a name="mergetrailers" id="mergetrailers">Directiva</a></h2>
2873 <table class="directive">
2874 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determins whether trailers are merged into headers</td></tr>
2875 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>MergeTrailers [on|off]</code></td></tr>
2876 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>MergeTrailers off</code></td></tr>
2877 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
2878 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2879 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2880 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.4.10 and later</td></tr>
2881 </table><p>The documentation for this directive has
2882 not been translated yet. Please have a look at the English
2884 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2885 <div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Directiva</a></h2>
2886 <table class="directive">
2887 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures mutex mechanism and lock file directory for all
2888 or specified mutexes</td></tr>
2889 <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>
2890 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Mutex default</code></td></tr>
2891 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
2892 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
2893 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
2894 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr>
2896 <p>The <code class="directive">Mutex</code> directive sets the mechanism,
2897 and optionally the lock file location, that httpd and modules use
2898 to serialize access to resources. Specify <code>default</code> as
2899 the first argument to change the settings for all mutexes; specify
2900 a mutex name (see table below) as the first argument to override
2901 defaults only for that mutex.</p>
2903 <p>The <code class="directive">Mutex</code> directive is typically used in
2904 the following exceptional situations:</p>
2907 <li>change the mutex mechanism when the default mechanism selected
2908 by <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a> has a functional or performance
2911 <li>change the directory used by file-based mutexes when the
2912 default directory does not support locking</li>
2915 <div class="note"><h3>Supported modules</h3>
2916 <p>This directive only configures mutexes which have been registered
2917 with the core server using the <code>ap_mutex_register()</code> API.
2918 All modules bundled with httpd support the <code class="directive">Mutex</code>
2919 directive, but third-party modules may not. Consult the documentation
2920 of the third-party module, which must indicate the mutex name(s) which
2921 can be configured if this directive is supported.</p>
2924 <p>The following mutex <em>mechanisms</em> are available:</p>
2926 <li><code>default | yes</code>
2927 <p>This selects the default locking implementation, as determined by
2928 <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a>. The default locking implementation can
2929 be displayed by running <code class="program"><a href="../programs/httpd.html">httpd</a></code> with the
2930 <code>-V</code> option.</p></li>
2932 <li><code>none | no</code>
2933 <p>This effectively disables the mutex, and is only allowed for a
2934 mutex if the module indicates that it is a valid choice. Consult the
2935 module documentation for more information.</p></li>
2937 <li><code>posixsem</code>
2938 <p>This is a mutex variant based on a Posix semaphore.</p>
2940 <div class="warning"><h3>Warning</h3>
2941 <p>The semaphore ownership is not recovered if a thread in the process
2942 holding the mutex segfaults, resulting in a hang of the web server.</p>
2946 <li><code>sysvsem</code>
2947 <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
2949 <div class="warning"><h3>Warning</h3>
2950 <p>It is possible to "leak" SysV semaphores if processes crash
2951 before the semaphore is removed.</p>
2954 <div class="warning"><h3>Security</h3>
2955 <p>The semaphore API allows for a denial of service attack by any
2956 CGIs running under the same uid as the webserver (<em>i.e.</em>,
2957 all CGIs, unless you use something like <code class="program"><a href="../programs/suexec.html">suexec</a></code>
2958 or <code>cgiwrapper</code>).</p>
2962 <li><code>sem</code>
2963 <p>This selects the "best" available semaphore implementation, choosing
2964 between Posix and SystemV IPC semaphores, in that order.</p></li>
2966 <li><code>pthread</code>
2967 <p>This is a mutex variant based on cross-process Posix thread
2970 <div class="warning"><h3>Warning</h3>
2971 <p>On most systems, if a child process terminates abnormally while
2972 holding a mutex that uses this implementation, the server will deadlock
2973 and stop responding to requests. When this occurs, the server will
2974 require a manual restart to recover.</p>
2975 <p>Solaris is a notable exception as it provides a mechanism which
2976 usually allows the mutex to be recovered after a child process
2977 terminates abnormally while holding a mutex.</p>
2978 <p>If your system implements the
2979 <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
2980 to use the <code>pthread</code> option safely.</p>
2984 <li><code>fcntl:/path/to/mutex</code>
2985 <p>This is a mutex variant where a physical (lock-)file and the
2986 <code>fcntl()</code> function are used as the mutex.</p>
2988 <div class="warning"><h3>Warning</h3>
2989 <p>When multiple mutexes based on this mechanism are used within
2990 multi-threaded, multi-process environments, deadlock errors (EDEADLK)
2991 can be reported for valid mutex operations if <code>fcntl()</code>
2992 is not thread-aware, such as on Solaris.</p>
2996 <li><code>flock:/path/to/mutex</code>
2997 <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
2998 with the exception that the <code>flock()</code> function is used to
2999 provide file locking.</p></li>
3001 <li><code>file:/path/to/mutex</code>
3002 <p>This selects the "best" available file locking implementation,
3003 choosing between <code>fcntl</code> and <code>flock</code>, in that
3007 <p>Most mechanisms are only available on selected platforms, where the
3008 underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="ver glosario">APR</a> support it. Mechanisms
3009 which aren't available on all platforms are <em>posixsem</em>,
3010 <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
3011 <em>flock</em>, and <em>file</em>.</p>
3013 <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
3014 the path, if provided, is a directory where the lock file will be created.
3015 The default directory is httpd's run-time file directory relative to
3016 <code class="directive"><a href="#serverroot">ServerRoot</a></code>. Always use a local disk
3017 filesystem for <code>/path/to/mutex</code> and never a directory residing
3018 on a NFS- or AFS-filesystem. The basename of the file will be the mutex
3019 type, an optional instance string provided by the module, and unless the
3020 <code>OmitPID</code> keyword is specified, the process id of the httpd
3021 parent process will be appended to to make the file name unique, avoiding
3022 conflicts when multiple httpd instances share a lock file directory. For
3023 example, if the mutex name is <code>mpm-accept</code> and the lock file
3024 directory is <code>/var/httpd/locks</code>, the lock file name for the
3025 httpd instance with parent process id 12345 would be
3026 <code>/var/httpd/locks/mpm-accept.12345</code>.</p>
3028 <div class="warning"><h3>Security</h3>
3029 <p>It is best to <em>avoid</em> putting mutex files in a world-writable
3030 directory such as <code>/var/tmp</code> because someone could create
3031 a denial of service attack and prevent the server from starting by
3032 creating a lockfile with the same name as the one the server will try
3036 <p>The following table documents the names of mutexes used by httpd
3037 and bundled modules.</p>
3039 <table class="bordered"><tr class="header">
3042 <th>Protected resource</th>
3045 <td><code>mpm-accept</code></td>
3046 <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>
3047 <td>incoming connections, to avoid the thundering herd problem;
3048 for more information, refer to the
3049 <a href="../misc/perf-tuning.html">performance tuning</a>
3053 <td><code>authdigest-client</code></td>
3054 <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
3055 <td>client list in shared memory</td>
3058 <td><code>authdigest-opaque</code></td>
3059 <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
3060 <td>counter in shared memory</td>
3063 <td><code>ldap-cache</code></td>
3064 <td><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code></td>
3065 <td>LDAP result cache</td>
3068 <td><code>rewrite-map</code></td>
3069 <td><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></td>
3070 <td>communication with external mapping programs, to avoid
3071 intermixed I/O from multiple requests</td>
3074 <td><code>ssl-cache</code></td>
3075 <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td>
3076 <td>SSL session cache</td>
3079 <td><code>ssl-stapling</code></td>
3080 <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td>
3081 <td>OCSP stapling response cache</td>
3084 <td><code>watchdog-callback</code></td>
3085 <td><code class="module"><a href="../mod/mod_watchdog.html">mod_watchdog</a></code></td>
3086 <td>callback function of a particular client module</td>
3090 <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
3091 parent process id from the lock file name.</p>
3093 <p>In the following example, the mutex mechanism for the MPM accept
3094 mutex will be changed from the compiled-in default to <code>fcntl</code>,
3095 with the associated lock file created in directory
3096 <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes
3097 will be changed from the compiled-in default to <code>sysvsem</code>.</p>
3099 <div class="example"><p><code>
3100 Mutex default sysvsem<br />
3101 Mutex mpm-accept fcntl:/var/httpd/locks
3105 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3106 <div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directiva</a></h2>
3107 <table class="directive">
3108 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Designates an IP address for name-virtual
3110 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
3111 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3112 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3113 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3116 <p>A single <code class="directive">NameVirtualHost</code> directive
3117 identifies a set of identical virtual hosts on which the server will
3118 further select from on the basis of the <em>hostname</em>
3119 requested by the client. The <code class="directive">NameVirtualHost</code>
3120 directive is a required directive if you want to configure
3121 <a href="../vhosts/">name-based virtual hosts</a>.</p>
3123 <p>This directive, and the corresponding <code class="directive">VirtualHost</code>,
3124 <em>must</em> be qualified with a port number if the server supports both HTTP
3125 and HTTPS connections.</p>
3127 <p>Although <var>addr</var> can be a hostname, it is recommended
3128 that you always use an IP address or a wildcard. A wildcard
3129 NameVirtualHost matches only virtualhosts that also have a literal wildcard
3130 as their argument.</p>
3132 <p>In cases where a firewall or other proxy receives the requests and
3133 forwards them on a different IP address to the server, you must specify the
3134 IP address of the physical interface on the machine which will be
3135 servicing the requests. </p>
3137 <p> In the example below, requests received on interface 192.0.2.1 and port 80
3138 will only select among the first two virtual hosts. Requests received on
3139 port 80 on any other interface will only select among the third and fourth
3140 virtual hosts. In the common case where the interface isn't important
3141 to the mapping, only the "*:80" NameVirtualHost and VirtualHost directives
3144 <div class="example"><p><code>
3145 NameVirtualHost 192.0.2.1:80<br />
3146 NameVirtualHost *:80<br /><br />
3148 <VirtualHost 192.0.2.1:80><br />
3149 ServerName namebased-a.example.com<br />
3150 </VirtualHost><br />
3152 <VirtualHost 192.0.2.1:80><br />
3153 Servername namebased-b.example.com<br />
3154 </VirtualHost><br />
3156 <VirtualHost *:80><br />
3157 ServerName namebased-c.example.com <br />
3158 </VirtualHost><br />
3160 <VirtualHost *:80><br />
3161 ServerName namebased-d.example.com <br />
3162 </VirtualHost><br />
3167 <p>If no matching virtual host is found, then the first listed
3168 virtual host that matches the IP address and port will be used.</p>
3171 <p>IPv6 addresses must be enclosed in square brackets, as shown
3172 in the following example:</p>
3174 <div class="example"><p><code>
3175 NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
3178 <div class="note"><h3>Argument to <code class="directive"><VirtualHost></code>
3180 <p>Note that the argument to the <code class="directive"><VirtualHost></code> directive must
3181 exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
3183 <div class="example"><p><code>
3184 NameVirtualHost 192.0.2.2:80<br />
3185 <VirtualHost 192.0.2.2:80><br />
3187 </VirtualHost><br />
3191 <h3>Consulte también</h3>
3193 <li><a href="../vhosts/">Virtual Hosts
3194 documentation</a></li>
3197 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3198 <div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directiva</a></h2>
3199 <table class="directive">
3200 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures what features are available in a particular
3202 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Options
3203 [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
3204 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Options All</code></td></tr>
3205 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3206 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>Options</td></tr>
3207 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3208 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3210 <p>The <code class="directive">Options</code> directive controls which
3211 server features are available in a particular directory.</p>
3213 <p><var>option</var> can be set to <code>None</code>, in which
3214 case none of the extra features are enabled, or one or more of
3218 <dt><code>All</code></dt>
3220 <dd>All options except for <code>MultiViews</code>. This is the default
3223 <dt><code>ExecCGI</code></dt>
3226 Execution of CGI scripts using <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>
3229 <dt><code>FollowSymLinks</code></dt>
3233 The server will follow symbolic links in this directory.
3235 <p>Even though the server follows the symlink it does <em>not</em>
3236 change the pathname used to match against <code class="directive"><a href="#directory"><Directory></a></code> sections.</p>
3237 <p>Note also, that this option <strong>gets ignored</strong> if set
3238 inside a <code class="directive"><a href="#location"><Location></a></code>
3240 <p>Omitting this option should not be considered a security restriction,
3241 since symlink testing is subject to race conditions that make it
3245 <dt><code>Includes</code></dt>
3248 Server-side includes provided by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
3251 <dt><code>IncludesNOEXEC</code></dt>
3255 Server-side includes are permitted, but the <code>#exec
3256 cmd</code> and <code>#exec cgi</code> are disabled. It is still
3257 possible to <code>#include virtual</code> CGI scripts from
3258 <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
3261 <dt><code>Indexes</code></dt>
3264 If a URL which maps to a directory is requested, and there
3265 is no <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
3266 (<em>e.g.</em>, <code>index.html</code>) in that directory, then
3267 <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
3268 of the directory.</dd>
3270 <dt><code>MultiViews</code></dt>
3273 <a href="../content-negotiation.html">Content negotiated</a>
3274 "MultiViews" are allowed using
3275 <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>.
3276 <div class="note"><h3>Note</h3> <p>This option gets ignored if set
3277 anywhere other than <code class="directive"><a href="#directory"><Directory></a></code>, as <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>
3278 needs real resources to compare against and evaluate from.</p></div>
3281 <dt><code>SymLinksIfOwnerMatch</code></dt>
3283 <dd>The server will only follow symbolic links for which the
3284 target file or directory is owned by the same user id as the
3287 <div class="note"><h3>Note</h3> <p>This option gets ignored if
3288 set inside a <code class="directive"><a href="#location"><Location></a></code> section.</p>
3289 <p>This option should not be considered a security restriction,
3290 since symlink testing is subject to race conditions that make it
3291 circumventable.</p></div>
3295 <p>Normally, if multiple <code class="directive">Options</code> could
3296 apply to a directory, then the most specific one is used and
3297 others are ignored; the options are not merged. (See <a href="../sections.html#mergin">how sections are merged</a>.)
3298 However if <em>all</em> the options on the
3299 <code class="directive">Options</code> directive are preceded by a
3300 <code>+</code> or <code>-</code> symbol, the options are
3301 merged. Any options preceded by a <code>+</code> are added to the
3302 options currently in force, and any options preceded by a
3303 <code>-</code> are removed from the options currently in
3306 <div class="warning"><h3>Warning</h3>
3307 <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
3308 <code>-</code> with those without is not valid syntax, and is likely
3309 to cause unexpected results.</p>
3312 <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
3314 <div class="example"><p><code>
3315 <Directory /web/docs><br />
3316 <span class="indent">
3317 Options Indexes FollowSymLinks<br />
3319 </Directory><br />
3321 <Directory /web/docs/spec><br />
3322 <span class="indent">
3323 Options Includes<br />
3328 <p>then only <code>Includes</code> will be set for the
3329 <code>/web/docs/spec</code> directory. However if the second
3330 <code class="directive">Options</code> directive uses the <code>+</code> and
3331 <code>-</code> symbols:</p>
3333 <div class="example"><p><code>
3334 <Directory /web/docs><br />
3335 <span class="indent">
3336 Options Indexes FollowSymLinks<br />
3338 </Directory><br />
3340 <Directory /web/docs/spec><br />
3341 <span class="indent">
3342 Options +Includes -Indexes<br />
3347 <p>then the options <code>FollowSymLinks</code> and
3348 <code>Includes</code> are set for the <code>/web/docs/spec</code>
3351 <div class="note"><h3>Note</h3>
3352 <p>Using <code>-IncludesNOEXEC</code> or
3353 <code>-Includes</code> disables server-side includes completely
3354 regardless of the previous setting.</p>
3357 <p>The default in the absence of any other settings is
3358 <code>All</code>.</p>
3361 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3362 <div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">Directiva</a></h2>
3363 <table class="directive">
3364 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Protocol for a listening socket</td></tr>
3365 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Protocol <var>protocol</var></code></td></tr>
3366 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
3367 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3368 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3369 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache 2.1.5 and later.
3370 On Windows from Apache 2.3.3 and later.</td></tr>
3372 <p>This directive specifies the protocol used for a specific listening socket.
3373 The protocol is used to determine which module should handle a request, and
3374 to apply protocol specific optimizations with the <code class="directive">AcceptFilter</code>
3377 <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>
3379 <p>For example, if you are running <code>https</code> on a non-standard port, specify the protocol explicitly:</p>
3381 <div class="example"><p><code>
3385 <p>You can also specify the protocol using the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive.</p>
3387 <h3>Consulte también</h3>
3389 <li><code class="directive">AcceptFilter</code></li>
3390 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
3393 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3394 <div class="directive-section"><h2><a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a> <a name="registerhttpmethod" id="registerhttpmethod">Directiva</a></h2>
3395 <table class="directive">
3396 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Register non-standard HTTP methods</td></tr>
3397 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</code></td></tr>
3398 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3399 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3400 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3401 </table><p>The documentation for this directive has
3402 not been translated yet. Please have a look at the English
3404 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3405 <div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directiva</a></h2>
3406 <table class="directive">
3407 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the CPU consumption of processes launched
3408 by Apache httpd children</td></tr>
3409 <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>
3410 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3411 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3412 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
3413 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3414 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3416 <p>Takes 1 or 2 parameters. The first parameter sets the soft
3417 resource limit for all processes and the second parameter sets
3418 the maximum resource limit. Either parameter can be a number,
3419 or <code>max</code> to indicate to the server that the limit should
3420 be set to the maximum allowed by the operating system
3421 configuration. Raising the maximum resource limit requires that
3422 the server is running as <code>root</code>, or in the initial startup
3425 <p>This applies to processes forked off from Apache httpd children
3426 servicing requests, not the Apache httpd children themselves. This
3427 includes CGI scripts and SSI exec commands, but not any
3428 processes forked off from the Apache httpd parent such as piped
3431 <p>CPU resource limits are expressed in seconds per
3434 <h3>Consulte también</h3>
3436 <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
3437 <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
3440 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3441 <div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directiva</a></h2>
3442 <table class="directive">
3443 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the memory consumption of processes launched
3444 by Apache httpd children</td></tr>
3445 <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>
3446 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3447 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3448 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
3449 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3450 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3452 <p>Takes 1 or 2 parameters. The first parameter sets the soft
3453 resource limit for all processes and the second parameter sets
3454 the maximum resource limit. Either parameter can be a number,
3455 or <code>max</code> to indicate to the server that the limit should
3456 be set to the maximum allowed by the operating system
3457 configuration. Raising the maximum resource limit requires that
3458 the server is running as <code>root</code>, or in the initial startup
3461 <p>This applies to processes forked off from Apache httpd children
3462 servicing requests, not the Apache httpd children themselves. This
3463 includes CGI scripts and SSI exec commands, but not any
3464 processes forked off from the Apache httpd parent such as piped
3467 <p>Memory resource limits are expressed in bytes per
3470 <h3>Consulte también</h3>
3472 <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
3473 <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
3476 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3477 <div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directiva</a></h2>
3478 <table class="directive">
3479 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Limits the number of processes that can be launched by
3480 processes launched by Apache httpd children</td></tr>
3481 <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>
3482 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3483 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3484 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
3485 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3486 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3488 <p>Takes 1 or 2 parameters. The first parameter sets the soft
3489 resource limit for all processes and the second parameter sets
3490 the maximum resource limit. Either parameter can be a number,
3491 or <code>max</code> to indicate to the server that the limit
3492 should be set to the maximum allowed by the operating system
3493 configuration. Raising the maximum resource limit requires that
3494 the server is running as <code>root</code>, or in the initial startup
3497 <p>This applies to processes forked off from Apache httpd children
3498 servicing requests, not the Apache httpd children themselves. This
3499 includes CGI scripts and SSI exec commands, but not any
3500 processes forked off from the Apache httpd parent such as piped
3503 <p>Process limits control the number of processes per user.</p>
3505 <div class="note"><h3>Note</h3>
3506 <p>If CGI processes are <strong>not</strong> running
3507 under user ids other than the web server user id, this directive
3508 will limit the number of processes that the server itself can
3509 create. Evidence of this situation will be indicated by
3510 <strong><code>cannot fork</code></strong> messages in the
3511 <code>error_log</code>.</p>
3514 <h3>Consulte también</h3>
3516 <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
3517 <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
3520 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3521 <div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directiva</a></h2>
3522 <table class="directive">
3523 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Technique for locating the interpreter for CGI
3525 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
3526 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
3527 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3528 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
3529 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3530 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3531 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Win32 only;
3532 option <code>Registry-Strict</code> is available in Apache HTTP Server 2.0 and
3535 <p>This directive is used to control how Apache httpd finds the
3536 interpreter used to run CGI scripts. The default setting is
3537 <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
3538 by the shebang line (first line, starting with <code>#!</code>) in the
3539 script. On Win32 systems this line usually looks like:</p>
3541 <div class="example"><p><code>
3542 #!C:/Perl/bin/perl.exe
3545 <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
3547 <div class="example"><p><code>
3551 <p>Setting <code>ScriptInterpreterSource Registry</code> will
3552 cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
3553 searched using the script file extension (e.g., <code>.pl</code>) as a
3554 search key. The command defined by the registry subkey
3555 <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
3556 <code>Shell\Open\Command</code> is used to open the script file. If the
3557 registry keys cannot be found, Apache httpd falls back to the behavior of the
3558 <code>Script</code> option.</p>
3560 <div class="warning"><h3>Security</h3>
3561 <p>Be careful when using <code>ScriptInterpreterSource
3562 Registry</code> with <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
3563 Apache httpd will try to execute <strong>every</strong> file within this
3564 directory. The <code>Registry</code> setting may cause undesired
3565 program calls on files which are typically not executed. For
3566 example, the default open command on <code>.htm</code> files on
3567 most Windows systems will execute Microsoft Internet Explorer, so
3568 any HTTP request for an <code>.htm</code> file existing within the
3569 script directory would start the browser in the background on the
3570 server. This is a good way to crash your system within a minute or
3574 <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
3575 2.0 does the same thing as <code>Registry</code> but uses only the
3576 subkey <code>Shell\ExecCGI\Command</code>. The
3577 <code>ExecCGI</code> key is not a common one. It must be
3578 configured manually in the windows registry and hence prevents
3579 accidental program calls on your system.</p>
3582 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3583 <div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">Directiva</a></h2>
3584 <table class="directive">
3585 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determine if mod_status displays the first 63 characters
3586 of a request or the last 63, assuming the request itself is greater than
3588 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SeeRequestTail On|Off</code></td></tr>
3589 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>SeeRequestTail Off</code></td></tr>
3590 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3591 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3592 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3593 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Available in Apache httpd 2.2.7 and later.</td></tr>
3595 <p>mod_status with <code>ExtendedStatus On</code>
3596 displays the actual request being handled.
3597 For historical purposes, only 63 characters of the request
3598 are actually stored for display purposes. This directive
3599 controls whether the 1st 63 characters are stored (the previous
3600 behavior and the default) or if the last 63 characters are. This
3601 is only applicable, of course, if the length of the request is
3602 64 characters or greater.</p>
3604 <p>If Apache httpd is handling <code>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</code> mod_status displays as follows:
3607 <table class="bordered">
3609 <th>Off (default)</th>
3610 <td>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
3614 <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</td>
3620 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3621 <div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directiva</a></h2>
3622 <table class="directive">
3623 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Email address that the server includes in error
3624 messages sent to the client</td></tr>
3625 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr>
3626 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
3627 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3628 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3630 <p>The <code class="directive">ServerAdmin</code> sets the contact address
3631 that the server includes in any error messages it returns to the
3632 client. If the <code>httpd</code> doesn't recognize the supplied argument
3634 assumes, that it's an <var>email-address</var> and prepends it with
3635 <code>mailto:</code> in hyperlink targets. However, it's recommended to
3636 actually use an email address, since there are a lot of CGI scripts that
3637 make that assumption. If you want to use an URL, it should point to another
3638 server under your control. Otherwise users may not be able to contact you in
3641 <p>It may be worth setting up a dedicated address for this, e.g.</p>
3643 <div class="example"><p><code>
3644 ServerAdmin www-admin@foo.example.com
3646 <p>as users do not always mention that they are talking about the
3650 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3651 <div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directiva</a></h2>
3652 <table class="directive">
3653 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Alternate names for a host used when matching requests
3654 to name-virtual hosts</td></tr>
3655 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
3656 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>virtual host</td></tr>
3657 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3658 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3660 <p>The <code class="directive">ServerAlias</code> directive sets the
3661 alternate names for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>. The
3662 <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
3664 <div class="example"><p><code>
3665 <VirtualHost *:80><br />
3666 ServerName server.domain.com<br />
3667 ServerAlias server server2.domain.com server2<br />
3668 ServerAlias *.example.com<br />
3669 UseCanonicalName Off<br />
3671 </VirtualHost>
3674 <h3>Consulte también</h3>
3676 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
3677 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
3680 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3681 <div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directiva</a></h2>
3682 <table class="directive">
3683 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Hostname and port that the server uses to identify
3685 <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>
3686 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
3687 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3688 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3690 <p>The <code class="directive">ServerName</code> directive sets the
3691 request scheme, hostname and
3692 port that the server uses to identify itself. This is used when
3693 creating redirection URLs.</p>
3695 <p>Additionally, <code class="directive">ServerName</code> is used (possibly
3696 in conjunction with <code class="directive">ServerAlias</code>) to uniquely
3697 identify a virtual host, when using <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p>
3699 <p>For example, if the name of the
3700 machine hosting the web server is <code>simple.example.com</code>,
3701 but the machine also has the DNS alias <code>www.example.com</code>
3702 and you wish the web server to be so identified, the following
3703 directive should be used:</p>
3705 <div class="example"><p><code>
3706 ServerName www.example.com:80
3709 <p>The <code class="directive">ServerName</code> directive
3710 may appear anywhere within the definition of a server. However,
3711 each appearance overrides the previous appearance (within that
3714 <p>If no <code class="directive">ServerName</code> is specified, then the
3715 server attempts to deduce the hostname by performing a reverse
3716 lookup on the IP address. If no port is specified in the
3717 <code class="directive">ServerName</code>, then the server will use the
3718 port from the incoming request. For optimal reliability and
3719 predictability, you should specify an explicit hostname and port
3720 using the <code class="directive">ServerName</code> directive.</p>
3722 <p>If you are using <a href="../vhosts/name-based.html">name-based virtual hosts</a>,
3723 the <code class="directive">ServerName</code> inside a
3724 <code class="directive"><a href="#virtualhost"><VirtualHost></a></code>
3725 section specifies what hostname must appear in the request's
3726 <code>Host:</code> header to match this virtual host.</p>
3728 <p>Sometimes, the server runs behind a device that processes SSL,
3729 such as a reverse proxy, load balancer or SSL offload
3730 appliance. When this is the case, specify the
3731 <code>https://</code> scheme and the port number to which the
3732 clients connect in the <code class="directive">ServerName</code> directive
3733 to make sure that the server generates the correct
3734 self-referential URLs.
3737 <p>See the description of the
3738 <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
3739 <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for
3740 settings which determine whether self-referential URLs (e.g., by the
3741 <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> module) will refer to the
3742 specified port, or to the port number given in the client's request.
3745 <div class="warning">
3746 <p>Failure to set <code class="directive">ServerName</code> to a name that
3747 your server can resolve to an IP address will result in a startup
3748 warning. <code>httpd</code> will then use whatever hostname it can
3749 determine, using the system's <code>hostname</code> command. This
3750 will almost never be the hostname you actually want.</p>
3751 <div class="example"><p><code>
3752 httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName
3757 <h3>Consulte también</h3>
3759 <li><a href="../dns-caveats.html">Issues Regarding DNS and
3760 Apache HTTP Server</a></li>
3761 <li><a href="../vhosts/">Apache HTTP Server virtual host
3762 documentation</a></li>
3763 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
3764 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
3765 <li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li>
3766 <li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
3769 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3770 <div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directiva</a></h2>
3771 <table class="directive">
3772 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Legacy URL pathname for a name-based virtual host that
3773 is accessed by an incompatible browser</td></tr>
3774 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
3775 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>virtual host</td></tr>
3776 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3777 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3779 <p>The <code class="directive">ServerPath</code> directive sets the legacy
3780 URL pathname for a host, for use with <a href="../vhosts/">name-based virtual hosts</a>.</p>
3782 <h3>Consulte también</h3>
3784 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
3787 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3788 <div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directiva</a></h2>
3789 <table class="directive">
3790 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Base directory for the server installation</td></tr>
3791 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
3792 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
3793 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3794 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3795 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3797 <p>The <code class="directive">ServerRoot</code> directive sets the
3798 directory in which the server lives. Typically it will contain the
3799 subdirectories <code>conf/</code> and <code>logs/</code>. Relative
3800 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
3801 relative to this directory.</p>
3803 <div class="example"><h3>Example</h3><p><code>
3804 ServerRoot /home/httpd
3808 <h3>Consulte también</h3>
3810 <li><a href="../invoking.html">the <code>-d</code>
3811 option to <code>httpd</code></a></li>
3812 <li><a href="../misc/security_tips.html#serverroot">the
3813 security tips</a> for information on how to properly set
3814 permissions on the <code class="directive">ServerRoot</code></li>
3817 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3818 <div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directiva</a></h2>
3819 <table class="directive">
3820 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures the footer on server-generated documents</td></tr>
3821 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr>
3822 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerSignature Off</code></td></tr>
3823 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3824 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>All</td></tr>
3825 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3826 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3828 <p>The <code class="directive">ServerSignature</code> directive allows the
3829 configuration of a trailing footer line under server-generated
3830 documents (error messages, <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> ftp directory
3831 listings, <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
3832 would want to enable such a footer line is that in a chain of proxies,
3833 the user often has no possibility to tell which of the chained servers
3834 actually produced a returned error message.</p>
3836 <p>The <code>Off</code>
3837 setting, which is the default, suppresses the footer line (and is
3838 therefore compatible with the behavior of Apache-1.2 and
3839 below). The <code>On</code> setting simply adds a line with the
3840 server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
3841 and the <code>EMail</code> setting additionally creates a
3842 "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
3845 <p>After version 2.0.44, the details of the server version number
3846 presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p>
3848 <h3>Consulte también</h3>
3850 <li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
3853 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3854 <div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directiva</a></h2>
3855 <table class="directive">
3856 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures the <code>Server</code> HTTP response
3858 <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>
3859 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>ServerTokens Full</code></td></tr>
3860 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
3861 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3862 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3864 <p>This directive controls whether <code>Server</code> response
3865 header field which is sent back to clients includes a
3866 description of the generic OS-type of the server as well as
3867 information about compiled-in modules.</p>
3870 <dt><code>ServerTokens Full</code> (or not specified)</dt>
3872 <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
3873 (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
3875 <dt><code>ServerTokens Prod[uctOnly]</code></dt>
3877 <dd>Server sends (<em>e.g.</em>): <code>Server:
3880 <dt><code>ServerTokens Major</code></dt>
3882 <dd>Server sends (<em>e.g.</em>): <code>Server:
3883 Apache/2</code></dd>
3885 <dt><code>ServerTokens Minor</code></dt>
3887 <dd>Server sends (<em>e.g.</em>): <code>Server:
3888 Apache/2.4</code></dd>
3890 <dt><code>ServerTokens Min[imal]</code></dt>
3892 <dd>Server sends (<em>e.g.</em>): <code>Server:
3893 Apache/2.4.1</code></dd>
3895 <dt><code>ServerTokens OS</code></dt>
3897 <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
3902 <p>This setting applies to the entire server, and cannot be
3903 enabled or disabled on a virtualhost-by-virtualhost basis.</p>
3905 <p>After version 2.0.44, this directive also controls the
3906 information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
3908 <div class="note">Setting <code class="directive">ServerTokens</code> to less than
3909 <code>minimal</code> is not recommended because it makes it more
3910 difficult to debug interoperational problems. Also note that
3911 disabling the Server: header does nothing at all to make your
3912 server more secure; the idea of "security through obscurity"
3913 is a myth and leads to a false sense of safety.</div>
3916 <h3>Consulte también</h3>
3918 <li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
3921 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3922 <div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directiva</a></h2>
3923 <table class="directive">
3924 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Forces all matching files to be processed by a
3926 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr>
3927 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3928 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
3929 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3930 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3931 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>Moved into the core in Apache httpd 2.0</td></tr>
3933 <p>When placed into an <code>.htaccess</code> file or a
3934 <code class="directive"><a href="#directory"><Directory></a></code> or
3935 <code class="directive"><a href="#location"><Location></a></code>
3936 section, this directive forces all matching files to be parsed
3937 through the <a href="../handler.html">handler</a> given by
3938 <var>handler-name</var>. For example, if you had a directory you
3939 wanted to be parsed entirely as imagemap rule files, regardless
3940 of extension, you might put the following into an
3941 <code>.htaccess</code> file in that directory:</p>
3943 <div class="example"><p><code>
3944 SetHandler imap-file
3947 <p>Another example: if you wanted to have the server display a
3948 status report whenever a URL of
3949 <code>http://servername/status</code> was called, you might put
3950 the following into <code>httpd.conf</code>:</p>
3952 <div class="example"><p><code>
3953 <Location /status><br />
3954 <span class="indent">
3955 SetHandler server-status<br />
3960 <p>You can override an earlier defined <code class="directive">SetHandler</code>
3961 directive by using the value <code>None</code>.</p>
3962 <p><strong>Note:</strong> because SetHandler overrides default handlers,
3963 normal behaviour such as handling of URLs ending in a slash (/) as
3964 directories or index files is suppressed.</p>
3966 <h3>Consulte también</h3>
3968 <li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li>
3971 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3972 <div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directiva</a></h2>
3973 <table class="directive">
3974 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Sets the filters that will process client requests and POST
3976 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
3977 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3978 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
3979 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
3980 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
3982 <p>The <code class="directive">SetInputFilter</code> directive sets the
3983 filter or filters which will process client requests and POST
3984 input when they are received by the server. This is in addition to
3985 any filters defined elsewhere, including the
3986 <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
3989 <p>If more than one filter is specified, they must be separated
3990 by semicolons in the order in which they should process the
3993 <h3>Consulte también</h3>
3995 <li><a href="../filter.html">Filters</a> documentation</li>
3998 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3999 <div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directiva</a></h2>
4000 <table class="directive">
4001 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Sets the filters that will process responses from the
4003 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
4004 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
4005 <tr><th><a href="directive-dict.html#Override">Prevalece sobre:</a></th><td>FileInfo</td></tr>
4006 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4007 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4009 <p>The <code class="directive">SetOutputFilter</code> directive sets the filters
4010 which will process responses from the server before they are
4011 sent to the client. This is in addition to any filters defined
4012 elsewhere, including the
4013 <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
4016 <p>For example, the following configuration will process all files
4017 in the <code>/www/data/</code> directory for server-side
4020 <div class="example"><p><code>
4021 <Directory /www/data/><br />
4022 <span class="indent">
4023 SetOutputFilter INCLUDES<br />
4028 <p>If more than one filter is specified, they must be separated
4029 by semicolons in the order in which they should process the
4032 <h3>Consulte también</h3>
4034 <li><a href="../filter.html">Filters</a> documentation</li>
4037 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4038 <div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directiva</a></h2>
4039 <table class="directive">
4040 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Amount of time the server will wait for
4041 certain events before failing a request</td></tr>
4042 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
4043 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>TimeOut 60</code></td></tr>
4044 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host</td></tr>
4045 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4046 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4048 <p>The <code class="directive">TimeOut</code> directive defines the length
4049 of time Apache httpd will wait for I/O in various circumstances:</p>
4052 <li>When reading data from the client, the length of time to
4053 wait for a TCP packet to arrive if the read buffer is
4056 <li>When writing data to the client, the length of time to wait
4057 for an acknowledgement of a packet if the send buffer is
4060 <li>In <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, the length of time to wait for
4061 output from a CGI script.</li>
4063 <li>In <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to
4064 wait for output from a filtering process.</li>
4066 <li>In <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if
4067 <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not
4073 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4074 <div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directiva</a></h2>
4075 <table class="directive">
4076 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Determines the behaviour on <code>TRACE</code> requests</td></tr>
4077 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
4078 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>TraceEnable on</code></td></tr>
4079 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
4080 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4081 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4082 <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>
4084 <p>This directive overrides the behavior of <code>TRACE</code> for both
4085 the core server and <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>. The default
4086 <code>TraceEnable on</code> permits <code>TRACE</code> requests per
4087 RFC 2616, which disallows any request body to accompany the request.
4088 <code>TraceEnable off</code> causes the core server and
4089 <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
4090 allowed) error to the client.</p>
4092 <p>Finally, for testing and diagnostic purposes only, request
4093 bodies may be allowed using the non-compliant <code>TraceEnable
4094 extended</code> directive. The core (as an origin server) will
4095 restrict the request body to 64k (plus 8k for chunk headers if
4096 <code>Transfer-Encoding: chunked</code> is used). The core will
4097 reflect the full headers and all chunk headers with the response
4098 body. As a proxy server, the request body is not restricted to 64k.</p>
4101 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4102 <div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Directiva</a></h2>
4103 <table class="directive">
4104 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Undefine the existence of a variable</td></tr>
4105 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr>
4106 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
4107 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4108 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4110 <p>Undoes the effect of a <code class="directive"><a href="#define">Define</a></code> or
4111 of passing a <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p>
4112 <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine"><IfDefine></a></code> sections without needing to alter
4113 <code>-D</code> arguments in any startup scripts.</p>
4116 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4117 <div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directiva</a></h2>
4118 <table class="directive">
4119 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures how the server determines its own name and
4121 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
4122 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>UseCanonicalName Off</code></td></tr>
4123 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
4124 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4125 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4127 <p>In many situations Apache httpd must construct a <em>self-referential</em>
4128 URL -- that is, a URL that refers back to the same server. With
4129 <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
4130 specified in the <code class="directive"><a href="#servername">ServerName</a></code>
4131 directive to construct the canonical name for the server. This name
4132 is used in all self-referential URLs, and for the values of
4133 <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
4135 <p>With <code>UseCanonicalName Off</code> Apache httpd will form
4136 self-referential URLs using the hostname and port supplied by
4137 the client if any are supplied (otherwise it will use the
4138 canonical name, as defined above). These values are the same
4139 that are used to implement <a href="../vhosts/name-based.html">name-based virtual hosts</a>,
4140 and are available with the same clients. The CGI variables
4141 <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
4142 constructed from the client supplied values as well.</p>
4144 <p>An example where this may be useful is on an intranet server
4145 where you have users connecting to the machine using short
4146 names such as <code>www</code>. You'll notice that if the users
4147 type a shortname, and a URL which is a directory, such as
4148 <code>http://www/splat</code>, <em>without the trailing
4149 slash</em> then Apache httpd will redirect them to
4150 <code>http://www.domain.com/splat/</code>. If you have
4151 authentication enabled, this will cause the user to have to
4152 authenticate twice (once for <code>www</code> and once again
4153 for <code>www.domain.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
4154 FAQ on this subject for more information</a>). But if
4155 <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
4156 Apache httpd will redirect to <code>http://www/splat/</code>.</p>
4158 <p>There is a third option, <code>UseCanonicalName DNS</code>,
4159 which is intended for use with mass IP-based virtual hosting to
4160 support ancient clients that do not provide a
4161 <code>Host:</code> header. With this option Apache httpd does a
4162 reverse DNS lookup on the server IP address that the client
4163 connected to in order to work out self-referential URLs.</p>
4165 <div class="warning"><h3>Warning</h3>
4166 <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
4167 they may be broken by this option. The client is essentially free
4168 to give whatever value they want as a hostname. But if the CGI is
4169 only using <code>SERVER_NAME</code> to construct self-referential URLs
4170 then it should be just fine.</p>
4173 <h3>Consulte también</h3>
4175 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
4176 <li><code class="directive"><a href="#servername">ServerName</a></code></li>
4177 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
4180 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4181 <div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directiva</a></h2>
4182 <table class="directive">
4183 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Configures how the server determines its own name and
4185 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
4186 <tr><th><a href="directive-dict.html#Default">Valor por defecto:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
4187 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory</td></tr>
4188 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4189 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4191 <p>In many situations Apache httpd must construct a <em>self-referential</em>
4192 URL -- that is, a URL that refers back to the same server. With
4193 <code>UseCanonicalPhysicalPort On</code> Apache httpd will, when
4194 constructing the canonical port for the server to honor
4195 the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
4196 provide the actual physical port number being used by this request
4197 as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
4198 Apache httpd will not ever use the actual physical port number, instead
4199 relying on all configured information to construct a valid port number.</p>
4201 <div class="note"><h3>Note</h3>
4202 <p>The ordering of when the physical port is used is as follows:<br /><br />
4203 <code>UseCanonicalName On</code></p>
4205 <li>Port provided in <code>Servername</code></li>
4206 <li>Physical port</li>
4207 <li>Default port</li>
4209 <code>UseCanonicalName Off | DNS</code>
4211 <li>Parsed port from <code>Host:</code> header</li>
4212 <li>Physical port</li>
4213 <li>Port provided in <code>Servername</code></li>
4214 <li>Default port</li>
4217 <p>With <code>UseCanonicalPhysicalPort Off</code>, the
4218 physical ports are removed from the ordering.</p>
4222 <h3>Consulte también</h3>
4224 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
4225 <li><code class="directive"><a href="#servername">ServerName</a></code></li>
4226 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
4229 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4230 <div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a> <a name="virtualhost" id="virtualhost">Directiva</a></h2>
4231 <table class="directive">
4232 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Contains directives that apply only to a specific
4233 hostname or IP address</td></tr>
4234 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code><VirtualHost
4235 <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
4236 ...> ... </VirtualHost></code></td></tr>
4237 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config</td></tr>
4238 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4239 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4241 <p><code class="directive"><VirtualHost></code> and
4242 <code></VirtualHost></code> are used to enclose a group of
4243 directives that will apply only to a particular virtual host. Any
4244 directive that is allowed in a virtual host context may be
4245 used. When the server receives a request for a document on a
4246 particular virtual host, it uses the configuration directives
4247 enclosed in the <code class="directive"><VirtualHost></code>
4248 section. <var>Addr</var> can be:</p>
4251 <li>The IP address of the virtual host;</li>
4253 <li>A fully qualified domain name for the IP address of the
4254 virtual host (not recommended);</li>
4256 <li>The character <code>*</code>, which is used only in combination with
4257 <code>NameVirtualHost *</code> to match all IP addresses; or</li>
4259 <li>The string <code>_default_</code>, which is used only
4260 with IP virtual hosting to catch unmatched IP addresses.</li>
4263 <div class="example"><h3>Example</h3><p><code>
4264 <VirtualHost 10.1.2.3><br />
4265 <span class="indent">
4266 ServerAdmin webmaster@host.example.com<br />
4267 DocumentRoot /www/docs/host.example.com<br />
4268 ServerName host.example.com<br />
4269 ErrorLog logs/host.example.com-error_log<br />
4270 TransferLog logs/host.example.com-access_log<br />
4272 </VirtualHost>
4276 <p>IPv6 addresses must be specified in square brackets because
4277 the optional port number could not be determined otherwise. An
4278 IPv6 example is shown below:</p>
4280 <div class="example"><p><code>
4281 <VirtualHost [2001:db8::a00:20ff:fea7:ccea]><br />
4282 <span class="indent">
4283 ServerAdmin webmaster@host.example.com<br />
4284 DocumentRoot /www/docs/host.example.com<br />
4285 ServerName host.example.com<br />
4286 ErrorLog logs/host.example.com-error_log<br />
4287 TransferLog logs/host.example.com-access_log<br />
4289 </VirtualHost>
4292 <p>Each Virtual Host must correspond to a different IP address,
4293 different port number or a different host name for the server,
4294 in the former case the server machine must be configured to
4295 accept IP packets for multiple addresses. (If the machine does
4296 not have multiple network interfaces, then this can be
4297 accomplished with the <code>ifconfig alias</code> command -- if
4298 your OS supports it).</p>
4300 <div class="note"><h3>Note</h3>
4301 <p>The use of <code class="directive"><VirtualHost></code> does
4302 <strong>not</strong> affect what addresses Apache httpd listens on. You
4303 may need to ensure that Apache httpd is listening on the correct addresses
4304 using <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p>
4307 <p>When using IP-based virtual hosting, the special name
4308 <code>_default_</code> can be specified in
4309 which case this virtual host will match any IP address that is
4310 not explicitly listed in another virtual host. In the absence
4311 of any <code>_default_</code> virtual host the "main" server config,
4312 consisting of all those definitions outside any VirtualHost
4313 section, is used when no IP-match occurs.</p>
4315 <p>You can specify a <code>:port</code> to change the port that is
4316 matched. If unspecified then it defaults to the same port as the
4317 most recent <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>
4318 statement of the main server. You may also specify <code>:*</code>
4319 to match all ports on that address. (This is recommended when used
4320 with <code>_default_</code>.)</p>
4322 <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
4323 specified inside each <code class="directive"><VirtualHost></code> block. If it is absent, the
4324 <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
4325 server configuration will be inherited.</p>
4327 <p>If no matching virtual host is found, then the first listed
4328 virtual host that matches the IP address will be used. As a
4329 consequence, the first listed virtual host is the default virtual
4332 <div class="warning"><h3>Security</h3>
4333 <p>See the <a href="../misc/security_tips.html">security tips</a>
4334 document for details on why your security could be compromised if the
4335 directory where log files are stored is writable by anyone other
4336 than the user that starts the server.</p>
4339 <h3>Consulte también</h3>
4341 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
4342 <li><a href="../dns-caveats.html">Issues Regarding DNS and
4343 Apache HTTP Server</a></li>
4344 <li><a href="../bind.html">Setting
4345 which addresses and ports Apache HTTP Server uses</a></li>
4346 <li><a href="../sections.html">How <Directory>, <Location>
4347 and <Files> sections work</a> for an explanation of how these
4348 different sections are combined when a request is received</li>
4351 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4352 <div class="directive-section"><h2><a name="Warning" id="Warning">Warning</a> <a name="warning" id="warning">Directiva</a></h2>
4353 <table class="directive">
4354 <tr><th><a href="directive-dict.html#Description">Descripción:</a></th><td>Warn from configuration parsing with a custom message</td></tr>
4355 <tr><th><a href="directive-dict.html#Syntax">Sintaxis:</a></th><td><code>Warning <var>message</var></code></td></tr>
4356 <tr><th><a href="directive-dict.html#Context">Contexto:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
4357 <tr><th><a href="directive-dict.html#Status">Estado:</a></th><td>Core</td></tr>
4358 <tr><th><a href="directive-dict.html#Module">Módulo:</a></th><td>core</td></tr>
4359 <tr><th><a href="directive-dict.html#Compatibility">Compatibilidad:</a></th><td>2.5 and later</td></tr>
4360 </table><p>The documentation for this directive has
4361 not been translated yet. Please have a look at the English
4364 <div class="bottomlang">
4365 <p><span>Idiomas disponibles: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
4366 <a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> |
4367 <a href="../es/mod/core.html" title="Español"> es </a> |
4368 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
4369 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
4370 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
4371 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comentarios</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
4372 <script type="text/javascript"><!--//--><![CDATA[//><!--
4373 var comments_shortname = 'httpd';
4374 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/core.html';
4376 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
4377 d.write('<div id="comments_thread"><\/div>');
4378 var s = d.createElement('script');
4379 s.type = 'text/javascript';
4381 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
4382 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
4385 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
4387 })(window, document);
4388 //--><!]]></script></div><div id="footer">
4389 <p class="apache">Copyright 2015 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>
4390 <p class="menu"><a href="../mod/">Módulos</a> | <a href="../mod/quickreference.html">Directivas</a> | <a href="http://wiki.apache.org/httpd/FAQ">Preguntas Frecuentes</a> | <a href="../glossary.html">Glosario</a> | <a href="../sitemap.html">Mapa de este sitio web</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
4391 if (typeof(prettyPrint) !== 'undefined') {