<!-- review: finished -->

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

# Index

The module processes requests ending with the slash character (`/`). Such requests can also be processed by the [http_autoindex](https://en.angie.software//angie/docs/configuration/modules/http/http_autoindex.md#http-autoindex) and [http_random_index](https://en.angie.software//angie/docs/configuration/modules/http/http_random_index.md#http-random-index) modules.

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

## Configuration Example

```nginx
location / {
    index index.$geo.html index.html;
}
```

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

## Directives

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

<a id="id1"></a>

### index

| [Syntax](https://en.angie.software//angie/docs/configuration/configfile.md#configfile)   | `index` file ...;      |
|------------------------------------------------------------------------------------------|------------------------|
| Default                                                                                  | `index index.html;`    |
| [Context](https://en.angie.software//angie/docs/configuration/configfile.md#configfile)  | 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:

```nginx
index index.$geo.html index.0.html /index.html;
```

It should be noted that using an index file causes an internal redirect, and the request can be processed in a different location. For example, with the following configuration:

```nginx
location = / {
    index index.html;
}

location / {
#    ...
}
```

A `"/"` request will actually be processed in the second location as `"/index.html"`.
