view xml/en/docs/http/ngx_http_index_module.xml @ 2846:fdf1464e1977

Moved banner to the external file to make partial rollout possible. An idea is to have several banners and show them with different probability specified by split directive in the nginx.conf
author Sergey Budnevitch <sb@waeme.net>
date Tue, 10 May 2022 18:07:27 +0400
parents 95c3c3bbf1ce
children
line wrap: on
line source

<?xml version="1.0"?>

<!--
  Copyright (C) Igor Sysoev
  Copyright (C) Nginx, Inc.
  -->

<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">

<module name="Module ngx_http_index_module"
        link="/en/docs/http/ngx_http_index_module.html"
        lang="en"
        rev="2">

<section id="summary">

<para>
The <literal>ngx_http_index_module</literal> module processes requests
ending with the slash character (‘<literal>/</literal>’).
Such requests can also be processed by the
<link doc="ngx_http_autoindex_module.xml">ngx_http_autoindex_module</link>
and
<link doc="ngx_http_random_index_module.xml">ngx_http_random_index_module</link>
modules.
</para>

</section>


<section id="example" name="Example Configuration">

<para>
<example>
location / {
    index index.$geo.html index.html;
}
</example>
</para>

</section>


<section id="directives" name="Directives">

<directive name="index">
<syntax><value>file</value> ...</syntax>
<default>index.html</default>
<context>http</context>
<context>server</context>
<context>location</context>

<para>
Defines files that will be used as an index.
The <value>file</value> 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:
<example>
index index.$geo.html index.0.html /index.html;
</example>
</para>

<para>
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:
<example>
location = / {
    index index.html;
}

location / {
    ...
}
</example>
a “<literal>/</literal>” request will actually be processed in the
second location as “<literal>/index.html</literal>”.
</para>

</directive>

</section>

</module>