<!-- review: finished -->

<a id="http-random-index"></a>

# Random Index

Обслуживает запросы, оканчивающиеся косой чертой (`/`), и выдает случайный файл в качестве индексного файла каталога. Модуль выполняется до модуля `http_index`.

При [сборке из исходного кода](https://angie.software//angie/docs/installation/sourcebuild.md#sourcebuild) модуль не собирается по умолчанию; его необходимо
включить с помощью [параметра сборки](https://angie.software//angie/docs/installation/sourcebuild.md#configure)
`‑‑with‑http_random_index_module`.
В пакетах и образах из
[наших репозиториев](https://angie.software//angie/docs/installation/index.md#install-packages)
модуль включен в сборку.

<a id="configuration-example-35"></a>

## Пример конфигурации

```nginx
location / {
    random_index on;
}
```

<a id="directives-36"></a>

## Директивы

<a id="index-0"></a>

<a id="id3"></a>

### random_index

| [Синтаксис](https://angie.software//angie/docs/configuration/configfile.md#configfile)   | `random_index` `on` | `off`.;   |
|------------------------------------------------------------------------------------------|---------------------------------|
| По умолчанию                                                                             | `random_index off;`             |
| [Контекст](https://angie.software//angie/docs/configuration/configfile.md#configfile)    | location                        |

Разрешает или запрещает в содержащем эту директиву `location` обработку этим модулем.
