Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C9FB3200B25 for ; Wed, 8 Jun 2016 13:37:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C85FF160A2E; Wed, 8 Jun 2016 11:37:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 72FA4160A29 for ; Wed, 8 Jun 2016 13:37:27 +0200 (CEST) Received: (qmail 72987 invoked by uid 500); 8 Jun 2016 11:37:26 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 72978 invoked by uid 99); 8 Jun 2016 11:37:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 11:37:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id ED582180530 for ; Wed, 8 Jun 2016 11:37:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.426 X-Spam-Level: X-Spam-Status: No, score=-0.426 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id MEr633fLtwUs for ; Wed, 8 Jun 2016 11:37:11 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 81A535F343 for ; Wed, 8 Jun 2016 11:37:10 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6F11DE01AB for ; Wed, 8 Jun 2016 11:37:09 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 6DC113A03EA for ; Wed, 8 Jun 2016 11:37:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1747381 [2/3] - in /httpd/httpd/trunk/docs/manual/mod: core.html.es core.xml.es Date: Wed, 08 Jun 2016 11:37:09 -0000 To: cvs@httpd.apache.org From: lgilbernabe@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160608113709.6DC113A03EA@svn01-us-west.apache.org> archived-at: Wed, 08 Jun 2016 11:37:30 -0000 Modified: httpd/httpd/trunk/docs/manual/mod/core.html.es URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.html.es?rev=1747381&r1=1747380&r2=1747381&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/mod/core.html.es (original) +++ httpd/httpd/trunk/docs/manual/mod/core.html.es Wed Jun 8 11:37:09 2016 @@ -1,4459 +1,4452 @@ - - - - + + + + -core - Servidor HTTP Apache Versión 2.5 - - - - - - - - -
<-
- -
-

Funcionalidad Básica de Apache

-
-

Idiomas disponibles:  de  | - en  | - es  | - fr  | - ja  | - tr 

-
-
Esta traducción podría estar - obsoleta. Consulte la versión en inglés de la - documentación para comprobar si se han producido cambios - recientemente.
- -
Descripción:Funcionalides básicas del Servidor HTTP Apache que siempre están presentes.
Estado:Core
-
- - -
top
-

AcceptFilter Directiva

- - - - - - - -
Descripción:Configura mejoras para un Protocolo de Escucha de Sockets
Sintaxis:AcceptFilter protocol accept_filter
Contexto:server config
Estado:Core
Módulo:core
Compatibilidad:Disponible en Apache httpd 2.1.5 y posteriores. -En Windows desde Apache httpd 2.3.3 y posteriores.
-

Esta directiva hace posible mejoras específicas a nivel de sistema operativo - y a través del tipo de Protocolo para un socket que escucha. - La premisa básica es que el kernel no envíe un socket al servidor - hasta que o bien los datos se hayan recibido o bien se haya almacenado - en el buffer una Respuesta HTTP completa. - Actualmente sólo están soportados - - Accept Filters sobre FreeBSD, TCP_DEFER_ACCEPT sobre Linux, - y AcceptEx() sobre Windows.

- -

El uso de none para un argumento desactiva cualquier filtro - aceptado para ese protocolo. Esto es útil para protocolos que requieren que un - servidor envíe datos primeros, tales como ftp: o nntp:

-

AcceptFilter nntp none

- -

Los nombres de protocolo por defecto son https para el puerto 443 - y http para todos los demás puertos. Para especificar que se está - utilizando otro protocolo con un puerto escuchando, añade el argumento protocol - a la directiva Listen.

- -

Sobre FreeBDS los valores por defecto:

-

- AcceptFilter http httpready
- AcceptFilter https dataready -

- -

El filtro httpready almacena en el buffer peticiones HTTP completas - a nivel de kernel. Una vez que la petición es recibida, el kernel la envía al servidor. - Consulta la página man de - - accf_http(9) para más detalles. Puesto que las peticiones HTTPS - están encriptadas, sólo se utiliza el filtro - accf_data(9).

- -

Sobre Linux los valores por defecto son:

-

- AcceptFilter http data
- AcceptFilter https data -

- -

En Linux, TCP_DEFER_ACCEPT no soporta el buffering en peticiones http. - Cualquier valor además de none habilitará - TCP_DEFER_ACCEPT en ese socket. Para más detalles - ver la página man de Linux - - tcp(7).

- -

Sobre Windows los valores por defecto son:

-

- AcceptFilter http data
- AcceptFilter https data -

- -

