Mercurial > hg > nginx-site
changeset 1503:a9ffc9dd41e0
Added the "ngx_stream_access_module" module.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 10 Jun 2015 14:02:58 +0300 |
parents | b628e042a15e |
children | 0b89d1e54e8f |
files | xml/en/GNUmakefile xml/en/docs/index.xml xml/en/docs/stream/ngx_stream_access_module.xml xml/ru/GNUmakefile xml/ru/docs/index.xml xml/ru/docs/stream/ngx_stream_access_module.xml |
diffstat | 6 files changed, 198 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/GNUmakefile Tue Jun 09 14:40:14 2015 +0300 +++ b/xml/en/GNUmakefile Wed Jun 10 14:02:58 2015 +0300 @@ -91,6 +91,7 @@ mail/ngx_mail_proxy_module \ mail/ngx_mail_smtp_module \ mail/ngx_mail_ssl_module \ + stream/ngx_stream_access_module \ stream/ngx_stream_core_module \ stream/ngx_stream_proxy_module \ stream/ngx_stream_ssl_module \
--- a/xml/en/docs/index.xml Tue Jun 09 14:40:14 2015 +0300 +++ b/xml/en/docs/index.xml Wed Jun 10 14:02:58 2015 +0300 @@ -8,7 +8,7 @@ <article name="nginx documentation" link="/en/docs/" lang="en" - rev="19" + rev="20" toc="no"> @@ -477,6 +477,11 @@ </listitem> <listitem> +<link doc="stream/ngx_stream_access_module.xml"> +ngx_stream_access_module</link> +</listitem> + +<listitem> <link doc="stream/ngx_stream_proxy_module.xml"> ngx_stream_proxy_module</link> </listitem>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/stream/ngx_stream_access_module.xml Wed Jun 10 14:02:58 2015 +0300 @@ -0,0 +1,92 @@ +<?xml version="1.0"?> + +<!-- + Copyright (C) Igor Sysoev + Copyright (C) Nginx, Inc. + --> + +<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> + +<module name="Module ngx_stream_access_module" + link="/en/docs/stream/ngx_stream_access_module.html" + lang="en" + rev="1"> + +<section id="summary"> + +<para> +The <literal>ngx_stream_access_module</literal> module (1.9.2) allows +limiting access to certain client addresses. +</para> + +</section> + + +<section id="example" name="Example Configuration"> + +<para> +<example> +server { + ... + deny 192.168.1.1; + allow 192.168.1.0/24; + allow 10.1.1.0/16; + allow 2001:0db8::/32; + deny all; +} +</example> +</para> + +<para> +The rules are checked in sequence until the first match is found. +In this example, 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>, +and for IPv6 network <literal>2001:0db8::/32</literal>. +</para> + +</section> + + +<section id="directives" name="Directives"> + +<directive name="allow"> +<syntax> + <value>address</value> | + <value>CIDR</value> | + <literal>unix:</literal> | + <literal>all</literal></syntax> +<default/> +<context>stream</context> +<context>server</context> + +<para> +Allows access for the specified network or address. +If the special value <literal>unix:</literal> is specified, +allows access for all UNIX-domain sockets. +</para> + +</directive> + + +<directive name="deny"> +<syntax> + <value>address</value> | + <value>CIDR</value> | + <literal>unix:</literal> | + <literal>all</literal></syntax> +<default/> +<context>stream</context> +<context>server</context> + +<para> +Denies access for the specified network or address. +If the special value <literal>unix:</literal> is specified, +denies access for all UNIX-domain sockets. +</para> + +</directive> + +</section> + +</module>
--- a/xml/ru/GNUmakefile Tue Jun 09 14:40:14 2015 +0300 +++ b/xml/ru/GNUmakefile Wed Jun 10 14:02:58 2015 +0300 @@ -81,6 +81,7 @@ mail/ngx_mail_proxy_module \ mail/ngx_mail_smtp_module \ mail/ngx_mail_ssl_module \ + stream/ngx_stream_access_module \ TOP = \ download \
--- a/xml/ru/docs/index.xml Tue Jun 09 14:40:14 2015 +0300 +++ b/xml/ru/docs/index.xml Wed Jun 10 14:02:58 2015 +0300 @@ -8,7 +8,7 @@ <article name="nginx: документация" link="/ru/docs/" lang="ru" - rev="19" + rev="20" toc="no"> @@ -481,6 +481,11 @@ </listitem> <listitem> +<link doc="stream/ngx_stream_access_module.xml"> +ngx_stream_access_module</link> +</listitem> + +<listitem> <link doc="../../en/docs/stream/ngx_stream_proxy_module.xml"> ngx_stream_proxy_module</link> [en] </listitem>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/ru/docs/stream/ngx_stream_access_module.xml Wed Jun 10 14:02:58 2015 +0300 @@ -0,0 +1,92 @@ +<?xml version="1.0"?> + +<!-- + Copyright (C) Igor Sysoev + Copyright (C) Nginx, Inc. + --> + +<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> + +<module name="Модуль ngx_stream_access_module" + link="/ru/docs/stream/ngx_stream_access_module.html" + lang="ru" + rev="1"> + +<section id="summary"> + +<para> +Модуль <literal>ngx_stream_access_module</literal> (1.9.2) позволяет +ограничить доступ для определённых адресов клиентов. +</para> + +</section> + + +<section id="example" name="Пример конфигурации"> + +<para> +<example> +server { + ... + deny 192.168.1.1; + allow 192.168.1.0/24; + allow 10.1.1.0/16; + allow 2001:0db8::/32; + deny all; +} +</example> +</para> + +<para> +Правила проверяются в порядке их записи до первого соответствия. +В данном примере доступ разрешён только для IPv4-сетей +<literal>10.1.1.0/16</literal> и <literal>192.168.1.0/24</literal>, +кроме адреса <literal>192.168.1.1</literal>, +и для IPv6-сети <literal>2001:0db8::/32</literal>. +</para> + +</section> + + +<section id="directives" name="Директивы"> + +<directive name="allow"> +<syntax> + <value>адрес</value> | + <value>CIDR</value> | + <literal>unix:</literal> | + <literal>all</literal></syntax> +<default/> +<context>stream</context> +<context>server</context> + +<para> +Разрешает доступ для указанной сети или адреса. +Если указано специальное значение <literal>unix:</literal>, +разрешает доступ для всех UNIX-сокетов. +</para> + +</directive> + + +<directive name="deny"> +<syntax> + <value>адрес</value> | + <value>CIDR</value> | + <literal>unix:</literal> | + <literal>all</literal></syntax> +<default/> +<context>stream</context> +<context>server</context> + +<para> +Запрещает доступ для указанной сети или адреса. +Если указано специальное значение <literal>unix:</literal>, +запрещает доступ для всех UNIX-сокетов. +</para> + +</directive> + +</section> + +</module>