Random Index#

该模块处理以斜杠字符 (/) 结尾的请求,并在目录中随机选择一个文件作为索引文件提供服务。该模块在 http_index 模块之前处理。

从源代码构建 时,该模块默认不会被构建;必须通过 构建选项 --with-http_random_index_module 启用它。

在来自 我们的软件仓库 的包和镜像中,该模块已包含在 构建中。

配置示例#

location / {
    random_index on;
}

指令#

random_index#

语法

random_index on | off;

默认值

random_index off;

上下文

location

启用或禁用在周围位置中模块的处理。