Sobre Windows mpm_winnt interpreta el argumento AcceptFilter para conmutar la API - AcceptEx(), y no soporta el buffering sobre el protocolo http. Hay dos valores - que utilizan la API Windows AcceptEx() y que recuperan sockets de red - entre conexciones. data espera hasta que los datos han sido - transmitidos como se comentaba anteriormente, y el buffer inicial de datos y las - direcciones de red son recuperadas a partir de una única llamada AcceptEx(). - connect utiliza la API AcceptEx() API, y recupera también - las direcciones de red, pero a diferencia de none - la opción connect no espera a la transmisión inicial de los datos.

- -

Sobre Windows, none prefiere accept() antes que AcceptEx() - y no recuperará sockets entre las conexiones. Lo que es útil para los adaptadores de - red con un soporte precario de drivers, así como para algunos proveedores de red - tales como drivers vpn, o filtros de spam, de virus o de spyware.

- - -

Consulte también

-
    -
  • Protocol
  • -
-
-
top
-

AcceptPathInfo Directiva

- - - - - - - - - -
Descripción:Los recursos aceptan información sobre su ruta
Sintaxis:AcceptPathInfo On|Off|Default
Valor por defecto:AcceptPathInfo Default
Contexto:server config, virtual host, directory, .htaccess
Anula:FileInfo
Estado:Core
Módulo:core
Compatibilidad:Disponible en Apache httpd 2.0.30 y posteriores
- -

Esta directiva controla si las peticiones que contienen información sobre la ruta - que sigue un fichero que existe (o un fichero que no existe pero en un directorio que - sí existe) serán aceptadas o denegadas. La información de ruta puede estar disponible - para los scripts en la variable de entorno PATH_INFO.

- -

Por ejemplo, asumamos que la ubicación /test/ apunta a - un directorio que contiene únicamente el fichero - here.html. Entonces, las peticiones tanto para - /test/here.html/more como para - /test/nothere.html/more recogen - /more como PATH_INFO.

- -

Los tres posibles argumentos para la directiva - AcceptPathInfo son los siguientes:

-
-
Off
Una petición sólo será aceptada si - se corresponde con una ruta literal que existe. Por lo tanto, una petición - con una información de ruta después del nombre de fichero tal como - /test/here.html/more en el ejemplo anterior devolverá - un error 404 NOT FOUND.
- -
On
Una petición será aceptada si una - ruta principal de acceso se corresponde con un fichero que existe. El ejemplo - anterior /test/here.html/more será aceptado si - /test/here.html corresponde a un fichero válido.
- -
Default
La gestión de las peticiones - con información de ruta está determinada por el controlador responsable de la petición. - El controlador principal para para ficheros normales rechaza por defecto - peticiones PATH_INFO. Los controladores que sirven scripts, tales como cgi-script e isapi-handler, normalmente aceptan - PATH_INFO por defecto.
-
- -

El objetivo principal de la directiva AcceptPathInfo - es permitirte sobreescribir la opción del controlador - de aceptar or rechazar PATH_INFO. Este tipo de sobreescritura se necesita, - por ejemplo, cuando utilizas un filtro, tal como - INCLUDES, para generar contenido - basado en PATH_INFO. El controlador principal normalmente rechazaría - la petición, de modo que puedes utilizar la siguiente configuración para habilitarla - como script:

- -

- <Files "mypaths.shtml">
- - Options +Includes
- SetOutputFilter INCLUDES
- AcceptPathInfo On
-
- </Files> -

- - -
-
top
-

AccessFileName Directiva

- - - - - - - -
Descripción:Nombre del fichero distribuido de configuración
Sintaxis:AccessFileName filename [filename] ...
Valor por defecto:AccessFileName .htaccess
Contexto:server config, virtual host
Estado:Core
Módulo:core
-

Mientras que procesa una petición el servidor busca - el primer fichero de configuración existente dentro de un listado de nombres en - cada directorio de la ruta del documento, si los ficheros distribuidos - de configuración están habilitados para ese - directorio. Por ejemplo:

- -

- AccessFileName .acl -

- -

antes de servir el documento - /usr/local/web/index.html, el servidor leerá - /.acl, /usr/.acl, - /usr/local/.acl and /usr/local/web/.acl - para las directivas, salvo que estén deshabilitadas with

- -

- <Directory />
- - AllowOverride None
-
- </Directory> -

- -

Consulte también

- -
-
top
-

AddDefaultCharset Directiva

- - - - - - - - -
Descripción:Default charset parameter to be added when a response -content-type is text/plain or text/html
Sintaxis:AddDefaultCharset On|Off|charset
Valor por defecto:AddDefaultCharset Off
Contexto:server config, virtual host, directory, .htaccess
Anula:FileInfo
Estado:Core
Módulo:core
-

