Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Nginx 官方文档的中文翻译版,由本人在学习 nginx 时顺带翻译
- ngx_http_mp4_module
- ngx_http_perl_module
- ngx_http_proxy_module
- ngx_http_random_index_module
- [ngx_http_random_index_module](模块参考/ngx_http_random_index_module.md)
- ngx_http_realip_module
- ngx_http_referer_module
- ngx_http_rewrite_module
Expand Down
15 changes: 15 additions & 0 deletions 模块参考/ngx_http_random_index_module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ngx_http_random_index_module

`ngx_http_random_index_module` 模块处理以 “/” 结尾的请求,然后随机选择一个文件作为首页展示,这个模块优先于 `ngx_http_index_module`。

这个模块默认不会被构建到nginx中,需要在编译时加入 `--with-http_random_index_module` 配置参数。

## 配置示例
```nginx
location / {
random_index on;
}
```
## 原文档

- [http://nginx.org/en/docs/http/ngx_http_random_index_module.html](http://nginx.org/en/docs/http/ngx_http_random_index_module.html)