Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_realip_module.xml @ 1942:0227aa9b87de
Removed "experimental" info from js modules.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 22 Mar 2017 15:36:18 +0300 |
parents | a0a64fee6b13 |
children | 48ca712794c6 |
rev | line source |
---|---|
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
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 |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <module name="Module ngx_http_realip_module" |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 link="/en/docs/http/ngx_http_realip_module.html" |
589 | 12 lang="en" |
1934
a0a64fee6b13
Fixed optional port description in the real_ip_header directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1933
diff
changeset
|
13 rev="7"> |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 <section id="summary"> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <para> |
966 | 18 The <literal>ngx_http_realip_module</literal> module is used |
1705
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
19 to change the client address and optional port |
1933
866653a4f6a2
Verb agreement in the realip module intro.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1923
diff
changeset
|
20 to those sent in the specified header field. |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 </para> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 <para> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 This module is not built by default, it should be enabled with the |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <literal>--with-http_realip_module</literal> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 configuration parameter. |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 </para> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 </section> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 <section id="example" name="Example Configuration"> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 <para> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
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; | |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 </example> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 </para> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 </section> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 <section id="directives" name="Directives"> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
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>address</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> |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 <default/> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 <context>http</context> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <context>server</context> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 <context>location</context> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 <para> |
518 | 60 Defines trusted addresses that are known to send correct |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 replacement addresses. |
468
31e81dcc4ffd
set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
62 If the special value <literal>unix:</literal> is specified, |
31e81dcc4ffd
set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
63 all UNIX-domain sockets will be trusted. |
518 | 64 <note> |
523 | 65 IPv6 addresses are supported starting from versions 1.3.0 and 1.2.1. |
518 | 66 </note> |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 </para> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 </directive> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 <directive name="real_ip_header"> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 <syntax> |
364 | 74 <value>field</value> | |
75 <literal>X-Real-IP</literal> | | |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
76 <literal>X-Forwarded-For</literal> | |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
77 <literal>proxy_protocol</literal></syntax> |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 <default>X-Real-IP</default> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <context>http</context> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 <context>server</context> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 <context>location</context> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 <para> |
1523
3b4a86b3515e
Rephrased the "real_ip_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1097
diff
changeset
|
84 Defines the request header field |
3b4a86b3515e
Rephrased the "real_ip_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1097
diff
changeset
|
85 whose value will be used to replace the client address. |
518 | 86 </para> |
87 | |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
88 <para> |
1934
a0a64fee6b13
Fixed optional port description in the real_ip_header directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1933
diff
changeset
|
89 The request header field value that contains an optional port |
a0a64fee6b13
Fixed optional port description in the real_ip_header directive.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1933
diff
changeset
|
90 is also used to replace the client port (1.11.0). |
1705
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
91 The address and port should be specified according to |
1923
66a30a380fba
Fixed links to tools.ietf.org.
Ruslan Ermilov <ru@nginx.com>
parents:
1705
diff
changeset
|
92 <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
|
93 </para> |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
94 |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
95 <para> |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
96 The <literal>proxy_protocol</literal> parameter (1.5.12) changes |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
97 the client address to the one from the PROXY protocol header. |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
98 The PROXY protocol must be previously enabled by setting the |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
99 <literal>proxy_protocol</literal> parameter |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
100 in the <link doc="ngx_http_core_module.xml" id="listen"/> directive. |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
101 </para> |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
966
diff
changeset
|
102 |
518 | 103 </directive> |
104 | |
105 | |
106 <directive name="real_ip_recursive"> | |
107 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
108 <default>off</default> | |
109 <context>http</context> | |
110 <context>server</context> | |
111 <context>location</context> | |
112 <appeared-in>1.3.0</appeared-in> | |
523 | 113 <appeared-in>1.2.1</appeared-in> |
518 | 114 |
115 <para> | |
701
bff4179d3599
Fixed article upon Andrew Alexeev's suggestion.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
116 If recursive search is disabled, the original client address that |
518 | 117 matches one of the trusted addresses is replaced by the last |
118 address sent in the request header field defined by the | |
119 <link id="real_ip_header"/> directive. | |
701
bff4179d3599
Fixed article upon Andrew Alexeev's suggestion.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
120 If recursive search is enabled, the original client address that |
518 | 121 matches one of the trusted addresses is replaced by the last |
122 non-trusted address sent in the request header field. | |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 </para> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 </directive> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 </section> |
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 |
1601
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
129 |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
130 <section id="variables" name="Embedded Variables"> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
131 |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
132 <para> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
133 <list type="tag"> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
134 |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
135 <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
|
136 <tag-desc> |
1602
bc25f237a966
Removed obsolete dot in $realip_remote_addr.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1601
diff
changeset
|
137 keeps the original client address (1.9.7) |
1601
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
138 </tag-desc> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
139 |
1705
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
140 <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
|
141 <tag-desc> |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
142 keeps the original client port (1.11.0) |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
143 </tag-desc> |
f855acbd0a94
Documented the $realip_remote_port variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1602
diff
changeset
|
144 |
1601
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
145 </list> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
146 </para> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
147 |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
148 </section> |
8854618e1ca5
Documented the "$realip_remote_addr" variable.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1523
diff
changeset
|
149 |
348
5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 </module> |