This directive specifies a default value for the media type - charset parameter (the name of a character encoding) to be added - to a response if and only if the response's content-type is either - text/plain or text/html. This should override - any charset specified in the body of the response via a META - element, though the exact behavior is often dependent on the user's client - configuration. A setting of AddDefaultCharset Off - disables this functionality. AddDefaultCharset On enables - a default charset of iso-8859-1. Any other value is assumed - to be the charset to be used, which should be one of the - IANA registered - charset values for use in Internet media types (MIME types). - For example:

- -

- AddDefaultCharset utf-8 -

- -

AddDefaultCharset should only be used when all - of the text resources to which it applies are known to be in that - character encoding and it is too inconvenient to label their charset - individually. One such example is to add the charset parameter - to resources containing generated content, such as legacy CGI - scripts, that might be vulnerable to cross-site scripting attacks - due to user-provided data being included in the output. Note, however, - that a better solution is to just fix (or delete) those scripts, since - setting a default charset does not protect users that have enabled - the "auto-detect character encoding" feature on their browser.

- -

Consulte también

- -
-
top
-

AllowEncodedSlashes Directiva

- - - - - - - - -
Descripción:Determines whether encoded path separators in URLs are allowed to -be passed through
Sintaxis:AllowEncodedSlashes On|Off
Valor por defecto:AllowEncodedSlashes Off
Contexto:server config, virtual host
Estado:Core
Módulo:core
Compatibilidad:Available in Apache httpd 2.0.46 and later
-

The AllowEncodedSlashes directive allows URLs - which contain encoded path separators (%2F for / - and additionally %5C for \ on according systems) - to be used. Normally such URLs are refused with a 404 (Not found) error.

- -

Turning AllowEncodedSlashes On is - mostly useful when used in conjunction with PATH_INFO.

- -

Note

-

Allowing encoded slashes does not imply decoding. - Occurrences of %2F or %5C (only on - according systems) will be left as such in the otherwise decoded URL - string.

-
- -

Consulte también

- -
-
top
-

AllowOverride Directiva

- - - - - - - -
Descripción:Types of directives that are allowed in -.htaccess files
Sintaxis:AllowOverride All|None|directive-type -[directive-type] ...
Valor por defecto:AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier)
Contexto:directory
Estado:Core
Módulo:core
-

When the server finds an .htaccess file (as - specified by AccessFileName) - it needs to know which directives declared in that file can override - earlier configuration directives.

- -

Only available in <Directory> sections

- AllowOverride is valid only in - <Directory> - sections specified without regular expressions, not in <Location>, <DirectoryMatch> or - <Files> sections. -
- -

When this directive is set to None, then - .htaccess files are completely ignored. - In this case, the server will not even attempt to read - .htaccess files in the filesystem.

- -

When this directive is set to All, then any - directive which has the .htaccess Context is allowed in - .htaccess files.

- -

The directive-type can be one of the following - groupings of directives.

- -
-
AuthConfig
- -
- - Allow use of the authorization directives (AuthDBMGroupFile, - AuthDBMUserFile, - AuthGroupFile, - AuthName, - AuthType, AuthUserFile, Require, etc.).
- -
FileInfo
- -
- Allow use of the directives controlling document types - (ErrorDocument, - ForceType, - LanguagePriority, - SetHandler, - SetInputFilter, - SetOutputFilter, and - mod_mime Add* and Remove* directives), - document meta data (Header, RequestHeader, SetEnvIf, SetEnvIfNoCase, BrowserMatch, CookieExpires, CookieDomain, CookieStyle, CookieTracking, CookieName), - mod_rewrite directives RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule) and - Action from - mod_actions. -
- -
Indexes
- -
- Allow use of the directives controlling directory indexing - (AddDescription, - AddIcon, AddIconByEncoding, - AddIconByType, - DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName, - etc.).
- -
Limit
- -
- Allow use of the directives controlling host access (Allow, Deny and Order).
- -
Options[=Option,...]
- -
- Allow use of the directives controlling specific directory - features (Options and - XBitHack). - An equal sign may be given followed by a comma (but no spaces) - separated lists of options that may be set using the Options command.
-
- -

Example:

- -

- AllowOverride AuthConfig Indexes -

- -

In the example above all directives that are neither in the group - AuthConfig nor Indexes cause an internal - server error.

- -

For security and performance reasons, do not set - AllowOverride to anything other than None - in your <Directory /> block. Instead, find (or - create) the <Directory> block that refers to the - directory where you're actually planning to place a - .htaccess file.

