Mercurial > hg > nginx-site
changeset 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 | 5bb373c6e502 |
children | 23c193ca8ebd |
files | xml/en/docs/http/ngx_http_access_module.xml xml/en/docs/http/ngx_http_auth_basic_module.xml xml/ru/docs/http/ngx_http_access_module.xml xml/ru/docs/http/ngx_http_auth_basic_module.xml |
diffstat | 4 files changed, 38 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_access_module.xml Thu Apr 19 12:45:41 2012 +0000 +++ b/xml/en/docs/http/ngx_http_access_module.xml Fri Apr 20 06:22:09 2012 +0000 @@ -10,7 +10,14 @@ <para> The <literal>ngx_http_access_module</literal> module allows -to limit access based on client IP addresses. +to limit access to certain client IP addresses. +</para> + +<para> +Access can also be limited by +<link doc="ngx_http_auth_basic_module.xml">password</link>. +Simultaneous limitation of access by address and by password is controlled +by the <link doc="ngx_http_core_module.xml" id="satisfy"/> directive. </para> </section> @@ -24,6 +31,7 @@ deny 192.168.1.1; allow 192.168.1.0/24; allow 10.1.1.0/16; + allow 2001:0db8::/32; deny all; } </example> @@ -31,9 +39,10 @@ <para> The rules are checked in sequence until the first match is found. -In this example, an access is allowed only for networks +In this example, an access is allowed only for IPv4 networks <literal>10.1.1.0/16</literal> and <literal>192.168.1.0/24</literal> -excluding the address <literal>192.168.1.1</literal>. +excluding the address <literal>192.168.1.1</literal>, +and for IPv6 network <literal>2001:0db8::/32</literal>. In case of a lot of rules, the use of the <link doc="ngx_http_geo_module.xml">ngx_http_geo_module</link> module variables is preferable.
--- a/xml/en/docs/http/ngx_http_auth_basic_module.xml Thu Apr 19 12:45:41 2012 +0000 +++ b/xml/en/docs/http/ngx_http_auth_basic_module.xml Fri Apr 20 06:22:09 2012 +0000 @@ -14,6 +14,13 @@ using the “HTTP Basic Authentication” protocol. </para> +<para> +Access can also be limited by +<link doc="ngx_http_auth_basic_module.xml">address</link>. +Simultaneous limitation of access by address and by password is controlled +by the <link doc="ngx_http_core_module.xml" id="satisfy"/> directive. +</para> + </section>
--- a/xml/ru/docs/http/ngx_http_access_module.xml Thu Apr 19 12:45:41 2012 +0000 +++ b/xml/ru/docs/http/ngx_http_access_module.xml Fri Apr 20 06:22:09 2012 +0000 @@ -10,7 +10,14 @@ <para> Модуль <literal>ngx_http_access_module</literal> позволяет -закрыть доступ для определённых IP-адресов клиентов. +ограничить доступ для определённых IP-адресов клиентов. +</para> + +<para> +Ограничить доступ можно также по +<link doc="ngx_http_auth_basic_module.xml">паролю</link>. +Одновременное ограничение доступа по адресу и паролю управляется +директивой <link doc="ngx_http_core_module.xml" id="satisfy"/>. </para> </section> @@ -24,6 +31,7 @@ deny 192.168.1.1; allow 192.168.1.0/24; allow 10.1.1.0/16; + allow 2001:0db8::/32; deny all; } </example> @@ -31,9 +39,10 @@ <para> Правила проверяются в порядке их записи до первого соответствия. -В данном примере доступ разрешён только для сетей +В данном примере доступ разрешён только для IPv4-сетей <literal>10.1.1.0/16</literal> и <literal>192.168.1.0/24</literal>, -кроме адреса <literal>192.168.1.1</literal>. +кроме адреса <literal>192.168.1.1</literal>, +и для IPv6-сети <literal>2001:0db8::/32</literal>. Если правил много, то лучше воспользоваться переменными модуля <link doc="ngx_http_geo_module.xml">ngx_http_geo_module</link>. </para>
--- a/xml/ru/docs/http/ngx_http_auth_basic_module.xml Thu Apr 19 12:45:41 2012 +0000 +++ b/xml/ru/docs/http/ngx_http_auth_basic_module.xml Fri Apr 20 06:22:09 2012 +0000 @@ -14,6 +14,13 @@ по протоколу “HTTP Basic Authentication”. </para> +<para> +Ограничить доступ можно также по +<link doc="ngx_http_access_module.xml">адресу</link>. +Одновременное ограничение доступа по адресу и паролю управляется +директивой <link doc="ngx_http_core_module.xml" id="satisfy"/>. +</para> + </section>