# HG changeset patch # User Ruslan Ermilov # Date 1319618268 0 # Node ID 317ac898ba50cd8cadb265edeb3edf5b1184cc6b # Parent 5a35535f7cdf5980cf092bd4034b882cfe7a8bbb Initial translation of the "ngx_http_index_module" and "ngx_http_random_index_module". diff -r 5a35535f7cdf -r 317ac898ba50 xml/en/GNUmakefile --- 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) diff -r 5a35535f7cdf -r 317ac898ba50 xml/en/docs/http/ngx_http_index_module.xml --- /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 @@ + + + + + + +
+ + +The module ngx_http_index_module processes requests +ending with the slash character (‘/’). + + +
+ + +
+ + + + location / { + index index.$geo.html index.html; + } + + + +
+ + +
+ + +file... +index.html +http +server +location + + +Defines files that will be used as an index. +The file 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: + + index index.$geo.html index.0.html /index.html; + + + + +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: + + location = / { + index index.html; + } + + location / { + ... + } + +a request of “/” will actually be processed in the +second location as “/index.html”. + + + + +
+ +
diff -r 5a35535f7cdf -r 317ac898ba50 xml/en/docs/http/ngx_http_random_index_module.xml --- /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 @@ + + + + + + +
+ + +The module ngx_http_random_index_module picks a random +file in a directory as an index file. +It works before the +ngx_http_index_module +module. + + + +This module is not built by default, it should be enabled with the +--with-http_random_index_module +configuration parameter. + + +
+ + +
+ + + + location / { + random_index on; + } + + + +
+ + +
+ + +on | off +off +location + + +Enables or disables module processing in a surrounding location. + + + + +
+ +
diff -r 5a35535f7cdf -r 317ac898ba50 xml/en/docs/index.xml --- 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 @@ + +ngx_http_index_module + + + ngx_http_mp4_module + + +ngx_http_random_index_module + +