Mercurial > hg > nginx-site
comparison xml/cn/docs/http/ngx_http_realip_module.xml @ 792:ceb8a4e374b7
Updated the Chinese documentation.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 25 Dec 2012 06:34:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
791:15f2bab0740d | 792:ceb8a4e374b7 |
---|---|
1 <?xml version="1.0"?> | |
2 | |
3 <!-- | |
4 Copyright (C) Igor Sysoev | |
5 Copyright (C) Nginx, Inc. | |
6 --> | |
7 | |
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
9 | |
10 <module name="Module ngx_http_realip_module" | |
11 link="/en/docs/http/ngx_http_realip_module.html" | |
12 lang="en" | |
13 rev="1"> | |
14 | |
15 <section id="summary"> | |
16 | |
17 <para> | |
18 The <literal>ngx_http_realip_module</literal> module allows | |
19 to change the client address to the one sent in the specified header field. | |
20 </para> | |
21 | |
22 <para> | |
23 This module is not built by default, it should be enabled with the | |
24 <literal>--with-http_realip_module</literal> | |
25 configuration parameter. | |
26 </para> | |
27 | |
28 </section> | |
29 | |
30 | |
31 <section id="example" name="Example Configuration"> | |
32 | |
33 <para> | |
34 <example> | |
35 set_real_ip_from 192.168.1.0/24; | |
36 set_real_ip_from 192.168.2.1; | |
37 set_real_ip_from 2001:0db8::/32; | |
38 real_ip_header X-Forwarded-For; | |
39 real_ip_recursive on; | |
40 </example> | |
41 </para> | |
42 | |
43 </section> | |
44 | |
45 | |
46 <section id="directives" name="Directives"> | |
47 | |
48 <directive name="set_real_ip_from"> | |
49 <syntax> | |
50 <value>address</value> | | |
51 <value>CIDR</value> | | |
52 <literal>unix:</literal></syntax> | |
53 <default/> | |
54 <context>http</context> | |
55 <context>server</context> | |
56 <context>location</context> | |
57 | |
58 <para> | |
59 Defines trusted addresses that are known to send correct | |
60 replacement addresses. | |
61 If the special value <literal>unix:</literal> is specified, | |
62 all UNIX-domain sockets will be trusted. | |
63 <note> | |
64 IPv6 addresses are supported starting from versions 1.3.0 and 1.2.1. | |
65 </note> | |
66 </para> | |
67 | |
68 </directive> | |
69 | |
70 | |
71 <directive name="real_ip_header"> | |
72 <syntax> | |
73 <value>field</value> | | |
74 <literal>X-Real-IP</literal> | | |
75 <literal>X-Forwarded-For</literal></syntax> | |
76 <default>X-Real-IP</default> | |
77 <context>http</context> | |
78 <context>server</context> | |
79 <context>location</context> | |
80 | |
81 <para> | |
82 Defines a request header field used to send | |
83 the address for a replacement. | |
84 </para> | |
85 | |
86 </directive> | |
87 | |
88 | |
89 <directive name="real_ip_recursive"> | |
90 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
91 <default>off</default> | |
92 <context>http</context> | |
93 <context>server</context> | |
94 <context>location</context> | |
95 <appeared-in>1.3.0</appeared-in> | |
96 <appeared-in>1.2.1</appeared-in> | |
97 | |
98 <para> | |
99 If recursive search is disabled, an original client address that | |
100 matches one of the trusted addresses is replaced by the last | |
101 address sent in the request header field defined by the | |
102 <link id="real_ip_header"/> directive. | |
103 If recursive search is enabled, an original client address that | |
104 matches one of the trusted addresses is replaced by the last | |
105 non-trusted address sent in the request header field. | |
106 </para> | |
107 | |
108 </directive> | |
109 | |
110 </section> | |
111 | |
112 </module> |