changeset 1097:eeb690d4212b

Documented the PROXY protocol support.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 18 Mar 2014 19:59:24 +0400
parents f34be6b26447
children bc2a379c4cb6
files xml/en/docs/http/ngx_http_core_module.xml xml/en/docs/http/ngx_http_realip_module.xml xml/ru/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_realip_module.xml
diffstat 4 files changed, 66 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml	Tue Mar 04 13:02:21 2014 +0000
+++ b/xml/en/docs/http/ngx_http_core_module.xml	Tue Mar 18 19:59:24 2014 +0400
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_core_module"
         link="/en/docs/http/ngx_http_core_module.html"
         lang="en"
-        rev="29">
+        rev="30">
 
 <section id="directives" name="Directives">
 
@@ -1098,6 +1098,7 @@
     [<literal>default_server</literal>]
     [<literal>ssl</literal>]
     [<literal>spdy</literal>]
+    [<literal>proxy_protocol</literal>]
     [<literal>setfib</literal>=<value>number</value>]
     [<literal>fastopen</literal>=<value>number</value>]
     [<literal>backlog</literal>=<value>number</value>]
@@ -1113,6 +1114,7 @@
     [<literal>default_server</literal>]
     [<literal>ssl</literal>]
     [<literal>spdy</literal>]
+    [<literal>proxy_protocol</literal>]
     [<literal>setfib</literal>=<value>number</value>]
     [<literal>fastopen</literal>=<value>number</value>]
     [<literal>backlog</literal>=<value>number</value>]
@@ -1128,6 +1130,7 @@
     [<literal>default_server</literal>]
     [<literal>ssl</literal>]
     [<literal>spdy</literal>]
+    [<literal>proxy_protocol</literal>]
     [<literal>backlog</literal>=<value>number</value>]
     [<literal>rcvbuf</literal>=<value>size</value>]
     [<literal>sndbuf</literal>=<value>size</value>]
@@ -1205,6 +1208,13 @@
 </para>
 
 <para>
+The <literal>proxy_protocol</literal> parameter (1.5.12)
+allows specifying that all connections accepted on this port should use the
+<link url="http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt">PROXY
+protocol</link>.
+</para>
+
+<para>
 A <literal>listen</literal> directive
 can have several additional parameters specific to socket-related system calls.
 These parameters can be specified in any
@@ -2887,6 +2897,17 @@
 otherwise (1.3.12, 1.2.7)
 </tag-desc>
 
+<tag-name id="var_proxy_protocol_addr"><var>$proxy_protocol_addr</var></tag-name>
+<tag-desc>
+client address from the PROXY protocol header, or an empty string otherwise
+(1.5.12)
+<para>
+The PROXY protocol must be previously enabled by setting the
+<literal>proxy_protocol</literal> parameter
+in the <link id="listen"/> directive.
+</para>
+</tag-desc>
+
 <tag-name id="var_query_string"><var>$query_string</var></tag-name>
 <tag-desc>
 same as <var>$args</var>
--- a/xml/en/docs/http/ngx_http_realip_module.xml	Tue Mar 04 13:02:21 2014 +0000
+++ b/xml/en/docs/http/ngx_http_realip_module.xml	Tue Mar 18 19:59:24 2014 +0400
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_realip_module"
         link="/en/docs/http/ngx_http_realip_module.html"
         lang="en"
-        rev="1">
+        rev="2">
 
 <section id="summary">
 
@@ -72,7 +72,8 @@
 <syntax>
     <value>field</value> |
     <literal>X-Real-IP</literal> |
-    <literal>X-Forwarded-For</literal></syntax>
+    <literal>X-Forwarded-For</literal> |
+    <literal>proxy_protocol</literal></syntax>
 <default>X-Real-IP</default>
 <context>http</context>
 <context>server</context>
@@ -83,6 +84,14 @@
 the address for a replacement.
 </para>
 
+<para>
+The <literal>proxy_protocol</literal> parameter (1.5.12) changes
+the client address to the one from the PROXY protocol header.
+The PROXY protocol must be previously enabled by setting the
+<literal>proxy_protocol</literal> parameter
+in the <link doc="ngx_http_core_module.xml" id="listen"/> directive.
+</para>
+
 </directive>
 
 
