FAQ

Page Discussion Edit History

NginxHttpRandomIndexModule

Contents

Edit section: Synopsis Synopsis

Pick a random directory index from a directory.

Example:

location  /  {
  random_index  on;
}

Edit section: Directives Directives

Edit section: random_index random_index

syntax: random_index [on|off]

default: off

context: location

If enabled for a specific location, will scan the given directory for files on each access, and send a randomly picked one instead of the usual index.html. Only plain files not starting with a dot will be considered.

Edit section: References References

Original Documentation