changeset 315:e00f8f8c0486

Translated ngx_http_access_module, ngx_http_addition_module, ngx_http_auth_basic_module, ngx_http_autoindex_module, and ngx_http_browser_module into English.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 13 Jan 2012 18:05:01 +0000
parents 95d5dc7c9884
children 1fb1c077658b
files xml/en/GNUmakefile xml/en/docs/http/ngx_http_access_module.xml xml/en/docs/http/ngx_http_addition_module.xml xml/en/docs/http/ngx_http_auth_basic_module.xml xml/en/docs/http/ngx_http_autoindex_module.xml xml/en/docs/http/ngx_http_browser_module.xml xml/en/docs/index.xml xml/en/index.xml
diffstat 8 files changed, 531 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/GNUmakefile
+++ b/xml/en/GNUmakefile
@@ -44,6 +44,11 @@ FAQ_HTML =	$(foreach name, $(FAQ), $(OUT
 REFS =									\
 		ngx_core_module						\
 		http/ngx_http_core_module				\
+		http/ngx_http_access_module				\
+		http/ngx_http_addition_module				\
+		http/ngx_http_auth_basic_module				\
+		http/ngx_http_autoindex_module				\
+		http/ngx_http_browser_module				\
 		http/ngx_http_empty_gif_module				\
 		http/ngx_http_fastcgi_module				\
 		http/ngx_http_flv_module				\
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/http/ngx_http_access_module.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_access_module"
+        link="/en/docs/http/ngx_http_access_module.html"
+        lang="en">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_access_module</literal> module allows
+to limit access based on client IP addresses.
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+    location / {
+        deny  192.168.1.1;
+        allow 192.168.1.0/24;
+        allow 10.1.1.0/16;
+        deny  all;
+    }
+</example>
+</para>
+
+<para>
+The rules are checked in sequence until the first match is found.
+In this example, an access is allowed only for 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>.
+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.
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="allow">
+<syntax>
+    <value>address</value> |
+    <value>CIDR</value> |
+    <literal>all</literal></syntax>
+<default/>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<context>limit_except</context>
+
+<para>
+Allows access for the specified network or address.
+</para>
+
+</directive>
+
+
+<directive name="deny">
+<syntax>
+    <value>address</value> |
+    <value>CIDR</value> |
+    <literal>all</literal></syntax>
+<default/>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<context>limit_except</context>
+
+<para>
+Denies access for the specified network or address.
+</para>
+
+</directive>
+
+</section>
+
+</module>
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/http/ngx_http_addition_module.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_addition_module"
+        link="/en/docs/http/ngx_http_addition_module.html"
+        lang="en">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_addition_module</literal> module is a filter
+that adds a text before and after a response.
+This module is not built by default, it should be enabled with the
+<literal>--with-http_addition_module</literal>
+configuration parameter.
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+    location / {
+        add_before_body /before_action;
+        add_after_body  /after_action;
+    }
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="add_before_body">
+<syntax><value>uri</value></syntax>
+<default/>
+<context>location</context>
+
+<para>
+Adds a text returned as a result of processing a given subrequest,
+before the response body.
+</para>
+
+</directive>
+
+
+<directive name="add_after_body">
+<syntax><value>uri</value></syntax>
+<default/>
+<context>location</context>
+
+<para>
+Adds a text returned as a result of processing a given subrequest,
+after the response body.
+</para>
+
+</directive>
+
+
+<directive name="addition_types">
+<syntax><value>mime-type</value> ...</syntax>
+<default>text/html</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>0.7.9</appeared-in>
+
+<para>
+Allows to add text in responses with the specified MIME types,
+in addition to “<literal>text/html</literal>”.
+</para>
+
+</directive>
+
+</section>
+
+</module>
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/http/ngx_http_auth_basic_module.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_auth_basic_module"
+        link="/en/docs/http/ngx_http_auth_basic_module.html"
+        lang="en">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_auth_basic_module</literal> module allows
+to limit access to resources by validating the user name and password
+using the “HTTP Basic Authentication” protocol.
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+    location / {
+        auth_basic           "closed site";
+        auth_basic_user_file conf/htpasswd;
+    }
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="auth_basic">
+<syntax><value>string</value> | <literal>off</literal></syntax>
+<default>off</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<context>limit_except</context>
+
+<para>
+Enables validation of user name and password using the
+“HTTP Basic Authentication” protocol.
+The specified parameter is used as a <value>realm</value>.
+The parameter <literal>off</literal> allows to cancel the effect of the
+<literal>auth_basic</literal> directive inherited from the previous
+configuration level.
+</para>
+
+</directive>
+
+
+<directive name="auth_basic_user_file">
+<syntax><value>file</value></syntax>
+<default/>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<context>limit_except</context>
+
+<para>
+Specifies a file that keeps user names and passwords,
+in the following format:
+<example>
+# comment
+name1:password1
+name2:password2:comment
+name3:password3
+</example>
+</para>
+
+<para>
+Passwords should be encrypted with the <c-func>crypt</c-func> function.
+The <command>htpasswd</command> command from the Apache web server
+distribution can be used to create such a file.
+</para>
+
+</directive>
+
+</section>
+
+</module>
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/http/ngx_http_autoindex_module.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_autoindex_module"
+        link="/en/docs/http/ngx_http_autoindex_module.html"
+        lang="en">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_autoindex_module</literal> module produces
+a directory listing.
+Usually a request is passed to the <literal>ngx_http_autoindex_module</literal>
+module when the <link doc="ngx_http_index_module.xml">ngx_http_index_module</link>
+module could not find an index file.
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+    location / {
+        autoindex on;
+    }
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="autoindex">
+<syntax><literal>on</literal> | <literal>off</literal></syntax>
+<default>off</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Enables or disables a directory listing output.
+</para>
+
+</directive>
+
+
+<directive name="autoindex_exact_size">
+<syntax><literal>on</literal> | <literal>off</literal></syntax>
+<default>on</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Specifies whether file sizes in the directory listing should be
+output exactly, or rounded to kilobytes, megabytes, and gigabytes.
+</para>
+
+
+</directive>
+
+
+<directive name="autoindex_localtime">
+<syntax><literal>on</literal> | <literal>off</literal></syntax>
+<default>off</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Specifies whether times in the directory listing should be
+output in a local time zone or UTC.
+</para>
+
+</directive>
+
+</section>
+
+</module>
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/http/ngx_http_browser_module.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_browser_module"
+        link="/en/docs/http/ngx_http_browser_module.html"
+        lang="en">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_browser_module</literal> module creates variables
+whose values depend on the value of the <header>User-Agent</header>
+request header field:
+<list type="tag">
+
+<tag-name><var>$modern_browser</var></tag-name>
+<tag-desc>
+equals to the value set by the <link id="modern_browser_value"/> directive,
+if a browser was identified as modern;
+</tag-desc>
+
+<tag-name><var>$ancient_browser</var></tag-name>
+<tag-desc>
+equals to the value set by the <link id="ancient_browser_value"/> directive,
+if a browser was identified as ancient;
+</tag-desc>
+
+<tag-name><var>$msie</var></tag-name>
+<tag-desc>
+equals “1” if a browser was identified as MSIE of any version.
+</tag-desc>
+
+</list>
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+Choosing an index file:
+<example>
+    modern_browser_value "modern.";
+
+    modern_browser msie      5.5;
+    modern_browser gecko     1.0.0;
+    modern_browser opera     9.0;
+    modern_browser safari    413;
+    modern_browser konqueror 3.0;
+
+    index index.${modern_browser}html index.html;
+</example>
+</para>
+
+<para>
+Redirection for old browsers:
+<example>
+    modern_browser msie      5.0;
+    modern_browser gecko     0.9.1;
+    modern_browser opera     8.0;
+    modern_browser safari    413;
+    modern_browser konqueror 3.0;
+
+    modern_browser unlisted;
+
+    ancient_browser Links Lynx netscape4;
+
+    if ($ancient_browser) {
+        rewrite ^ /ancient.html;
+    }
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="ancient_browser">
+<syntax><value>string</value> ...</syntax>
+<default/>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+If any of the specified substrings is found in the <header>User-Agent</header>
+request header field, a browser will be considered ancient.
+The special string “<literal>netscape4</literal>” corresponds to the
+regular expression “<literal>^Mozilla/[1-4]</literal>”.
+</para>
+
+</directive>
+
+
+<directive name="ancient_browser_value">
+<syntax><value>string</value></syntax>
+<default>1</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Sets a value for the <var>$ancient_browser</var> variables.
+</para>
+
+</directive>
+
+
+<directive name="modern_browser">
+<syntax><value>browser</value> <value>version</value></syntax>
+<syntax><literal>unlisted</literal></syntax>
+<default/>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Specifies a version starting from which a browser is considered modern.
+A browser can be any one of the following: <literal>msie</literal>,
+<literal>gecko</literal> (browsers based on Mozilla),
+<literal>opera</literal>, <literal>safari</literal>,
+or <literal>konqueror</literal>.
+</para>
+
+<para>
+Versions can be specified in the following formats: X, X.X, X.X.X, or X.X.X.X.
+The maximum values for each of the format are
+4000, 4000.99, 4000.99.99, and 4000.99.99.99, respectively.
+</para>
+
+<para>
+The special value <literal>unlisted</literal> specifies to consider
+a browser as modern if it was not listed by the
+<literal>modern_browser</literal> and <link id="ancient_browser"/>
+directives.
+Otherwise such a browser is considered ancient.
+If a request does not provide the <header>User-Agent</header> field
+in the header, a browser is treated as not being listed.
+</para>
+
+</directive>
+
+
+<directive name="modern_browser_value">
+<syntax><value>string</value></syntax>
+<default>1</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Sets a value for the <var>$modern_browser</var> variables.
+</para>
+
+</directive>
+
+</section>
+
+</module>
--- a/xml/en/docs/index.xml
+++ b/xml/en/docs/index.xml
@@ -70,6 +70,31 @@ ngx_http_core_module</a>
 </item>
 
 <item>
+<a href="/en/docs/http/ngx_http_access_module.xml">
+ngx_http_access_module</a>
+</item>
+
+<item>
+<a href="/en/docs/http/ngx_http_addition_module.xml">
+ngx_http_addition_module</a>
+</item>
+
+<item>
+<a href="/en/docs/http/ngx_http_auth_basic_module.xml">
+ngx_http_auth_basic_module</a>
+</item>
+
+<item>
+<a href="/en/docs/http/ngx_http_autoindex_module.xml">
+ngx_http_autoindex_module</a>
+</item>
+
+<item>
+<a href="/en/docs/http/ngx_http_browser_module.xml">
+ngx_http_browser_module</a>
+</item>
+
+<item>
 <a href="/en/docs/http/ngx_http_empty_gif_module.xml">
 ngx_http_empty_gif_module</a>
 </item>
--- a/xml/en/index.xml
+++ b/xml/en/index.xml
@@ -40,7 +40,8 @@ The sources are distributed under the
 <list>
 
 <item>
-Serving static and index files, and autoindexing;
+Serving static and index files, and
+<link doc="docs/http/ngx_http_autoindex_module.xml">autoindexing</link>;
 <link doc="docs/http/ngx_http_core_module.xml"
        id="open_file_cache">open file descriptor cache</link>;
 </item>
@@ -128,7 +129,10 @@ Executing different functions depending 
 </item>
 
 <item>
-Access control based on client IP address and HTTP Basic authentication;
+Access control based on
+<link doc="docs/http/ngx_http_access_module.xml">client IP address</link>
+and <link doc="docs/http/ngx_http_auth_basic_module.xml">HTTP
+Basic authentication</link>;
 </item>
 
 <item>