-
- -

Consulte también

- -
-
top
-

AllowOverrideList Directiva

- - - - - - - -
Descripción:Individual directives that are allowed in -.htaccess files
Sintaxis:AllowOverrideList None|directive -[directive-type] ...
Valor por defecto:AllowOverrideList None
Contexto:directory
Estado:Core
Módulo:core

The documentation for this directive has - not been translated yet. Please have a look at the English - version.

Consulte también

- -
-
top
-

AsyncFilter Directiva

- - - - - - - - -
Descripción:Set the minimum filter type eligible for asynchronous handling
Sintaxis:AsyncFilter request|connection|network
Valor por defecto:AsyncFilter request
Contexto:server config, virtual host
Estado:Core
Módulo:core
Compatibilidad:Only available from Apache 2.5.0 and later.

The documentation for this directive has - not been translated yet. Please have a look at the English - version.

-
top
-

CGIMapExtension Directiva

- - - - - - - - -
Descripción:Technique for locating the interpreter for CGI -scripts
Sintaxis:CGIMapExtension cgi-path .extension
Contexto:directory, .htaccess
Anula:FileInfo
Estado:Core
Módulo:core
Compatibilidad:NetWare only
-

This directive is used to control how Apache httpd finds the - interpreter used to run CGI scripts. For example, setting - CGIMapExtension sys:\foo.nlm .foo will - cause all CGI script files with a .foo extension to - be passed to the FOO interpreter.

- -
-
top
-

CGIPassAuth Directiva

- - - - - - - - - -
Descripción:Enables passing HTTP authorization headers to scripts as CGI -variables
Sintaxis:CGIPassAuth On|Off
Valor por defecto:CGIPassAuth Off
Contexto:directory, .htaccess
Anula:AuthConfig
Estado:Core
Módulo:core
Compatibilidad:Available in Apache HTTP Server 2.4.13 and later

The documentation for this directive has - not been translated yet. Please have a look at the English - version.

-
top
-

CGIVar Directiva

- - - - - - - - -
Descripción:Controls how some CGI variables are set
Sintaxis:CGIVar variable rule
Contexto:directory, .htaccess
Anula:FileInfo
Estado:Core
Módulo:core
Compatibilidad:Available in Apache HTTP Server 2.4.21 and later

The documentation for this directive has - not been translated yet. Please have a look at the English - version.

-
top
-

ContentDigest Directiva

- - - - - - - - -
Descripción:Enables the generation of Content-MD5 HTTP Response -headers
Sintaxis:ContentDigest On|Off
Valor por defecto:ContentDigest Off
Contexto:server config, virtual host, directory, .htaccess
Anula:Options
Estado:Core
Módulo:core
-

This directive enables the generation of - Content-MD5 headers as defined in RFC1864 - respectively RFC2616.

- -

MD5 is an algorithm for computing a "message digest" - (sometimes called "fingerprint") of arbitrary-length data, with - a high degree of confidence that any alterations in the data - will be reflected in alterations in the message digest.

- -

The Content-MD5 header provides an end-to-end - message integrity check (MIC) of the entity-body. A proxy or - client may check this header for detecting accidental - modification of the entity-body in transit. Example header:

- -

- Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== -

- -

Note that this can cause performance problems on your server - since the message digest is computed on every request (the - values are not cached).

- -

Content-MD5 is only sent for documents served - by the core, and not by any module. For example, - SSI documents, output from CGI scripts, and byte range responses - do not have this header.

- -
-
top
-

DefaultRuntimeDir Directiva

- - - - - - - - -
Descripción:Base directory for the server run-time files
Sintaxis:DefaultRuntimeDir directory-path
Valor por defecto:DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)
Contexto:server config
Estado:Core
Módulo:core
Compatibilidad:Available in Apache 2.4.2 and later

The documentation for this directive has - not been translated yet. Please have a look at the English - version.

Consulte también

- -
-
top
-

DefaultType Directiva

- - - - - - - - - -
Descripción:This directive has no effect other than to emit warnings -if the value is not none. In prior versions, DefaultType -would specify a default media type to assign to response content for -which no other media type configuration could be found. -
Sintaxis:DefaultType media-type|none
Valor por defecto:DefaultType none
Contexto:server config, virtual host, directory, .htaccess
Anula:FileInfo
Estado:Core
Módulo:core
Compatibilidad:The argument none is available in Apache httpd 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.
-

This directive has been disabled. For backwards compatibility - of configuration files, it may be specified with the value - none, meaning no default media type. For example:

- -

- DefaultType None -

- -

DefaultType None is only available in - httpd-2.2.7 and later.

