Mercurial > hg > nginx-site
changeset 153:317ac898ba50
Initial translation of the "ngx_http_index_module" and
"ngx_http_random_index_module".
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 26 Oct 2011 08:37:48 +0000 |
parents | 5a35535f7cdf |
children | dfc9d4338fef |
files | xml/en/GNUmakefile xml/en/docs/http/ngx_http_index_module.xml xml/en/docs/http/ngx_http_random_index_module.xml xml/en/docs/index.xml |
diffstat | 4 files changed, 141 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/GNUmakefile Wed Oct 26 07:55:57 2011 +0000 +++ b/xml/en/GNUmakefile Wed Oct 26 08:37:48 2011 +0000 @@ -26,7 +26,9 @@ en/docs/http/ngx_http_core_module \ en/docs/http/ngx_http_empty_gif_module \ en/docs/http/ngx_http_flv_module \ + en/docs/http/ngx_http_index_module \ en/docs/http/ngx_http_mp4_module \ + en/docs/http/ngx_http_random_index_module \ HOWTO_EN_XML = $(foreach name, $(HOWTO_EN), xml/$(name).xml) HOWTO_EN_HTML = $(foreach name, $(HOWTO_EN), $(OUT)/$(name).html)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_index_module.xml Wed Oct 26 08:37:48 2011 +0000 @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> + +<module name="Module ngx_http_index_module" + link="/en/docs/http/ngx_http_index_module.html" + lang="en"> + +<section id="summary"> + +<para> +The module <code>ngx_http_index_module</code> processes requests +ending with the slash character (‘<code>/</code>’). +</para> + +</section> + + +<section name="Example Configuration" id="example"> + +<para> +<example> + location / { + index index.$geo.html index.html; + } +</example> +</para> + +</section> + + +<section name="Directives" id="directives"> + +<directive name="index"> +<syntax><argument>file</argument>...</syntax> +<default>index.html</default> +<context>http</context> +<context>server</context> +<context>location</context> + +<para> +Defines files that will be used as an index. +The <argument>file</argument> name can contain variables. +Files are checked in the specified order. +The last element of the list can be a file with an absolute path. +Example: +<example> + index index.$geo.html index.0.html /index.html; +</example> +</para> + +<para> +It should be noted that when using an index file, an internal redirect +is made, and request can be processed in a different location. +For example, with the following configuration: +<example> + location = / { + index index.html; + } + + location / { + ... + } +</example> +a request of “<code>/</code>” will actually be processed in the +second location as “<code>/index.html</code>”. +</para> + +</directive> + +</section> + +</module>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_random_index_module.xml Wed Oct 26 08:37:48 2011 +0000 @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> + +<module name="Module ngx_http_random_index_module" + link="/en/docs/http/ngx_http_random_index_module.html" + lang="en"> + +<section id="summary"> + +<para> +The module <code>ngx_http_random_index_module</code> picks a random +file in a directory as an index file. +It works before the +<link doc="ngx_http_index_module.xml">ngx_http_index_module</link> +module. +</para> + +<para> +This module is not built by default, it should be enabled with the +<code>--with-http_random_index_module</code> +configuration parameter. +</para> + +</section> + + +<section name="Example Configuration" id="example"> + +<para> +<example> + location / { + random_index on; + } +</example> +</para> + +</section> + + +<section name="Directives" id="directives"> + +<directive name="random_index"> +<syntax><value>on</value> | <value>off</value></syntax> +<default>off</default> +<context>location</context> + +<para> +Enables or disables module processing in a surrounding location. +</para> + +</directive> + +</section> + +</module>
--- a/xml/en/docs/index.xml Wed Oct 26 07:55:57 2011 +0000 +++ b/xml/en/docs/index.xml Wed Oct 26 08:37:48 2011 +0000 @@ -68,10 +68,20 @@ </item> <item> +<a href="/en/docs/http/ngx_http_index_module.xml"> +ngx_http_index_module</a> +</item> + +<item> <a href="/en/docs/http/ngx_http_mp4_module.xml"> ngx_http_mp4_module</a> </item> +<item> +<a href="/en/docs/http/ngx_http_random_index_module.xml"> +ngx_http_random_index_module</a> +</item> + </list> </para>