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

配置格式

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

示例

location / {
    root /opt/html;#/opt/html目录下有三个html文件
    random_index on;
}

      刷新页面随机选择页面作为首页。

请输入图片描述

Last modification:March 27th, 2020 at 10:09 pm
如果觉得我的文章对你有用,请随意赞赏