changeset 1826:da6a3e401b26

Slightly reformatted the error_page description. Information about directives inheritance was moved to the end. Blocks describing various syntaxes of the "uri" argument were put in the following order: - internal redirect to the specified /uri; - internal redirect to a named location; - URL redirection.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 24 Oct 2016 11:57:46 +0300
parents 56b6244ddadb
children 64e2b8c5200d
files xml/en/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_core_module.xml
diffstat 2 files changed, 41 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml	Mon Oct 24 11:49:51 2016 +0300
+++ b/xml/en/docs/http/ngx_http_core_module.xml	Mon Oct 24 11:57:46 2016 +0300
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_core_module"
         link="/en/docs/http/ngx_http_core_module.html"
         lang="en"
-        rev="61">
+        rev="62">
 
 <section id="directives" name="Directives">
 
@@ -611,10 +611,7 @@
 
 <para>
 Defines the URI that will be shown for the specified errors.
-<literal>error_page</literal> directives are inherited from the previous
-level only if there are no <literal>error_page</literal>
-directives defined on the current level.
-A <literal>uri</literal> value can contain variables.
+A <value>uri</value> value can contain variables.
 </para>
 
 <para>
@@ -644,17 +641,6 @@
 </para>
 
 <para>
-It is also possible to use redirects for error processing:
-<example>
-error_page 403      http://example.com/forbidden.html;
-error_page 404 =301 http://example.com/notfound.html;
-</example>
-In this case, by default, the response code 302 is returned to the client.
-It can only be changed to one of the redirect status
-codes (301, 302, 303, and 307).
-</para>
-
-<para>
 If there is no need to change URI during internal redirection it is
 possible to pass error processing into a named location:
 <example>
@@ -670,11 +656,29 @@
 
 <para>
 <note>
-If <literal>uri</literal> processing leads to an error,
+If <value>uri</value> processing leads to an error,
 the status code of the last occurred error is returned to the client.
 </note>
 </para>
 
+<para>
+It is also possible to use URL redirects for error processing:
+<example>
+error_page 403      http://example.com/forbidden.html;
+error_page 404 =301 http://example.com/notfound.html;
+</example>
+In this case, by default, the response code 302 is returned to the client.
+It can only be changed to one of the redirect status
+codes (301, 302, 303, and 307).
+</para>
+
+<para>
+These directives are inherited from the previous level if and
+only if there are no
+<literal>error_page</literal>
+directives defined on the current level.
+</para>
+
 </directive>
 
 
--- a/xml/ru/docs/http/ngx_http_core_module.xml	Mon Oct 24 11:49:51 2016 +0300
+++ b/xml/ru/docs/http/ngx_http_core_module.xml	Mon Oct 24 11:57:46 2016 +0300
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_core_module"
         link="/ru/docs/http/ngx_http_core_module.html"
         lang="ru"
-        rev="61">
+        rev="62">
 
 <section id="directives" name="Директивы">
 
@@ -608,10 +608,7 @@
 
 <para>
 Задаёт URI, который будет показываться для указанных ошибок.
-Директивы <literal>error_page</literal> наследуются с предыдущего уровня
-при условии, что на данном уровне не заданы свои директивы
-<literal>error_page</literal>.
-В значении <literal>uri</literal> можно использовать переменные.
+В значении <value>uri</value> можно использовать переменные.
 </para>
 
 <para>
@@ -640,18 +637,6 @@
 </para>
 
 <para>
-Также существует возможность использовать перенаправления для обработки
-ошибок:
-<example>
-error_page 403      http://example.com/forbidden.html;
-error_page 404 =301 http://example.com/notfound.html;
-</example>
-В этом случае по умолчанию клиенту возвращается код ответа 302.
-Его можно изменить только на один из кодов ответа, относящихся к
-перенаправлениям (301, 302, 303 и 307).
-</para>
-
-<para>
 Если при внутреннем перенаправлении не нужно менять URI, то можно передать
 обработку ошибки в именованный location:
 <example>
@@ -667,11 +652,28 @@
 
 <para>
 <note>
-Если при обработке <literal>uri</literal> происходит ошибка,
+Если при обработке <value>uri</value> происходит ошибка,
 клиенту возвращается ответ с кодом последней случившейся ошибки.
 </note>
 </para>
 
+<para>
+Также существует возможность использовать перенаправления URL для обработки
+ошибок:
+<example>
+error_page 403      http://example.com/forbidden.html;
+error_page 404 =301 http://example.com/notfound.html;
+</example>
+В этом случае по умолчанию клиенту возвращается код ответа 302.
+Его можно изменить только на один из кодов ответа, относящихся к
+перенаправлениям (301, 302, 303 и 307).
+</para>
+
+<para>
+Директивы наследуются с предыдущего уровня при условии, что на данном уровне
+не описаны свои директивы <literal>error_page</literal>.
+</para>
+
 </directive>