Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_access_module.xml @ 494:244500f24783
- Cross linked ngx_http_access_module and ngx_http_auth_basic_module,
mentioned the "satisfy" directive that controls their simultaneous
operation.
- Made it clear that ngx_http_access_module supports IPv6.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 20 Apr 2012 06:22:09 +0000 |
parents | a4fa80755eab |
children | be54c443235a |
comparison
equal
deleted
inserted
replaced
493:5bb373c6e502 | 494:244500f24783 |
---|---|
8 | 8 |
9 <section id="summary"> | 9 <section id="summary"> |
10 | 10 |
11 <para> | 11 <para> |
12 The <literal>ngx_http_access_module</literal> module allows | 12 The <literal>ngx_http_access_module</literal> module allows |
13 to limit access based on client IP addresses. | 13 to limit access to certain client IP addresses. |
14 </para> | |
15 | |
16 <para> | |
17 Access can also be limited by | |
18 <link doc="ngx_http_auth_basic_module.xml">password</link>. | |
19 Simultaneous limitation of access by address and by password is controlled | |
20 by the <link doc="ngx_http_core_module.xml" id="satisfy"/> directive. | |
14 </para> | 21 </para> |
15 | 22 |
16 </section> | 23 </section> |
17 | 24 |
18 | 25 |
22 <example> | 29 <example> |
23 location / { | 30 location / { |
24 deny 192.168.1.1; | 31 deny 192.168.1.1; |
25 allow 192.168.1.0/24; | 32 allow 192.168.1.0/24; |
26 allow 10.1.1.0/16; | 33 allow 10.1.1.0/16; |
34 allow 2001:0db8::/32; | |
27 deny all; | 35 deny all; |
28 } | 36 } |
29 </example> | 37 </example> |
30 </para> | 38 </para> |
31 | 39 |
32 <para> | 40 <para> |
33 The rules are checked in sequence until the first match is found. | 41 The rules are checked in sequence until the first match is found. |
34 In this example, an access is allowed only for networks | 42 In this example, an access is allowed only for IPv4 networks |
35 <literal>10.1.1.0/16</literal> and <literal>192.168.1.0/24</literal> | 43 <literal>10.1.1.0/16</literal> and <literal>192.168.1.0/24</literal> |
36 excluding the address <literal>192.168.1.1</literal>. | 44 excluding the address <literal>192.168.1.1</literal>, |
45 and for IPv6 network <literal>2001:0db8::/32</literal>. | |
37 In case of a lot of rules, the use of the | 46 In case of a lot of rules, the use of the |
38 <link doc="ngx_http_geo_module.xml">ngx_http_geo_module</link> | 47 <link doc="ngx_http_geo_module.xml">ngx_http_geo_module</link> |
39 module variables is preferable. | 48 module variables is preferable. |
40 </para> | 49 </para> |
41 | 50 |