--- a/xml/ru/docs/http/ngx_http_core_module.xml	Tue Mar 04 13:02:21 2014 +0000
+++ b/xml/ru/docs/http/ngx_http_core_module.xml	Tue Mar 18 19:59:24 2014 +0400
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_core_module"
         link="/ru/docs/http/ngx_http_core_module.html"
         lang="ru"
-        rev="29">
+        rev="30">
 
 <section id="directives" name="Директивы">
 
@@ -1093,6 +1093,7 @@
     [<literal>default_server</literal>]
     [<literal>ssl</literal>]
     [<literal>spdy</literal>]
+    [<literal>proxy_protocol</literal>]
     [<literal>setfib</literal>=<value>число</value>]
     [<literal>fastopen</literal>=<value>число</value>]
     [<literal>backlog</literal>=<value>число</value>]
@@ -1108,6 +1109,7 @@
     [<literal>default_server</literal>]
     [<literal>ssl</literal>]
     [<literal>spdy</literal>]
+    [<literal>proxy_protocol</literal>]
     [<literal>setfib</literal>=<value>число</value>]
     [<literal>fastopen</literal>=<value>число</value>]
     [<literal>backlog</literal>=<value>число</value>]
@@ -1123,6 +1125,7 @@
     [<literal>default_server</literal>]
     [<literal>ssl</literal>]
     [<literal>spdy</literal>]
+    [<literal>proxy_protocol</literal>]
     [<literal>backlog</literal>=<value>число</value>]
     [<literal>rcvbuf</literal>=<value>размер</value>]
     [<literal>sndbuf</literal>=<value>размер</value>]
@@ -1198,6 +1201,14 @@
 </para>
 
 <para>
+Параметр <literal>proxy_protocol</literal> (1.5.12)
+указывает на то, что все соединения, принимаемые на данном порту,
+должны использовать
+<link url="http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt">протокол
+PROXY</link>.
+</para>
+
+<para>
 В директиве <literal>listen</literal> можно также указать несколько
 дополнительных параметров, специфичных для связанных с сокетами
 системных вызовов.
@@ -2884,6 +2895,16 @@
 (1.3.12, 1.2.7)
 </tag-desc>
 
+<tag-name id="var_proxy_protocol_addr"><var>$proxy_protocol_addr</var></tag-name>
+<tag-desc>
+адрес клиента, полученный из заголовка протокола PROXY, либо пустая строка
+(1.5.12)
+<para>
+Протокол PROXY должен быть предварительно включён при помощи установки
+параметра <literal>proxy_protocol</literal> в директиве <link id="listen"/>.
+</para>
+</tag-desc>
+
 <tag-name id="var_query_string"><var>$query_string</var></tag-name>
 <tag-desc>
 то же, что и <var>$args</var>
--- a/xml/ru/docs/http/ngx_http_realip_module.xml	Tue Mar 04 13:02:21 2014 +0000
+++ b/xml/ru/docs/http/ngx_http_realip_module.xml	Tue Mar 18 19:59:24 2014 +0400
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_realip_module"
         link="/ru/docs/http/ngx_http_realip_module.html"
         lang="ru"
-        rev="1">
+        rev="2">
 
 <section id="summary">
 
@@ -72,7 +72,8 @@
 <syntax>
     <value>поле</value> |
     <literal>X-Real-IP</literal> |
-    <literal>X-Forwarded-For</literal></syntax>
+    <literal>X-Forwarded-For</literal> |
+    <literal>proxy_protocol</literal></syntax>
 <default>X-Real-IP</default>
 <context>http</context>
 <context>server</context>
@@ -83,6 +84,14 @@
 в котором передаётся адрес для замены.
 </para>
 
+<para>
+Параметр <literal>proxy_protocol</literal> (1.5.12) меняет
+адрес клиента на указанный в заголовке PROXY-протокола.
+Протокол PROXY должен быть предварительно включён при помощи установки
+параметра <literal>proxy_protocol</literal> в директиве
+<link doc="ngx_http_core_module.xml" id="listen"/>.
+</para>
+
 </directive>