模块 ngx_http_random_index_module

配置示例
指令
     random_index

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

默认情况下该模块不会被构建,它应通过配置参数 --with-http_random_index_module 启用。

配置示例

location / {
    random_index on;
}

指令

语法 random_index on | off;
默认值
random_index off;
上下文 location

在其所在 location 块中启用或禁用模块处理。