# HG changeset patch # User Ruslan Ermilov # Date 1326477901 0 # Node ID e00f8f8c0486a6cd1d031edfcaf49f84f73f329e # Parent 95d5dc7c988409fe78f8087e0d16be97d0197714 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. diff -r 95d5dc7c9884 -r e00f8f8c0486 xml/en/GNUmakefile --- a/xml/en/GNUmakefile Fri Jan 13 17:58:36 2012 +0000 +++ b/xml/en/GNUmakefile Fri Jan 13 18:05:01 2012 +0000 @@ -44,6 +44,11 @@ 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 \ diff -r 95d5dc7c9884 -r e00f8f8c0486 xml/en/docs/http/ngx_http_access_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_access_module.xml Fri Jan 13 18:05:01 2012 +0000 @@ -0,0 +1,84 @@ + + + + + + +
+ + +The ngx_http_access_module module allows +to limit access based on client IP addresses. + + +
+ + +
+ + + + location / { + deny 192.168.1.1; + allow 192.168.1.0/24; + allow 10.1.1.0/16; + deny all; + } + + + + +The rules are checked in sequence until the first match is found. +In this example, an access is allowed only for networks +10.1.1.0/16 and 192.168.1.0/24 +excluding the address 192.168.1.1. +In case of a lot of rules, the use of the +ngx_http_geo_module +module variables is preferable. + + +
+ + +
+ + + + address | + CIDR | + all + +http +server +location +limit_except + + +Allows access for the specified network or address. + + + + + + + + address | + CIDR | + all + +http +server +location +limit_except + + +Denies access for the specified network or address. + + + + +
+ +
diff -r 95d5dc7c9884 -r e00f8f8c0486 xml/en/docs/http/ngx_http_addition_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_addition_module.xml Fri Jan 13 18:05:01 2012 +0000 @@ -0,0 +1,81 @@ + + + + + + +
+ + +The ngx_http_addition_module 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 +--with-http_addition_module +configuration parameter. + + +
+ + +
+ + + + location / { + add_before_body /before_action; + add_after_body /after_action; + } + + + +
+ + +
+ + +uri + +location + + +Adds a text returned as a result of processing a given subrequest, +before the response body. + + + + + + +uri + +location + + +Adds a text returned as a result of processing a given subrequest, +after the response body. + + + + + + +mime-type ... +text/html +http +server +location +0.7.9 + + +Allows to add text in responses with the specified MIME types, +in addition to “text/html”. + + + + +
+ +
diff -r 95d5dc7c9884 -r e00f8f8c0486 xml/en/docs/http/ngx_http_auth_basic_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_auth_basic_module.xml Fri Jan 13 18:05:01 2012 +0000 @@ -0,0 +1,85 @@ + + + + + + +
+ + +The ngx_http_auth_basic_module module allows +to limit access to resources by validating the user name and password +using the “HTTP Basic Authentication” protocol. + + +
+ + +
+ + + + location / { + auth_basic "closed site"; + auth_basic_user_file conf/htpasswd; + } + + + +
+ + +
+ + +string | off +off +http +server +location +limit_except + + +Enables validation of user name and password using the +“HTTP Basic Authentication” protocol. +The specified parameter is used as a realm. +The parameter off allows to cancel the effect of the +auth_basic directive inherited from the previous +configuration level. + + + + + + +file + +http +server +location +limit_except + + +Specifies a file that keeps user names and passwords, +in the following format: + +# comment +name1:password1 +name2:password2:comment +name3:password3 + + + + +Passwords should be encrypted with the crypt function. +The htpasswd command from the Apache web server +distribution can be used to create such a file. + + + + +
+ +
diff -r 95d5dc7c9884 -r e00f8f8c0486 xml/en/docs/http/ngx_http_autoindex_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_autoindex_module.xml Fri Jan 13 18:05:01 2012 +0000 @@ -0,0 +1,83 @@ + + + + + + +
+ + +The ngx_http_autoindex_module module produces +a directory listing. +Usually a request is passed to the ngx_http_autoindex_module +module when the ngx_http_index_module +module could not find an index file. + + +
+ + +
+ + + + location / { + autoindex on; + } + + + +
+ + +
+ + +on | off +off +http +server +location + + +Enables or disables a directory listing output. + + + + + + +on | off +on +http +server +location + + +Specifies whether file sizes in the directory listing should be +output exactly, or rounded to kilobytes, megabytes, and gigabytes. + + + + + + + +on | off +off +http +server +location + + +Specifies whether times in the directory listing should be +output in a local time zone or UTC. + + + + +
+ +
diff -r 95d5dc7c9884 -r e00f8f8c0486 xml/en/docs/http/ngx_http_browser_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_browser_module.xml Fri Jan 13 18:05:01 2012 +0000 @@ -0,0 +1,162 @@ + + + + + + +
+ + +The ngx_http_browser_module module creates variables +whose values depend on the value of the
User-Agent
+request header field: + + +$modern_browser + +equals to the value set by the directive, +if a browser was identified as modern; + + +$ancient_browser + +equals to the value set by the directive, +if a browser was identified as ancient; + + +$msie + +equals “1” if a browser was identified as MSIE of any version. + + + +
+ +
+ + +
+ + +Choosing an index file: + + 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; + + + + +Redirection for old browsers: + + 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; + } + + + +
+ + +
+ + +string ... + +http +server +location + + +If any of the specified substrings is found in the
User-Agent
+request header field, a browser will be considered ancient. +The special string “netscape4” corresponds to the +regular expression “^Mozilla/[1-4]”. +
+ +
+ + + +string +1 +http +server +location + + +Sets a value for the $ancient_browser variables. + + + + + + +browser version +unlisted + +http +server +location + + +Specifies a version starting from which a browser is considered modern. +A browser can be any one of the following: msie, +gecko (browsers based on Mozilla), +opera, safari, +or konqueror. + + + +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. + + + +The special value unlisted specifies to consider +a browser as modern if it was not listed by the +modern_browser and +directives. +Otherwise such a browser is considered ancient. +If a request does not provide the
User-Agent
field +in the header, a browser is treated as not being listed. +
+ +
+ + + +string +1 +http +server +location + + +Sets a value for the $modern_browser variables. + + + + +
+ +
diff -r 95d5dc7c9884 -r e00f8f8c0486 xml/en/docs/index.xml --- a/xml/en/docs/index.xml Fri Jan 13 17:58:36 2012 +0000 +++ b/xml/en/docs/index.xml Fri Jan 13 18:05:01 2012 +0000 @@ -70,6 +70,31 @@ + +ngx_http_access_module + + + + +ngx_http_addition_module + + + + +ngx_http_auth_basic_module + + + + +ngx_http_autoindex_module + + + + +ngx_http_browser_module + + + ngx_http_empty_gif_module diff -r 95d5dc7c9884 -r e00f8f8c0486 xml/en/index.xml --- a/xml/en/index.xml Fri Jan 13 17:58:36 2012 +0000 +++ b/xml/en/index.xml Fri Jan 13 18:05:01 2012 +0000 @@ -40,7 +40,8 @@ -Serving static and index files, and autoindexing; +Serving static and index files, and +autoindexing; open file descriptor cache; @@ -128,7 +129,10 @@ -Access control based on client IP address and HTTP Basic authentication; +Access control based on +client IP address +and HTTP +Basic authentication;