diff --git a/README.md b/README.md index 3a26b49..531378c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git "a/\346\250\241\345\235\227\345\217\202\350\200\203/ngx_http_random_index_module.md" "b/\346\250\241\345\235\227\345\217\202\350\200\203/ngx_http_random_index_module.md" new file mode 100644 index 0000000..c279b30 --- /dev/null +++ "b/\346\250\241\345\235\227\345\217\202\350\200\203/ngx_http_random_index_module.md" @@ -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)