- -

Use the mime.types configuration file and the - AddType to configure media - type assignments via file extensions, or the - ForceType directive to configure - the media type for specific resources. Otherwise, the server will - send the response without a Content-Type header field and the - recipient may attempt to guess the media type.

- -
-
top
-

Define Directiva

- - - - - - -
Descripción:Define the existence of a variable
Sintaxis:Define parameter-name
Contexto:server config
Estado:Core
Módulo:core
-

Equivalent to passing the -D argument to httpd.

-

This directive can be used to toggle the use of <IfDefine> sections without needing to alter - -D arguments in any startup scripts.

- -
-
top
-

<Directory> Directiva

- - - - - - -
Descripción:Enclose a group of directives that apply only to the -named file-system directory, sub-directories, and their contents.
Sintaxis:<Directory directory-path> -... </Directory>
Contexto:server config, virtual host
Estado:Core
Módulo:core
-

<Directory> and - </Directory> are used to enclose a group of - directives that will apply only to the named directory, - sub-directories of that directory, and the files within the respective - directories. Any directive that is allowed - in a directory context may be used. Directory-path is - either the full path to a directory, or a wild-card string using - Unix shell-style matching. In a wild-card string, ? matches - any single character, and * matches any sequences of - characters. You may also use [] character ranges. None - of the wildcards match a `/' character, so <Directory - /*/public_html> will not match - /home/user/public_html, but <Directory - /home/*/public_html> will match. Example:

- -

- <Directory /usr/local/httpd/htdocs>
- - Options Indexes FollowSymLinks
-
- </Directory> -

- -
-

Be careful with the directory-path arguments: - They have to literally match the filesystem path which Apache httpd uses - to access the files. Directives applied to a particular - <Directory> will not apply to files accessed from - that same directory via a different path, such as via different symbolic - links.

-
- -

Regular - expressions can also be used, with the addition of the - ~ character. For example:

- -

- <Directory ~ "^/www/.*/[0-9]{3}"> -

- -

would match directories in /www/ that consisted of - three numbers.

- -

If multiple (non-regular expression) <Directory> sections - match the directory (or one of its parents) containing a document, - then the directives are applied in the order of shortest match - first, interspersed with the directives from the .htaccess files. For example, - with

- -

- <Directory />
- - AllowOverride None
-
- </Directory>
-
- <Directory /home/>
- - AllowOverride FileInfo
-
- </Directory> -

- -

for access to the document /home/web/dir/doc.html - the steps are:

- -
    -
  • Apply directive AllowOverride None - (disabling .htaccess files).
  • - -
  • Apply directive AllowOverride FileInfo (for - directory /home).
  • - -
  • Apply any FileInfo directives in - /home/.htaccess, /home/web/.htaccess and - /home/web/dir/.htaccess in that order.
  • -
- -

Regular expressions are not considered until after all of the - normal sections have been applied. Then all of the regular - expressions are tested in the order they appeared in the - configuration file. For example, with

- -

- <Directory ~ abc$>
- - # ... directives here ...
-
- </Directory> -

- -

the regular expression section won't be considered until after - all normal <Directory>s and - .htaccess files have been applied. Then the regular - expression will match on /home/abc/public_html/abc and - the corresponding <Directory> will - be applied.

- -

Note that the default access for - <Directory /> is Allow from All. - This means that Apache httpd will serve any file mapped from an URL. It is - recommended that you change this with a block such - as

- -

- <Directory />
- - Order Deny,Allow
- Deny from All
-
- </Directory> -

- -

and then override this for directories you - want accessible. See the Security Tips page for more - details.

- -

The directory sections occur in the httpd.conf file. - <Directory> directives - cannot nest, and cannot appear in a <Limit> or <LimitExcept> section.

- -

Consulte también

- -
-
top
-

<DirectoryMatch> Directiva

- - - - - - -
Descripción:Enclose directives that apply to -the contents of file-system directories matching a regular expression.
Sintaxis:<DirectoryMatch regex> -... </DirectoryMatch>
Contexto:server config, virtual host
Estado:Core
Módulo:core
-

<DirectoryMatch> and - </DirectoryMatch> are used to enclose a group - of directives which will apply only to the named directory (and the files within), - the same as <Directory>. - However, it takes as an argument a - regular expression. For example:

- -

- <DirectoryMatch "^/www/(.+/)?[0-9]{3}"> -

- -

would match directories in /www/ that consisted of three - numbers.

- -

Compatability

- Prior to 2.3.9, this directive implicitly applied to sub-directories - (like <Directory>) and - could not match the end of line symbol ($). In 2.3.9 and later, - only directories that match the expression are affected by the enclosed - directives. -
- -

Trailing Slash

- This directive applies to requests for directories that may or may - not end in a trailing slash, so expressions that are anchored to the - end of line ($) must be written with care. -
- -

Consulte también

- -
-
top
-

DocumentRoot Directiva

- - - - - - - -
Descripción:Directory that forms the main document tree visible -from the web
Sintaxis:DocumentRoot directory-path
Valor por defecto:DocumentRoot /usr/local/apache/htdocs
Contexto:server config, virtual host
Estado:Core
Módulo:core
-

This directive sets the directory from which httpd - will serve files. Unless matched by a directive like Alias, the server appends the - path from the requested URL to the document root to make the - path to the document. Example:

- -

- DocumentRoot /usr/web -

- -

then an access to - http://www.my.host.com/index.html refers to - /usr/web/index.html. If the directory-path is - not absolute then it is assumed to be relative to the ServerRoot.

- -

The DocumentRoot should be specified without - a trailing slash.

- -

Consulte también

- -
-
top
-

<Else> Directiva

- - - - - - - -
Descripción:Contains directives that apply only if the condition of a -previous <If> or -<ElseIf> section is not -satisfied by a request at runtime
Sintaxis:<Else> ... </Else>
Contexto:server config, virtual host, directory, .htaccess
Anula:All
Estado:Core
Módulo:core

The documentation for this directive has - not been translated yet. Please have a look at the English - version.

Consulte también

- -
-
top
-

<ElseIf> Directiva

- - - - - - - -
Descripción:Contains directives that apply only if a condition is satisfied -by a request at runtime while the condition of a previous -<If> or -<ElseIf> section is not -satisfied
Sintaxis:<ElseIf expression> ... </ElseIf>
Contexto:server config, virtual host, directory, .htaccess
Anula:All
Estado:Core
Módulo:core

The documentation for this directive has - not been translated yet. Please have a look at the English - version.

Consulte también

- -
-
top
-

EnableMMAP Directiva

- - - - - - - - -
Descripción:Use memory-mapping to read files during delivery
Sintaxis:EnableMMAP On|Off
Valor por defecto:EnableMMAP On
Contexto:server config, virtual host, directory, .htaccess
Anula:FileInfo
Estado:Core
Módulo:core
-

This directive controls whether the httpd may use - memory-mapping if it needs to read the contents of a file during - delivery. By default, when the handling of a request requires - access to the data within a file -- for example, when delivering a - server-parsed file using mod_include -- Apache httpd - memory-maps the file if the OS supports it.

- -

This memory-mapping sometimes yields a performance improvement. - But in some environments, it is better to disable the memory-mapping - to prevent operational problems:

- -
    -
  • On some multiprocessor systems, memory-mapping can reduce the - performance of the httpd.
  • -
  • Deleting or truncating a file while httpd - has it memory-mapped can cause httpd to - crash with a segmentation fault. -
  • -
- -

For server configurations that are vulnerable to these problems, - you should disable memory-mapping of delivered files by specifying:

- -

- EnableMMAP Off -

- -

For NFS mounted files, this feature may be disabled explicitly for - the offending files by specifying:

- -

- <Directory "/path-to-nfs-files"> - - EnableMMAP Off - - </Directory> -

- -
-
top
-

EnableSendfile Directiva

- - - - - - - - - -
Descripción:Use the kernel sendfile support to deliver files to the client
Sintaxis:EnableSendfile On|Off
Valor por defecto:EnableSendfile Off
Contexto:server config, virtual host, directory, .htaccess
Anula:FileInfo
Estado:Core
Módulo:core
Compatibilidad:Available in version 2.0.44 and later. Default changed to Off in -version 2.3.9.
-

This directive controls whether httpd may use the - sendfile support from the kernel to transmit file contents to the client. - By default, when the handling of a request requires no access - to the data within a file -- for example, when delivering a - static file -- Apache httpd uses sendfile to deliver the file contents - without ever reading the file if the OS supports it.

- -

This sendfile mechanism avoids separate read and send operations, - and buffer allocations. But on some platforms or within some - filesystems, it is better to disable this feature to avoid - operational problems:

- -
    -
  • Some platforms may have broken sendfile support that the build - system did not detect, especially if the binaries were built on - another box and moved to such a machine with broken sendfile - support.
  • -
  • On Linux the use of sendfile triggers TCP-checksum - offloading bugs on certain networking cards when using IPv6.
  • -
  • On Linux on Itanium, sendfile may be unable to handle files - over 2GB in size.
  • -
  • With a network-mounted DocumentRoot (e.g., NFS, SMB, CIFS, FUSE), - the kernel may be unable to serve the network file through - its own cache.
  • -
- -

For server configurations that are not vulnerable to these problems, - you may enable this feature by specifying:

- -

- EnableSendfile On -

- -

For network mounted files, this feature may be disabled explicitly - for the offending files by specifying:

- -

- <Directory "/path-to-nfs-files"> - - EnableSendfile Off - - </Directory> -

-

Please note that the per-directory and .htaccess configuration - of EnableSendfile is not supported by - mod_cache_disk. - Only global definition of EnableSendfile - is taken into account by the module. -

- -
-
top
-

Error Directiva

- - - - - - - -
Descripción:Abort configuration parsing with a custom error message
Sintaxis:Error message
Contexto:server config, virtual host, directory, .htaccess
Estado:Core
Módulo:core
Compatibilidad:2.3.9 and later
-

If an error can be detected within the configuration, this - directive can be used to generate a custom error message, and halt - configuration parsing. The typical use is for reporting required - modules which are missing from the configuration.

- -

Example

- # ensure that mod_include is loaded
- <IfModule !include_module>
- Error mod_include is required by mod_foo. Load it with LoadModule.
- </IfModule>
-
- # ensure that exactly one of SSL,NOSSL is defined
- <IfDefine SSL>
- <IfDefine NOSSL>
- Error Both SSL and NOSSL are defined. Define only one of them.
- </IfDefine>
- </IfDefine>
- <IfDefine !SSL>
- <IfDefine !NOSSL>
- Error Either SSL or NOSSL must be defined.
- </IfDefine>
- </IfDefine>
-

- - -
-
top
-

ErrorDocument Directiva

- - - - - - - -
Descripción:What the server will return to the client -in case of an error
Sintaxis:ErrorDocument error-code document
Contexto:server config, virtual host, directory, .htaccess
Anula:FileInfo
Estado:Core
Módulo:core
-

In the event of a problem or error, Apache httpd can be configured - to do one of four things,

- -
    -
  1. output a simple hardcoded error message
  2. - -
  3. output a customized message
  4. - -
  5. redirect to a local URL-path to handle the - problem/error
  6. - -
  7. redirect to an external URL to handle the - problem/error
  8. -
- -

The first option is the default, while options 2-4 are - configured using the ErrorDocument - directive, which is followed by the HTTP response code and a URL - or a message. Apache httpd will sometimes offer additional information - regarding the problem/error.

- -

URLs can begin with a slash (/) for local web-paths (relative - to the DocumentRoot), or be a - full URL which the client can resolve. Alternatively, a message - can be provided to be displayed by the browser. Examples:

- -

- ErrorDocument 500 http://foo.example.com/cgi-bin/tester
- ErrorDocument 404 /cgi-bin/bad_urls.pl
- ErrorDocument 401 /subscription_info.html
- ErrorDocument 403 "Sorry can't allow you access today" -

- -

Additionally, the special value default can be used - to specify Apache httpd's simple hardcoded message. While not required - under normal circumstances, default will restore - Apache httpd's simple hardcoded message for configurations that would - otherwise inherit an existing ErrorDocument.

- -

- ErrorDocument 404 /cgi-bin/bad_urls.pl

- <Directory /web/docs>
- - ErrorDocument 404 default
-
- </Directory> -

- -

Note that when you specify an ErrorDocument - that points to a remote URL (ie. anything with a method such as - http in front of it), Apache HTTP Server will send a redirect to the - client to tell it where to find the document, even if the - document ends up being on the same server. This has several - implications, the most important being that the client will not - receive the original error status code, but instead will - receive a redirect status code. This in turn can confuse web - robots and other clients which try to determine if a URL is - valid using the status code. In addition, if you use a remote - URL in an ErrorDocument 401, the client will not - know to prompt the user for a password since it will not - receive the 401 status code. Therefore, if you use an - ErrorDocument 401 directive then it must refer to a local - document.

- -

Microsoft Internet Explorer (MSIE) will by default ignore - server-generated error messages when they are "too small" and substitute - its own "friendly" error messages. The size threshold varies depending on - the type of error, but in general, if you make your error document - greater than 512 bytes, then MSIE will show the server-generated - error rather than masking it. More information is available in - Microsoft Knowledge Base article Q294807.

- -

Although most error messages can be overriden, there are certain - circumstances where the internal messages are used regardless of the - setting of ErrorDocument. In - particular, if a malformed request is detected, normal request processing - will be immediately halted and the internal error message returned. - This is necessary to guard against security problems caused by - bad requests.

- -

If you are using mod_proxy, you may wish to enable - ProxyErrorOverride so that you can provide - custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride, - Apache httpd will not generate custom error documents for proxied content.

- -

Consulte también

- -
-
top
-

ErrorLog Directiva

- - - - - - - -
Descripción:Location where the server will log errors
Sintaxis: ErrorLog file-path|syslog[:facility]
Valor por defecto:ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)
Contexto:server config, virtual host
Estado:Core
Módulo:core
-

The ErrorLog directive sets the name of - the file to which the server will log any errors it encounters. If - the file-path is not absolute then it is assumed to be - relative to the ServerRoot.

- -

Example

- ErrorLog /var/log/httpd/error_log -

- -

If the file-path - begins with a pipe character "|" then it is assumed to be a - command to spawn to handle the error log.

- -

Example

- ErrorLog "|/usr/local/bin/httpd_errors" -

- -

See the notes on piped logs for - more information.

- -

Using syslog instead of a filename enables logging - via syslogd(8) if the system supports it. The default is to use - syslog facility local7, but you can override this by - using the syslog:facility syntax where - facility can be one of the names usually documented in - syslog(1). The facility is effectively global, and if it is changed - in individual virtual hosts, the final facility specified affects the - entire server.

- -

Example

- ErrorLog syslog:user -

- -

SECURITY: See the security tips - document for details on why your security could be compromised - if the directory where log files are stored is writable by - anyone other than the user that starts the server.

-

Note

-

When entering a file path on non-Unix platforms, care should be taken - to make sure that only forward slashed are used even though the platform - may allow the use of back slashes. In general it is a good idea to always - use forward slashes throughout the configuration files.

-
- -

Consulte también

- -
-
top
-

ErrorLogFormat Directiva

- - - - - - - -
Descripción:Format specification for error log entries
Sintaxis: ErrorLog [connection|request] format
Contexto:server config, virtual host
Estado:Core
Módulo:core
Compatibilidad:Available in Apache httpd 2.3.9 and later
-

ErrorLogFormat allows to specify what - supplementary information is logged in the error log in addition to the - actual log message.

- -

Simple example

- ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" -

- -

Specifying connection or request as first - paramter allows to specify additional formats, causing additional - information to be logged when the first message is logged for a specific - connection or request, respectivly. This additional information is only - logged once per connection/request. If a connection or request is processed - without causing any log message, the additional information is not logged - either.

- -

It can happen that some format string items do not produce output. For - example, the Referer header is only present if the log message is - associated to a request and the log message happens at a time when the - Referer header has already been read from the client. If no output is - produced, the default behaviour is to delete everything from the preceeding - space character to the next space character. This means the log line is - implicitly divided into fields on non-whitespace to whitespace transitions. - If a format string item does not produce output, the whole field is - ommitted. For example, if the remote address %a in the log - format [%t] [%l] [%a] %M  is not available, the surrounding - brackets are not logged either. Space characters can be escaped with a - backslash to prevent them from delimiting a field. The combination '% ' - (percent space) is a zero-witdh field delimiter that does not produce any - output.

- -

The above behaviour can be changed by adding modifiers to the format - string item. A - (minus) modifier causes a minus to be logged if the - respective item does not produce any output. In once-per-connection/request - formats, it is also possible to use the + (plus) modifier. If an - item with the plus modifier does not produce any output, the whole line is - ommitted.

- -

A number as modifier can be used to assign a log severity level to a - format item. The item will only be logged if the severity of the log - message is not higher than the specified log severity level. The number can - range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).

- -

Some format string items accept additional parameters in braces.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Format String Description
%%The percent sign
%...aRemote IP-address and port
%...ALocal IP-address and port
%...{name}eRequest environment variable name
%...EAPR/OS error status code and string
%...FSource file name and line number of the log call
%...{name}iRequest header name
%...kNumber of keep-alive requests on this connection
%...lLoglevel of the message
%...LLog ID of the request
%...{c}LLog ID of the connection
%...{C}LLog ID of the connection if used in connection scope, empty otherwise
%...mName of the module logging the message
%MThe actual log message
%...{name}nRequest note name
%...PProcess ID of current process
%...TThread ID of current thread
%...tThe current time
%...{u}tThe current time including micro-seconds
%...{cu}tThe current time in compact ISO 8601 format, including - micro-seconds
%...vThe canonical ServerName - of the current server.
%...VThe server name of the server serving the request according to the - UseCanonicalName - setting.
(backslash space)Non-field delimiting space
(percent space)Field delimiter (no output)
- [... 7506 lines stripped ...]