Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_realip_module.xml @ 2733:9cc5077645a0
Linux packages: removed Alpine 3.10 due to EOL.
author | Konstantin Pavlov <thresh@nginx.com> |
---|---|
date | Thu, 27 May 2021 12:48:06 +0300 |
parents | 48ca712794c6 |
children | 4add6ae1296f |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
7 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 |
342 | 10 <module name="Модуль ngx_http_realip_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_realip_module.html" |
589 | 12 lang="ru" |
1985
48ca712794c6
Documented the set_real_ip_from support of hostnames.
Ruslan Ermilov <ru@nginx.com>
parents:
1934
diff
changeset
|
13 rev="8"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
15 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 <para> |
1705
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
18 Модуль <literal>ngx_http_realip_module</literal> позволяет |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
19 менять адрес и необязательный порт клиента |
1933
866653a4f6a2
Verb agreement in the realip module intro.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1923
diff
changeset
|
20 на переданные в указанном поле заголовка. |
342 | 21 </para> |
22 | |
23 <para> | |
24 По умолчанию этот модуль не собирается, его сборку необходимо | |
25 разрешить с помощью конфигурационного параметра | |
26 <literal>--with-http_realip_module</literal>. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
30 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 |
342 | 32 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 <example> |
518 | 36 set_real_ip_from 192.168.1.0/24; |
37 set_real_ip_from 192.168.2.1; | |
38 set_real_ip_from 2001:0db8::/32; | |
39 real_ip_header X-Forwarded-For; | |
40 real_ip_recursive on; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
42 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
43 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 |
342 | 47 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 <directive name="set_real_ip_from"> |
468
31e81dcc4ffd
set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
50 <syntax> |
31e81dcc4ffd
set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
51 <value>адрес</value> | |
31e81dcc4ffd
set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
52 <value>CIDR</value> | |
31e81dcc4ffd
set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
53 <literal>unix:</literal></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
54 <default/> |
342 | 55 <context>http</context> |
56 <context>server</context> | |
57 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
59 <para> |
518 | 60 Задаёт доверенные адреса, которые передают верный адрес |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
61 для замены. |
468
31e81dcc4ffd
set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
62 Если указано специальное значение <literal>unix:</literal>, |
31e81dcc4ffd
set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
63 доверенными будут считаться все UNIX-сокеты. |
1985
48ca712794c6
Documented the set_real_ip_from support of hostnames.
Ruslan Ermilov <ru@nginx.com>
parents:
1934
diff
changeset
|
64 Доверенные адреса могут быть также заданы при помощи имени хоста (1.13.1). |
518 | 65 <note> |
523 | 66 IPv6-адреса поддерживаются начиная с версий 1.3.0 и 1.2.1. |
518 | 67 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
68 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
73 <directive name="real_ip_header"> |
271 | 74 <syntax> |
364 | 75 <value>поле</value> | |
76 <literal>X-Real-IP</literal> | | |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
77 <literal>X-Forwarded-For</literal> | |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
78 <literal>proxy_protocol</literal></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
79 <default>X-Real-IP</default> |
342 | 80 <context>http</context> |
81 <context>server</context> | |
82 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 <para> |
342 | 85 Задаёт поле заголовка запроса, |
1523
3b4a86b3515e
Rephrased the "real_ip_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1097
diff
changeset
|
86 значение которого будет использоваться для замены адреса клиента. |
518 | 87 </para> |
88 | |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
89 <para> |
1934
a0a64fee6b13
Fixed optional port description in the real_ip_header directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1933
diff
changeset
|
90 Значение поля заголовка запроса, содержащее необязательный порт, |
a0a64fee6b13
Fixed optional port description in the real_ip_header directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1933
diff
changeset
|
91 также используется для замены порта клиента (1.11.0). |
1705
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
92 Адрес и порт должны быть указаны согласно |
1923
66a30a380fba
Fixed links to tools.ietf.org.
Ruslan Ermilov <ru@nginx.com>
parents:
1705
diff
changeset
|
93 <link url="https://tools.ietf.org/html/rfc3986">RFC 3986</link>. |
1705
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
94 </para> |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
95 |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
96 <para> |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
97 Параметр <literal>proxy_protocol</literal> (1.5.12) меняет |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
98 адрес клиента на указанный в заголовке PROXY-протокола. |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
99 Протокол PROXY должен быть предварительно включён при помощи установки |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
100 параметра <literal>proxy_protocol</literal> в директиве |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
101 <link doc="ngx_http_core_module.xml" id="listen"/>. |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
102 </para> |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
589
diff
changeset
|
103 |
518 | 104 </directive> |
105 | |
106 | |
107 <directive name="real_ip_recursive"> | |
108 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
109 <default>off</default> | |
110 <context>http</context> | |
111 <context>server</context> | |
112 <context>location</context> | |
113 <appeared-in>1.3.0</appeared-in> | |
523 | 114 <appeared-in>1.2.1</appeared-in> |
518 | 115 |
116 <para> | |
117 При выключенном рекурсивном поиске исходный адрес клиента, | |
118 совпадающий с одним из доверенных адресов, заменяется на последний | |
119 адрес, переданный в поле заголовка запроса, заданного | |
120 директивой <link id="real_ip_header"/>. | |
121 При включённом рекурсивном поиске исходный адрес клиента, | |
122 совпадающий с одним из доверенных адресов, заменяется на последний | |
123 не доверенный адрес, переданный в заданном поле заголовка запроса. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
124 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
125 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
127 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
128 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
129 |
1601
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
130 |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
131 <section id="variables" name="Встроенные переменные"> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
132 |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
133 <para> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
134 <list type="tag"> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
135 |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
136 <tag-name id="var_realip_remote_addr"><var>$realip_remote_addr</var></tag-name> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
137 <tag-desc> |
1602
bc25f237a966
Removed obsolete dot in $realip_remote_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1601
diff
changeset
|
138 хранит исходный адрес клиента (1.9.7) |
1601
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
139 </tag-desc> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
140 |
1705
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
141 <tag-name id="var_realip_remote_port"><var>$realip_remote_port</var></tag-name> |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
142 <tag-desc> |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
143 хранит исходный порт клиента (1.11.0) |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
144 </tag-desc> |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
145 |
1601
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
146 </list> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
147 </para> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
148 |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
149 </section> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
150 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
151 </module> |