FAQ

Page Discussion History

Difference between revisions of "HttpRandomIndexModule"

m (random_index: clarification)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
<span style="color:red">WARNING: this article is obsoleted. Please refer to http://nginx.org/en/docs/ for the latest official documentation.</span>
 +
 
= Synopsis =
 
= Synopsis =
 
Pick a random file from a directory and use it as the index file.
 
Pick a random file from a directory and use it as the index file.
Line 11: Line 13:
 
= Directives =
 
= Directives =
 
== random_index ==
 
== random_index ==
'''syntax:''' ''random_index [on|off] ''
+
<include wikitext nopre src="http://wiki.nginx.org/nginx.org/http/ngx_http_random_index_module/random_index.txt" />
 
+
'''default:''' ''off''
+
 
+
'''context:''' ''location''
+
  
 
When enabled will scan the directory for files on each request, and chose a randomly picked file instead of the usual index.html to use as the index file.  Only plain-text files not starting with a dot will be considered.
 
When enabled will scan the directory for files on each request, and chose a randomly picked file instead of the usual index.html to use as the index file.  Only plain-text files not starting with a dot will be considered.
  
 
= References =
 
= References =
[http://sysoev.ru/nginx/docs/http/ngx_http_random_index_module.html Original Documentation]
+
[http://nginx.org/en/docs/http/ngx_http_random_index_module.html Original Documentation]

Revision as of 08:02, 23 August 2013

WARNING: this article is obsoleted. Please refer to http://nginx.org/en/docs/ for the latest official documentation.

Contents

Synopsis

Pick a random file from a directory and use it as the index file.

Example:

Directives

random_index

Syntax: random_index on | off
Default: off
Context: location
Reference:random_index


When enabled will scan the directory for files on each request, and chose a randomly picked file instead of the usual index.html to use as the index file. Only plain-text files not starting with a dot will be considered.

References

Original Documentation