diff options
Diffstat (limited to '')
-rw-r--r-- | docs/manual/custom-error.html | 25 | ||||
-rw-r--r-- | docs/manual/custom-error.html.en | 237 | ||||
-rw-r--r-- | docs/manual/custom-error.html.es | 249 | ||||
-rw-r--r-- | docs/manual/custom-error.html.fr.utf8 | 250 | ||||
-rw-r--r-- | docs/manual/custom-error.html.ja.utf8 | 229 | ||||
-rw-r--r-- | docs/manual/custom-error.html.ko.euc-kr | 230 | ||||
-rw-r--r-- | docs/manual/custom-error.html.tr.utf8 | 233 |
7 files changed, 1453 insertions, 0 deletions
diff --git a/docs/manual/custom-error.html b/docs/manual/custom-error.html new file mode 100644 index 0000000..9f0e635 --- /dev/null +++ b/docs/manual/custom-error.html @@ -0,0 +1,25 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: custom-error.html.en +Content-Language: en +Content-type: text/html; charset=UTF-8 + +URI: custom-error.html.es +Content-Language: es +Content-type: text/html; charset=ISO-8859-1 + +URI: custom-error.html.fr.utf8 +Content-Language: fr +Content-type: text/html; charset=UTF-8 + +URI: custom-error.html.ja.utf8 +Content-Language: ja +Content-type: text/html; charset=UTF-8 + +URI: custom-error.html.ko.euc-kr +Content-Language: ko +Content-type: text/html; charset=EUC-KR + +URI: custom-error.html.tr.utf8 +Content-Language: tr +Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/custom-error.html.en b/docs/manual/custom-error.html.en new file mode 100644 index 0000000..358a19a --- /dev/null +++ b/docs/manual/custom-error.html.en @@ -0,0 +1,237 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>Custom Error Responses - Apache HTTP Server Version 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Custom Error Responses</h1> +<div class="toplang"> +<p><span>Available Languages: </span><a href="./en/custom-error.html" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> + + + <p>Although the Apache HTTP Server provides generic error responses + in the event of 4xx or 5xx HTTP status codes, these responses are + rather stark, uninformative, and can be intimidating to site users. + You may wish to provide custom error responses which are either + friendlier, or in some language other than English, or perhaps which + are styled more in line with your site layout.</p> + + <p>Customized error responses can be defined for any HTTP status + code designated as an error condition - that is, any 4xx or 5xx + status.</p> + + <p>Additionally, a set of values are provided, so + that the error document can be customized further based on the + values of these variables, using <a href="howto/ssi.html">Server + Side Includes</a>. Or, you can have error conditions handled by a + cgi program, or other dynamic handler (PHP, mod_perl, etc) which + makes use of these variables.</p> + + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#configuration">Configuration</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#variables">Available Variables</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#custom">Customizing Error Responses</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#multi-lang">Multi Language Custom Error Documents</a></li> +</ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="configuration" id="configuration">Configuration</a></h2> + + <p>Custom error documents are configured using the <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> directive, + which may be used in global, + virtualhost, or directory context. It may be used in .htaccess files + if <code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> is set to + FileInfo.</p> + + <pre class="prettyprint lang-config">ErrorDocument 500 "Sorry, our script crashed. Oh dear" +ErrorDocument 500 /cgi-bin/crash-recover +ErrorDocument 500 http://error.example.com/server_error.html +ErrorDocument 404 /errors/not_found.html +ErrorDocument 401 /subscription/how_to_subscribe.html</pre> + + + <p>The syntax of the <code>ErrorDocument</code> directive is:</p> + + <pre class="prettyprint lang-config">ErrorDocument <3-digit-code> <action></pre> + + + <p>where the action will be treated as:</p> + + <ol> + <li>A local URL to redirect to (if the action begins with a "/").</li> + <li>An external URL to redirect to (if the action is a valid URL).</li> + <li>Text to be displayed (if none of the above). The text must be + wrapped in quotes (") if it consists of more than one word.</li> + </ol> + + <p>When redirecting to a local URL, additional environment variables + are set so that the response can be further customized. They are not sent to + external URLs.</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="variables" id="variables">Available Variables</a></h2> + + <p>Redirecting to another URL can be useful, but only if some + information can be passed which can then be used to explain or log + the error condition more clearly.</p> + + <p>To achieve this, when the error redirect is sent, additional + environment variables will be set, which will be generated from + the headers provided to the original request by prepending + 'REDIRECT_' onto the original header name. This provides the error + document the context of the original request.</p> + + <p>For example, you might receive, in addition to more usual + environment variables, the following.</p> + + <div class="example"><p><code> + REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/jpeg, image/png<br /> + REDIRECT_HTTP_USER_AGENT=Mozilla/5.0 Fedora/3.5.8-1.fc12 Firefox/3.5.8<br /> + REDIRECT_PATH=.:/bin:/usr/local/bin:/sbin<br /> + REDIRECT_QUERY_STRING=<br /> + REDIRECT_REMOTE_ADDR=121.345.78.123<br /> + REDIRECT_REMOTE_HOST=client.example.com<br /> + REDIRECT_SERVER_NAME=www.example.edu<br /> + REDIRECT_SERVER_PORT=80<br /> + REDIRECT_SERVER_SOFTWARE=Apache/2.2.15<br /> + REDIRECT_URL=/cgi-bin/buggy.pl + </code></p></div> + + <p><code>REDIRECT_</code> environment variables are created from + the environment variables which existed prior to the + redirect. They are renamed with a <code>REDIRECT_</code> + prefix, <em>i.e.</em>, <code>HTTP_USER_AGENT</code> becomes + <code>REDIRECT_HTTP_USER_AGENT</code>.</p> + + <p><code>REDIRECT_URL</code>, <code>REDIRECT_STATUS</code>, and + <code>REDIRECT_QUERY_STRING</code> are guaranteed to be set, and + the other headers will be set only if they existed prior to the + error condition.</p> + + <p><strong>None</strong> of these will be + set if the <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> target is an + <em>external</em> redirect (anything starting with a + scheme name like <code>http:</code>, even if it refers to the same host + as the server).</p> + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="custom" id="custom">Customizing Error Responses</a></h2> + + <p>If you point your <code>ErrorDocument</code> to some variety of + dynamic handler such as a server-side include document, CGI + script, or some variety of other handler, you may wish to use the + available custom environment variables to customize this + response.</p> + + <p>If the ErrorDocument specifies a local redirect to a CGI + script, the script should include a "<code>Status:</code>" + header field in its output in order to ensure the propagation + all the way back to the client of the error condition that + caused it to be invoked. For instance, a Perl ErrorDocument + script might include the following:</p> + + <pre class="prettyprint lang-perl">... +print "Content-type: text/html\n"; +printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; +...</pre> + + + <p>If the script is dedicated to handling a particular error + condition, such as <code>404 Not Found</code>, it can + use the specific code and error text instead.</p> + + <p>Note that if the response contains <code>Location:</code> + header (in order to issue a client-side redirect), the script + <em>must</em> emit an appropriate <code>Status:</code> header + (such as <code>302 Found</code>). Otherwise the + <code>Location:</code> header may have no effect.</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="multi-lang" id="multi-lang">Multi Language Custom Error Documents</a></h2> + + <p>Provided with your installation of the Apache HTTP Server is a + directory of custom error documents translated into 16 different + languages. There's also a configuration file in the + <code>conf/extra</code> configuration directory that can be included + to enable this feature.</p> + + <p>In your server configuration file, you'll see a line such as:</p> + + <pre class="prettyprint lang-config"># Multi-language error messages +#Include conf/extra/httpd-multilang-errordoc.conf</pre> + + + <p>Uncommenting this <code>Include</code> line will enable this + feature, and provide language-negotiated error messages, based on + the language preference set in the client browser.</p> + + <p>Additionally, these documents contain various of the + <code>REDIRECT_</code> variables, so that additional information can + be provided to the end-user about what happened, and what they can + do now.</p> + + <p>These documents can be customized to whatever degree you wish to + provide more useful information to users about your site, and what + they can expect to find there.</p> + + <p><code class="module"><a href="./mod/mod_include.html">mod_include</a></code> and <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> + must be enabled to use this feature.</p> + + </div></div> +<div class="bottomlang"> +<p><span>Available Languages: </span><a href="./en/custom-error.html" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/custom-error.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/custom-error.html.es b/docs/manual/custom-error.html.es new file mode 100644 index 0000000..bebc604 --- /dev/null +++ b/docs/manual/custom-error.html.es @@ -0,0 +1,249 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es"><head> +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>Respuestas de error personalizadas - Servidor HTTP Apache Versión 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">Módulos</a> | <a href="./mod/directives.html">Directivas</a> | <a href="http://wiki.apache.org/httpd/FAQ">Preguntas Frecuentes</a> | <a href="./glossary.html">Glosario</a> | <a href="./sitemap.html">Mapa del sitio web</a></p> +<p class="apache">Versión 2.4 del Servidor HTTP Apache</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">Servidor HTTP</a> > <a href="http://httpd.apache.org/docs/">Documentación</a> > <a href="./">Versión 2.4</a></div><div id="page-content"><div id="preamble"><h1>Respuestas de error personalizadas</h1> +<div class="toplang"> +<p><span>Idiomas disponibles: </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> + + <p>Apache ofrece la posibilidad de que los webmasters puedan + configurar las respuestas que muestra el servidor Apache cuando se + producen algunos errores o problemas.</p> + + <p>Las respuestas personalizadas pueden definirse para activarse + en caso de que el servidor detecte un error o problema.</p> + + <p>Si un script termina de forma anormal y se produce una respuesta + "500 Server Error", esta respuesta puede ser sustituida por otro + texto de su elección o por una redirección a otra URL + (local o externa).</p> + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#behavior">Comportamiento</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#configuration">Configuración</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#custom">Mesajes de error personalizados y redirecciones</a></li> +</ul><h3>Consulte también</h3><ul class="seealso"><li><a href="#comments_section">Comentarios</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="behavior" id="behavior">Comportamiento</a></h2> + + + <h3>Comportamiento anterior</h3> + + + <p>NCSA httpd 1.3 devolvía mensajes antiguos del error o + problema encontrado que con frecuencia no tenían + significado alguno para el usuario, y que no incluían en + los logs información que diera pistas sobre las causas de + lo sucedido.</p> + + + <h3>Comportamiento actual</h3> + + + <p>Se puede hacer que el servidor siga uno de los siguientes + comportamientos:</p> + + <ol> + <li>Desplegar un texto diferente, en lugar de los mensajes de + la NCSA, o</li> + + <li>redireccionar la petición a una URL local, o</li> + + <li>redireccionar la petición a una URL externa.</li> + </ol> + + <p>Redireccionar a otra URL puede resultar de utilidad, pero + solo si con ello se puede también pasar alguna + información que pueda explicar el error o problema y/o + registrarlo en el log correspondiente más claramente.</p> + + <p>Para conseguir esto, Apache define ahora variables de entorno + similares a las de los CGI:</p> + + <div class="example"><p><code> + REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, + image/jpeg<br /> + REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 + 9000/712)<br /> + REDIRECT_PATH=.:/bin:/usr/local/bin:/etc<br /> + REDIRECT_QUERY_STRING=<br /> + REDIRECT_REMOTE_ADDR=121.345.78.123<br /> + REDIRECT_REMOTE_HOST=ooh.ahhh.com<br /> + REDIRECT_SERVER_NAME=crash.bang.edu<br /> + REDIRECT_SERVER_PORT=80<br /> + REDIRECT_SERVER_SOFTWARE=Apache/0.8.15<br /> + REDIRECT_URL=/cgi-bin/buggy.pl + </code></p></div> + + <p>Tenga en cuenta el prefijo <code>REDIRECT_</code>.</p> + + <p>Al menos <code>REDIRECT_URL</code> y + <code>REDIRECT_QUERY_STRING</code> se pasarán a la nueva + URL (asumiendo que es un cgi-script o un cgi-include). Las otras + variables existirán solo si existían antes de aparecer + el error o problema. <strong>Ninguna</strong> de estas variables + se creará si en la directiva <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> ha especificado una + redirección <em>externa</em> (cualquier cosa que empiece + por un nombre de esquema del tipo <code>http:</code>, incluso si + se refiere al mismo servidor).</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="configuration" id="configuration">Configuración</a></h2> + + + <p>El uso de <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> + está activado para los ficheros .htaccess cuando <code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> tiene el valor + adecuado.</p> + + <p>Aquí hay algunos ejemplos más...</p> + + <div class="example"><p><code> + ErrorDocument 500 /cgi-bin/crash-recover <br /> + ErrorDocument 500 "Sorry, our script crashed. Oh dear" <br /> + ErrorDocument 500 http://xxx/ <br /> + ErrorDocument 404 /Lame_excuses/not_found.html <br /> + ErrorDocument 401 /Subscription/how_to_subscribe.html + </code></p></div> + + <p>La sintaxis es,</p> + + <div class="example"><p><code> + ErrorDocument <3-digit-code> <action> + </code></p></div> + + <p>donde action puede ser,</p> + + <ol> + <li>Texto a mostrar. Ponga antes del texto que quiere que se + muestre unas comillas ("). Lo que sea que siga a las comillas se + mostrará. <em>Nota: las comillas (") no se + muestran.</em></li> + + <li>Una URL local a la que se redireccionará la + petición.</li> + + <li>Una URL externa a la que se redireccionará la + petición.</li> + </ol> + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="custom" id="custom">Mesajes de error personalizados y redirecciones</a></h2> + + + <p>El comportamiento de Apache en cuanto a las redirecciones ha + cambiado para que puedan usarse más variables de entorno con + los script/server-include.</p> + + <h3>Antiguo comportamiento</h3> + + + <p>Las variables CGI estándar estaban disponibles para el + script al que se hacía la redirección. No se incluía + ninguna indicación sobre la precedencia de la + redirección.</p> + + + <h3>Nuevo comportamiento</h3> + + + <p>Un nuevo grupo de variables de entorno se inicializa para que + las use el script al que ha sido redireccionado. Cada + nueva variable tendrá el prefijo <code>REDIRECT_</code>. + Las variables de entorno <code>REDIRECT_</code> se crean a + partir de de las variables de entorno CGI que existen antes de + la redirección, se les cambia el nombre + añadiéndoles el prefijo <code>REDIRECT_</code>, por + ejemplo, <code>HTTP_USER_AGENT</code> pasa a ser + <code>REDIRECT_HTTP_USER_AGENT</code>. Además, para esas + nuevas variables, Apache definirá <code>REDIRECT_URL</code> + y <code>REDIRECT_STATUS</code> para ayudar al script a seguir su + origen. Tanto la URL original como la URL a la que es redirigida + la petición pueden almacenarse en los logs de acceso.</p> + + <p>Si ErrorDocument especifica una redirección local a un + script CGI, el script debe incluir una campo de cabeceraa + "<code>Status:</code>" en el resultado final para asegurar que + es posible hacer llegar al cliente de vuelta la condición + de error que lo provocó. Por ejemplo, un script en Perl + para usar con ErrorDocument podría incluir lo + siguiente:</p> + + <div class="example"><p><code> + ... <br /> + print "Content-type: text/html\n"; <br /> + printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; <br /> + ... + </code></p></div> + + <p>Si el script tiene como fin tratar una determinada + condición de error, por ejemplo + <code>404 Not Found</code>, se pueden usar los + códigos de error y textos específicos en su lugar.</p> + + <p>Tenga en cuenta que el script <em>debe</em> incluir un campo + de cabecera <code>Status:</code> apropiado (como + <code>302 Found</code>), si la respuesta contiene un campo de + cabecera <code>Location:</code> (para poder enviar una + redirección que se interprete en el cliente). De otra + manera, la cabecera + <code>Location:</code> puede que no tenga efecto.</p> + + </div></div> +<div class="bottomlang"> +<p><span>Idiomas disponibles: </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comentarios</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/custom-error.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Licencia bajo los términos de la <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="./mod/">Módulos</a> | <a href="./mod/directives.html">Directivas</a> | <a href="http://wiki.apache.org/httpd/FAQ">Preguntas Frecuentes</a> | <a href="./glossary.html">Glosario</a> | <a href="./sitemap.html">Mapa del sitio web</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/custom-error.html.fr.utf8 b/docs/manual/custom-error.html.fr.utf8 new file mode 100644 index 0000000..d09efac --- /dev/null +++ b/docs/manual/custom-error.html.fr.utf8 @@ -0,0 +1,250 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>Messages d'erreur personnalisés - Serveur HTTP Apache Version 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p> +<p class="apache">Serveur HTTP Apache Version 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">Serveur HTTP</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Messages d'erreur personnalisés</h1> +<div class="toplang"> +<p><span>Langues Disponibles: </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> + + <p>Le serveur HTTP Apache fournit des messages d'erreur génériques + pour les codes de statut 4xx ou 5xx ; ces messages sont cependant + relativement austères, imprécis, et peuvent s'avérer intimidants + pour les visiteurs du site. Si vous le souhaitez, vous pouvez + afficher des messages d'erreur plus conviviaux, dans un langage + autre que l'anglais, ou même sous une forme plus en adéquation avec + le style de votre site.</p> + + <p>Il est possible de définir des messages d'erreur personnalisés + pour chaque code de statut HTTP associé à une condition d'erreur - + c'est à dire tout code de statut 4xx ou 5xx.</p> + + <p>De plus, il est possible de + personnaliser le message d'erreur en fonction d'un jeu de valeurs + fourni, en utilisant les <a href="howto/ssi.html">Inclusions Côté + Serveur (SSI)</a>. Un programme CGI ou un autre gestionnaire + dynamique (PHP, mod_perl, etc...) peut aussi utiliser ces variables + pour gérer les conditions d'erreur.</p> + + + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#configuration">Configuration</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#variables">Variables disponibles</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#custom">Personnalisation des messages d'erreur</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#multi-lang">Messages d'erreur personnalisés + multilingues</a></li> +</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="#comments_section">Commentaires</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="configuration" id="configuration">Configuration</a></h2> + + <p>Les messages d'erreur personnalisés sont configurés via la + directive <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code>, qui + peut être utilisée dans un contexte global, serveur virtuel ou + répertoire. On peut utiliser cette directive dans les fichiers + .htaccess si <code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> est + définie à FileInfo.</p> + + <pre class="prettyprint lang-config">ErrorDocument 500 "Désolé, notre script s'est +crashé ; comme c'est dommage !" +ErrorDocument 500 /cgi-bin/crash-recover +ErrorDocument 500 http://error.example.com/server_error.html +ErrorDocument 404 /errors/not_found.html +ErrorDocument 401 /subscription/how_to_subscribe.html</pre> + + +<p>La syntaxe de la directive <code>ErrorDocument</code> est :</p> + <pre class="prettyprint lang-config">ErrorDocument <code_3_chiffres> <action></pre> + + <p>où action peut être traitée comme :</p> + <ol> + <li>Une URL de redirection local (si l'action commence par un "/").</li> + <li>Une URL de redirection externe (si action est une URL valide).</li> + <li>Le texte à afficher (si l'action ne répond à aucune des + deux conditions précédentes). Entourez le texte de guillemets (") + s'il contient plusieurs mots.</li> + </ol> + + <p>Dans le cas d'une redirection vers une URL locale, des variables + d'environnement supplémentaires sont définies de façon à ce que la + réponse puisse être personnalisée par la suite. Elles ne sont pas + envoyées aux URLs externes.</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="variables" id="variables">Variables disponibles</a></h2> + + <p>La redirection vers une autre URL peut être utile, mais + seulement s'il est possible de transmettre certaines informations + qui pourront être utilisées pour expliquer ou journaliser + la condition d'erreur ou le problème plus clairement.</p> + + <p>Pour y parvenir, lorsque la redirection d'erreur est envoyée, + des variables d'environnement supplémentaires sont définies à + partir des en-têtes de la requête originale en préfixant le nom + d'origine de l'en-tête par 'REDIRECT_', ce qui permet de fournir au + message d'erreur le contexte de la requête originelle.</p> + + <p>Par exemple, en plus des variables d'environnement habituelles, + vous pouvez recevoir ce qui suit :</p> + + + <div class="example"><p><code> + REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/jpeg, image/png<br /> + REDIRECT_HTTP_USER_AGENT=Mozilla/5.0 Fedora/3.5.8-1.fc12 Firefox/3.5.8<br /> + REDIRECT_PATH=.:/bin:/usr/local/bin:/sbin<br /> + REDIRECT_QUERY_STRING=<br /> + REDIRECT_REMOTE_ADDR=121.345.78.123<br /> + REDIRECT_REMOTE_HOST=client.example.com<br /> + REDIRECT_SERVER_NAME=www.example.edu<br /> + REDIRECT_SERVER_PORT=80<br /> + REDIRECT_SERVER_SOFTWARE=Apache/2.2.15<br /> + REDIRECT_URL=/cgi-bin/buggy.pl + </code></p></div> + + <p>Les variables d'environnement <code>REDIRECT_</code> sont + créées à partir des variables d'environnement préexistantes à la + redirection qui sont préfixées par la chaîne <code>REDIRECT_</code> ; + par exemple, <code>HTTP_USER_AGENT</code> devient + <code>REDIRECT_HTTP_USER_AGENT</code>.</p> + + <p><code>REDIRECT_URL</code>, <code>REDIRECT_STATUS</code>, et + <code>REDIRECT_QUERY_STRING</code> sont systématiquement définies, + les autres variables n'étant définies que si l'en-tête + correspondant existait avant la condition d'erreur.</p> + + <p><strong>Aucune</strong> d'entre elles ne sera définie si votre + directive <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> + spécifie une redirection <em>externe</em> (toute URL commençant + par un protocole du style <code>http:</code>, même si elle fait + référence au même hôte que le serveur).</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="custom" id="custom">Personnalisation des messages d'erreur</a></h2> + + + <p>Si vous faites pointer votre directive + <code>ErrorDocument</code> vers certains gestionnaires + dynamiques comme les inclusions côté serveur, les scripts CGI ou + d'autres gestionnaires, vous pouvez utiliser les variables + d'environnement supplémentaires disponibles pour personnaliser + le message.</p> + + + <p>Si la directive ErrorDname-basedocument spécifie une redirection locale + vers un script CGI, ce dernier doit ajouter un en-tête + "<code>Status:</code>" dans sa sortie afin de s'assurer du bon + acheminement jusqu'au client de la condition d'erreur qui a + provoqué cette redirection. Par exemple, un script Perl spécifié + par une directive ErrorDocument pourrait contenir ce qui suit + :</p> + + <pre class="prettyprint lang-perl">... +print "Content-type: text/html\n"; +printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; +...</pre> + + + <p>Si un script est dédié à la gestion d'une condition d'erreur + spécifique, telle que <code>404 Not Found</code>, il + peut utiliser le code et le texte de l'erreur spécifiques à la + place.</p> + + <p>Notez que si la réponse contient un en-tête + <code>Location:</code> (afin d'initier une redirection côté + client), le script <em>doit</em> émettre un en-tête approprié + (comme <code>302 Found</code>). Dans le cas contraire, + l'en-tête <code>Location:</code> ne produira aucun effet.</p> + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="multi-lang" id="multi-lang">Messages d'erreur personnalisés + multilingues</a></h2> + + <p>Vous trouverez dans la distribution du serveur HTTP Apache un + répertoire contenant des messages d'erreur personnalisés traduits en + 16 langues différentes. Pour activer cette fonctionnalité, vous + pouvez aussi inclure un fichier de configuration qui se trouve dans + le répertoire de configuration <code>conf/extra</code>.</p> + + <p>Dans le fichier de configuration de votre serveur, vous trouverez + un groupe de lignes du style :</p> + + <pre class="prettyprint lang-config"> # Multi-language error messages + #Include conf/extra/httpd-multilang-errordoc.conf</pre> + + + <p>Décommentez la ligne <code>Include</code> pour activer cette + fonctionnalité, et présenter des messages d'erreur dont le langage + sera négocié en fonction du langage préféré défini au niveau du + navigateur du client.</p> + + <p>De plus, ces documents contiennent diverses variables + <code>REDIRECT_</code>, de façon à ce que l'utilisateur final + dispose d'informations supplémentaires à propos de ce qui a pu se + produire, et de ce qu'il est susceptible de faire maintenant.</p> + + <p>Ces documents peuvent être personnalisés en fournissant autant + d'informations utiles que vous le souhaitez aux utilisateurs à + propos de votre site, et de ce qu'ils sont susceptibles d'y trouver.</p> + + <p>Pour pouvoir utiliser cette fonctionnalité, vous devez activer + <code class="module"><a href="./mod/mod_include.html">mod_include</a></code> et <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code>.</p> + + </div></div> +<div class="bottomlang"> +<p><span>Langues Disponibles: </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/custom-error.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Autorisé sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/custom-error.html.ja.utf8 b/docs/manual/custom-error.html.ja.utf8 new file mode 100644 index 0000000..60721e4 --- /dev/null +++ b/docs/manual/custom-error.html.ja.utf8 @@ -0,0 +1,229 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>カスタムエラーレスポンス - Apache HTTP サーバ バージョン 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p> +<p class="apache">Apache HTTP サーバ バージョン 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP サーバ</a> > <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> > <a href="./">バージョン 2.4</a></div><div id="page-content"><div id="preamble"><h1>カスタムエラーレスポンス</h1> +<div class="toplang"> +<p><span>翻訳済み言語: </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate">この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 + </div> + + <p>ウェブマスターが何らかのエラーや問題に対する + Apache の反応を設定できるようにする追加機能を提供します。</p> + + <p>サーバがエラーや問題を発見した場合の反応を、 + カスタマイズして定義することができます。</p> + + <p>スクリプトの実行が失敗して "500 Server Error" + を発生させたとします。この場合の反応を、より好ましいテキストや、別の + URL (内部及び外部) へのリダイレクションに置き換えることができます。 + </p> + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#behavior">動作</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#configuration">設定</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#custom">カスタムエラーレスポンスとリダイレクト</a></li> +</ul><h3>参照</h3><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="behavior" id="behavior">動作</a></h2> + + + <h3>古い動作</h3> + + + <p>NCSA httpd 1.3 は、古くて退屈なエラー/問題メッセージを + 返していました。それはしばしばユーザには無意味であり、 + またそれを発生させた原因を記録する方法も提供していませんでした。</p> + + + <h3>新しい動作</h3> + + + <ol> + <li>NCSA のハードコードされたメッセージの代わりに + 他のテキストを表示</li> + + <li>ローカルの URL にリダイレクト</li> + + <li>外部の URL にリダイレクト</li> + </ol> + + <p>するようにサーバを設定できます。</p> + + <p>別の URL にリダイレクトすることは役に立ちますが、 + それは説明をしたり、より明確に誤り/問題を記録したりするために + 何か情報を伝えられるときに限ります。</p> + + <p>これを実現するために、 Apache は新しく CGI のような環境変数を + 定義します:</p> + + <div class="example"><p><code> + REDIRECT_HTTP_ACCEPT=*/*, image/gif, + image/x-xbitmap, image/jpeg<br /> + REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX + A.09.05 9000/712)<br /> + REDIRECT_PATH=.:/bin:/usr/local/bin:/etc<br /> + REDIRECT_QUERY_STRING=<br /> + REDIRECT_REMOTE_ADDR=121.345.78.123<br /> + REDIRECT_REMOTE_HOST=ooh.ahhh.com<br /> + REDIRECT_SERVER_NAME=crash.bang.edu<br /> + REDIRECT_SERVER_PORT=80<br /> + REDIRECT_SERVER_SOFTWARE=Apache/0.8.15<br /> + REDIRECT_URL=/cgi-bin/buggy.pl + </code></p></div> + + <p>頭に付く <code>REDIRECT_</code> に注目してください。</p> + + <p>少なくとも <code>REDIRECT_URL</code> と + <code>REDIRECT_QUERY_STRING</code> は新しい URL (CGI スクリプトか + CGI インクルードであると仮定されます) に渡されます。 + 他の変数は、エラーや問題が起きる前に存在した場合にだけ存在します。 + もしあなたの設定した <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> が <em>外部</em>リダイレクト + (<em>すなわち</em>、<code>http:</code> + のような体系名から始まるすべてのもの。たとえ同じホストを指していても) + ならば、これらは<strong>まったく</strong>設定されません。</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="configuration" id="configuration">設定</a></h2> + + + <p><code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> が適切に設定されていれば、 + .htaccess ファイルで <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> + を使用することができます。</p> + + <p>ここに、いくつかの例を挙げます。</p> + + <div class="example"><p><code> + ErrorDocument 500 /cgi-bin/crash-recover <br /> + ErrorDocument 500 "Sorry, our script crashed. Oh dear" <br /> + ErrorDocument 500 http://xxx/ <br /> + ErrorDocument 404 /Lame_excuses/not_found.html <br /> + ErrorDocument 401 /Subscription/how_to_subscribe.html + </code></p></div> + + <p>構文</p> + + <div class="example"><p><code> + ErrorDocument <3-digit-code> <action> + </code></p></div> + + <p>action (動作) は、下記のいずれかです</p> + + <ol> + <li>表示するテキスト。テキストは引用符 (") で囲んで指定します。</li> + + <li>リダイレクト先の外部 URL </li> + + <li>リダイレクト先のローカル URL </li> + </ol> + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="custom" id="custom">カスタムエラーレスポンスとリダイレクト</a></h2> + + + <p>スクリプト/SSI に追加の環境変数が利用可能になるように、 + リダイレクトされた URL に対する Apache の動作が変更されました。</p> + + <h3>古い動作</h3> + + + <p>リダイレクトされたスクリプトは標準の CGI + 環境変数を利用可能でした。しかし、どこからリダイレクト + されたかの情報は提供されていませんでした。</p> + + + <h3>新しい動作</h3> + + + <p>リダイレクトされた先のスクリプトが使用可能なように、 + 新しいたくさんの環境変数が初期化されます。新しい変数は、それぞれ + <code>REDIRECT_</code> で始まります。 + <code>REDIRECT_</code> で始まる環境変数はリダイレクトされる前に存在していた + CGI 環境変数の頭に <code>REDIRECT_</code> を付けて作成されます。 + <em>すなわち</em>、<code>HTTP_USER_AGENT</code> は + <code>REDIRECT_HTTP_USER_AGENT</code> になります。 + これらの新しい変数に加えて、Apache は、 + スクリプトがリダイレクト元のトレースを助けるために + <code>REDIRECT_URL</code> と <code>REDIRECT_STATUS</code> + を定義します。アクセスログには元の URL とリダイレクトされた URL + の両方が記録されます。</p> + + <p>ErrorDocument が CGI スクリプトへのローカルリダイレクトを + 指定している場合は、それを起動することになったエラーの状態を + クライアントまで確実に伝えるために <code>"Status:" </code> + ヘッダを含むべきです。例えば、ErrorDocument 用の Perl + スクリプトは以下のようなものを含むかもしれません。 + </p> + + <div class="example"><p><code> + ... <br /> + print "Content-type: text/html\n"; <br /> + printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; <br /> + ... + </code></p></div> + + <p>スクリプトが <code>404 Not Found</code> のような + 特定のエラーコンディションを扱うためだけに使われる場合は、 + 代わりに特定のコードとエラーテキストを使用することができます。</p> + + </div></div> +<div class="bottomlang"> +<p><span>翻訳済み言語: </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/custom-error.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> +<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/custom-error.html.ko.euc-kr b/docs/manual/custom-error.html.ko.euc-kr new file mode 100644 index 0000000..85ae77c --- /dev/null +++ b/docs/manual/custom-error.html.ko.euc-kr @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="EUC-KR"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head> +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title> - Apache HTTP Server Version 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1> </h1> +<div class="toplang"> +<p><span> : </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate"> ֽ ƴմϴ. + ֱٿ ϼ.</div> + + <p>ʹ ġ + ִ.</p> + + <p> ߰ + ִ.</p> + + <p>ũƮ "500 Server Error" ڿ + ģ ϰų ٸ ( Ʈ ܺ Ʈ) + URL ̷ ִ.</p> + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#behavior">ൿ</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#configuration"></a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#custom"> ̷</a></li> +</ul><h3></h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="behavior" id="behavior">ൿ</a></h2> + + + <h3> ൿ</h3> + + + <p>NCSA httpd 1.3 ڿ ǹϰ + ´. α .</p> + + + <h3>ο ൿ</h3> + + + <p> ִ:</p> + + <ol> + <li>NCSA ٸ ְų</li> + + <li> Ʈ URL ̷ϰų</li> + + <li>ܺ Ʈ URL ̷Ѵ.</li> + </ol> + + <p>ٸ Ʈ URL ̷ϴ , + ϰų αϴµ ʿ Ϻθ + ȴ.</p> + + <p> ϱ ġ CGI ο + ȯ溯 Ѵ:</p> + + <div class="example"><p><code> + REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, + image/jpeg<br /> + REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 + 9000/712)<br /> + REDIRECT_PATH=.:/bin:/usr/local/bin:/etc<br /> + REDIRECT_QUERY_STRING=<br /> + REDIRECT_REMOTE_ADDR=121.345.78.123<br /> + REDIRECT_REMOTE_HOST=ooh.ahhh.com<br /> + REDIRECT_SERVER_NAME=crash.bang.edu<br /> + REDIRECT_SERVER_PORT=80<br /> + REDIRECT_SERVER_SOFTWARE=Apache/0.8.15<br /> + REDIRECT_URL=/cgi-bin/buggy.pl + </code></p></div> + + <p><code>REDIRECT_</code> λ翡 ָ϶.</p> + + <p>ּ <code>REDIRECT_URL</code> + <code>REDIRECT_QUERY_STRING</code> (cgi-script + cgi-include) URL Ѱ. ٸ + ϱ <span class="transnote">(<em>;</em> ̸ <code>REDIRECT_</code> + ȯ溯)</span> 쿡 ִ. + <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> + <em>ܺη</em> ( <code>http:</code> + Ŵ(scheme) Ѵٸ) ̷Ѵٸ + ͵ <strong>ʴ´</strong>.</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="configuration" id="configuration"></a></h2> + + + <p><code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> + Ǿٸ .htaccess Ͽ + <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> + ִ.</p> + + <p> ̴...</p> + + <div class="example"><p><code> + ErrorDocument 500 /cgi-bin/crash-recover <br /> + ErrorDocument 500 "Sorry, our script crashed. Oh dear" <br /> + ErrorDocument 500 http://xxx/ <br /> + ErrorDocument 404 /Lame_excuses/not_found.html <br /> + ErrorDocument 401 /Subscription/how_to_subscribe.html + </code></p></div> + + <p>,</p> + + <div class="example"><p><code> + ErrorDocument <3-digit-code> <action> + </code></p></div> + + <p> action,</p> + + <ol> + <li> . ǥ (") տ δ. ڿ + ǥ µȴ. <em>: տ ǥ (") µ + ʴ´.</em></li> + + <li>̷ ܺ URL.</li> + + <li>̷ URL.</li> + </ol> + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="custom" id="custom"> ̷</a></h2> + + + <p>URL ̷ϴ ġ ൿ + ũƮ/server-include ȯ溯 Ѱֵ Ǿ.</p> + + <h3> ൿ</h3> + + + <p>̷ǵǴ ũƮ ǥ CGI Ѿ. + ̷ Ͼ .</p> + + + <h3>ο ൿ</h3> + + + <p>̷ǵ ũƮ ο ȯ溯 + ִ. տ <code>REDIRECT_</code> پִ. + <code>REDIRECT_</code> ȯ溯 CGI ȯ溯 + տ <code>REDIRECT_</code> ٿ . <em> + </em>, <code>HTTP_USER_AGENT</code> + <code>REDIRECT_HTTP_USER_AGENT</code> Ǿ. ̷ + ߰ ũƮ URL ˵ ġ + <code>REDIRECT_URL</code> <code>REDIRECT_STATUS</code> + Ѵ. URL ̷ǵ URL α + ִ.</p> + + <p>ErrorDocument ִ CGI ũƮ + ̷Ѵٸ, ũƮ Ŭ̾Ʈ Ȳ + Ȯ ϱ ¿ "<code>Status:</code>" + ʵ带 ؾ Ѵ. , Perl ۼ ErrorDocument + ũƮ :</p> + + <div class="example"><p><code> + ... <br /> + print "Content-type: text/html\n"; <br /> + printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; <br /> + ... + </code></p></div> + + <p><code>404 Not Found</code> Ư + Ȳ ũƮ, <span class="transnote">(<em>;</em> )</span> + Ư ڵ ִ.</p> + + <p>(Ŭ̾Ʈ ̷ ûϱ) 信 + <code>Location:</code> Ѵٸ, ũƮ + <em>ݵ</em> (<code>302 Found</code> ) + <code>Status:</code> ؾ ϶. + <code>Location:</code> ƹ ҿ ִ.</p> + + </div></div> +<div class="bottomlang"> +<p><span> : </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/custom-error.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/custom-error.html.tr.utf8 b/docs/manual/custom-error.html.tr.utf8 new file mode 100644 index 0000000..e73afd3 --- /dev/null +++ b/docs/manual/custom-error.html.tr.utf8 @@ -0,0 +1,233 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>Hata Yanıtlarının Kişiselleştirilmesi - Apache HTTP Sunucusu Sürüm 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p> +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Sunucusu</a> > <a href="http://httpd.apache.org/docs/">Belgeleme</a> > <a href="./">Sürüm 2.4</a></div><div id="page-content"><div id="preamble"><h1>Hata Yanıtlarının Kişiselleştirilmesi</h1> +<div class="toplang"> +<p><span>Mevcut Diller: </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" title="Türkçe"> tr </a></p> +</div> + + + <p>Apache HTTP Sunucusu 4xx veya 5xx HTTP durum kodları ile ilgili + olaylarda soysal hata yanıtları üretse de bu yanıtlar site + kullanıcılarına aşırı sade, bilgi vermez ve hatta korkutucu gelebilir. + Daha dostça yazılmış, İngilizce değil de kendi dilinizde ve belki + sayfalarınızın yerleşimine uygun daha hoş satırlarda özel hata yanıtları + üretmek isteyebilirsiniz.</p> + + <p>Kişiselleştirilmiş hata yanıtları, bir hata durumuna göre tasarlanmış + herhangi bir HTTP durum kodu (yani 4xx ve 5xx kodlarından biri) için + tanımlanabilir.</p> + + <p>Ek olarak bir değer kümesi de sağlanmıştır. Böylece hata belgeleri, <a href="howto/ssi.html">Sunucu taraflı İçerik Yerleştirme</a> kullanılarak + bu değişkenlerin değerlerine göre özelleştirilebilir. İsterseniz bunun + yerine bir CGI programı veya devingen bir eylemci (PHP, mod_perl, vs.) + kullanarak da bu değişkenlerin değerlerine göre hata sayfalarınızı + üretebilirsiniz.</p> + + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#configuration">Yapılandırma</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#variables">Kullanılabilen Değişkenler</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#custom">Özel Hata Yanıtları</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#multi-lang">Çok Dilli Özel Hata Belgeleri</a></li> +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="#comments_section">Yorumlar</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="configuration" id="configuration">Yapılandırma</a></h2> + + <p>Kişiselleştirilmiş hata belgeleri <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> yönergesi kullanılarak yapılandırılabilir. Bu + yönerge küresel bağlamda olabileceği gibi sanal konak ve dizin + bağlamlarında da kullanılabilir. <code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> yönergesine <code>FileInfo</code> + atanarak <code>.htaccess</code> dosyalarında da kullanılabilir.</p> + + <pre class="prettyprint lang-config">ErrorDocument 500 "Pardon, galiba bizim betik hata verdi." +ErrorDocument 500 /cgi-bin/hata-kurtarma +ErrorDocument 500 http://error.example.com/server_error.html +ErrorDocument 404 /ozuru_kabahatinden_buyuk/yok.html +ErrorDocument 401 /Uyeler/NASIL_uye_olunur.html</pre> + + + <p><code>ErrorDocument</code> yönergesinin sözdizimi:</p> + + <pre class="prettyprint lang-config">ErrorDocument <3-rakamlı-kod> <eylem></pre> + + + <p><var>eylem</var> şunlardan biri olabilir:</p> + + <ol> + <li>Yönlendirmenin yapılacağı dahili adres (<var>eylem</var> bir "/" ile + başlıyorsa).</li> + <li>Yönlendirmenin yapılacağı harici adres (<var>eylem</var> geçerli bir + URL ise).</li> + <li>Gösterilecek metin (yukardakilerin hiçbiri yoksa). Birden fazla + sözcük içeriyorsa tırnak (") içine alınmalıdır.</li> + </ol> + + <p>Yerel bir adrese yönlendirme yapılırken ek ortam değişkenleri de + atanarak yanıt daha da özelleştirilebilir. Bunlar harici URL'lere + gönderilmez.</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="variables" id="variables">Kullanılabilen Değişkenler</a></h2> + + <p>Hata durumunu açıklayacak veya hata günlüğüne daha açıkça + kaydedilebilecek bazı bilgilerin aktarılması koşuluyla, başka bir + adrese yönlendirme kullanışlı olabilir</p> + + <p>Hata yönlendirmesi yapılırken bunu sağlamak için ek ortam değişkenleri + tanımlanır. Bu değişkenlerin isimleri, özgün istekle sağlanan + başlık isimlerinin önüne 'REDIRECT_' dizgesi getirilerek üretilir. + Böylece özgün istek bağlamından hata belgesi üretilebilir.</p> + + <p>Örneğin, aşağıdaki gibi, daha yararlı olacak ek ortam değişkenleri + alabilirsiniz.</p> + + <div class="example"><p><code> + REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/jpeg, image/png<br /> + REDIRECT_HTTP_USER_AGENT=Mozilla/5.0 Fedora/3.5.8-1.fc12 Firefox/3.5.8<br /> + REDIRECT_PATH=.:/bin:/usr/local/bin:/sbin<br /> + REDIRECT_QUERY_STRING=<br /> + REDIRECT_REMOTE_ADDR=121.345.78.123<br /> + REDIRECT_REMOTE_HOST=client.example.com<br /> + REDIRECT_SERVER_NAME=www.example.edu<br /> + REDIRECT_SERVER_PORT=80<br /> + REDIRECT_SERVER_SOFTWARE=Apache/2.2.15<br /> + REDIRECT_URL=/cgi-bin/buggy.pl + </code></p></div> + + <p><code>REDIRECT_</code> ortam değişkenleri, yönlendirme öncesi varolan + ortam değişkenlerinden üretilir. Bunlar önlerine <code>REDIRECT_</code> + getirilerek yeniden isimlendirilir. Örneğin, + <code>HTTP_USER_AGENT</code> değişkeni + <code>REDIRECT_HTTP_USER_AGENT</code> haline gelir.</p> + + <p><code>REDIRECT_URL</code>, <code>REDIRECT_STATUS</code> ve + <code>REDIRECT_QUERY_STRING</code> mutlaka atanır. Diğer başlıklarla + ilgili olanlar ise hata durumu öncesinde mevcut oldukları takdirde + üretilirler.</p> + + <p>Eğer <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> hedefi bir + <em>harici</em> yönlendirme ise bunların <strong>hiçbiri</strong> + üretilmez (sunucunun bulunduğu konağı hedeflese bile <code>http:</code> + ile başlayan herşey harici yönlendirme sayılır).</p> + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="custom" id="custom">Özel Hata Yanıtları</a></h2> + + <p>Hata yanıtınızı üretmek için sunucu taraflı içerik yerleştirme, bir + CGI betiği veya başka bir eylemciyi devingen eylemci olarak + kullanıyorsanız, bu yanıtı özelleştirmek için bu kullanıma özel + üretilmiş ortam değişkenlerini kullanmak isteyebilirsiniz.</p> + + <p><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> yönergesi bir CGI + betiğine bir yerel yönlendirme belirtiyorsa, hatanın kaynağı hakkında + istemciye bilgi vermek amacıyla betiğin çıktısında bir + "<code>Status:</code>" başlık alanına yer verilmelidir. Örneğin, bir + Perl betiği şunları içerebilirdi:</p> + + <pre class="prettyprint lang-perl">... +print "Content-type: text/html\n"; +printf "Status: %s durumu saptandı.\n", $ENV{"REDIRECT_STATUS"}; +...</pre> + + + <p>Eğer betik, <code>404 Not Found</code> gibi, belli bir hata + durumunu ele almaya adanmışsa duruma özel kod ve hata metni + kullanılabilir.</p> + + <p>Eğer yanıt, (istemci taraflı yönlendirme yapılırken) bir + <code>Location:</code> başlığı da içeriyorsa betiğin çıktıya uygun bir + <code>Status:</code> başlığı (<code>302 Found</code>) eklemesinin + gerekli oluşuna dikkat ediniz. Aksi takdirde, <code>Location:</code> + başlığı etkisiz olabilir.</p> + + </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="multi-lang" id="multi-lang">Çok Dilli Özel Hata Belgeleri</a></h2> + + <p>Apache HTTP Sunucusunun kurulumunda, 16 dile çevrilmiş özel hata + iletileri belgeleri içeren bir dizin bulunmaktadır. Ayrıca, + <code>conf/extra</code> yaplandırma dizininde bu özelliği etkin kılmak + için yapılandırmaya dahil edilebilecek bir yapılandırma dosyası + vardır.</p> + + <p>Sunucu yapılandırma dosyanızda şöyle satırlar görebilirsiniz:</p> + + <pre class="prettyprint lang-config"># Multi-language error messages +#Include conf/extra/httpd-multilang-errordoc.conf</pre> + + + <p>Bu <code>Include</code> satırını açıklama olmaktan çıkarırsanız + bu özelliği etkinleştirmiş olursunuz. Böylece, istemcinin tarayıcısında + belirtilmiş dil tercihine uygun dil uzlaşımlı hata iletileri + sağlanır.</p> + + <p>Ek olarak, bu belgeler çeşitli <code>REDIRECT_</code> değişkenleri + içerir. Böylece, son kullanıcıya neler olduğu ve şimdi ne yapması + beklendiği hakkında ek bilgiler sağlanabilir.</p> + + <p>Bu belgeleri istediğiniz kadar özelleştirebilir, kullanıcıya siteniz + hakkında ve orada bulabilecekleri şeylere dair faydalı bilgiler de + sağlayabilirsiniz.</p> + + <p>Bu özelliği kullanmak için <code class="module"><a href="./mod/mod_include.html">mod_include</a></code> ve + <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> etkin kılınmalıdır.</p> + + </div></div> +<div class="bottomlang"> +<p><span>Mevcut Diller: </span><a href="./en/custom-error.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./es/custom-error.html" hreflang="es" rel="alternate" title="Español"> es </a> | +<a href="./fr/custom-error.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/custom-error.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/custom-error.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/custom-error.html" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorumlar</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/custom-error.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p> +<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file |