annotate xml/en/docs/http/ngx_http_realip_module.xml @ 1523:3b4a86b3515e

Rephrased the "real_ip_header" directive.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 30 Jun 2015 19:20:27 +0300
parents eeb690d4212b
children 8854618e1ca5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
764fbac1b8b4 Added document revision.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
12 lang="en"
1523
3b4a86b3515e Rephrased the "real_ip_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1097
diff changeset
13 rev="3">
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
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 701
diff changeset
18 The <literal>ngx_http_realip_module</literal> module is used
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 to change the client address to the one sent in the specified header field.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23 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
24 <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
25 configuration parameter.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29
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 <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
32
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 <example>
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
35 set_real_ip_from 192.168.1.0/24;
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
36 set_real_ip_from 192.168.2.1;
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
37 set_real_ip_from 2001:0db8::/32;
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
38 real_ip_header X-Forwarded-For;
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
39 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
40 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44
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 <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
47
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 <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
49 <syntax>
31e81dcc4ffd set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
50 <value>address</value> |
31e81dcc4ffd set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
51 <value>CIDR</value> |
31e81dcc4ffd set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
52 <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
53 <default/>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
54 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 <context>server</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
56 <context>location</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 <para>
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
59 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
60 replacement addresses.
468
31e81dcc4ffd set_real_ip_from: documented the special parameter "unix:".
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
61 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
62 all UNIX-domain sockets will be trusted.
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
63 <note>
523
a8daad8e83bb Documented 1.2.1 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 518
diff changeset
64 IPv6 addresses are supported starting from versions 1.3.0 and 1.2.1.
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
65 </note>
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69
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 <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
72 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
73 <value>field</value> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
74 <literal>X-Real-IP</literal> |
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
75 <literal>X-Forwarded-For</literal> |
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
76 <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
77 <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
78 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 <context>server</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80 <context>location</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 <para>
1523
3b4a86b3515e Rephrased the "real_ip_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1097
diff changeset
83 Defines the request header field
3b4a86b3515e Rephrased the "real_ip_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1097
diff changeset
84 whose value will be used to replace the client address.
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
85 </para>
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
86
1097
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
87 <para>
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
88 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
89 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
90 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
91 <literal>proxy_protocol</literal> parameter
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
92 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
93 </para>
eeb690d4212b Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
94
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
95 </directive>
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
96
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
97
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
98 <directive name="real_ip_recursive">
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
99 <syntax><literal>on</literal> | <literal>off</literal></syntax>
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
100 <default>off</default>
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
101 <context>http</context>
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
102 <context>server</context>
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
103 <context>location</context>
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
104 <appeared-in>1.3.0</appeared-in>
523
a8daad8e83bb Documented 1.2.1 changes.
Ruslan Ermilov <ru@nginx.com>
parents: 518
diff changeset
105 <appeared-in>1.2.1</appeared-in>
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
106
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
107 <para>
701
bff4179d3599 Fixed article upon Andrew Alexeev's suggestion.
Ruslan Ermilov <ru@nginx.com>
parents: 589
diff changeset
108 If recursive search is disabled, the original client address that
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
109 matches one of the trusted addresses is replaced by the last
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
110 address sent in the request header field defined by the
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
111 <link id="real_ip_header"/> directive.
701
bff4179d3599 Fixed article upon Andrew Alexeev's suggestion.
Ruslan Ermilov <ru@nginx.com>
parents: 589
diff changeset
112 If recursive search is enabled, the original client address that
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
113 matches one of the trusted addresses is replaced by the last
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 468
diff changeset
114 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
115 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121 </module>