From fc6bb5b4365be1bbf23b598addcca2b3c9bc00b5 Mon Sep 17 00:00:00 2001 From: yankewei <15833997749@163.com> Date: Thu, 12 Oct 2017 17:50:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=BC=96=E5=86=99ngx=5Fhttp=5Frandom=5Find?= =?UTF-8?q?ex=5Fmodule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- .../ngx_http_random_index_module.md" | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 "\346\250\241\345\235\227\345\217\202\350\200\203/ngx_http_random_index_module.md" 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..3cf8301 --- /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 / { + reandom_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) From 4a77ecdacd0d4bf05830887474905cb142882163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=9F=AF=E7=8E=AE?= <15833997749@163.com> Date: Thu, 12 Oct 2017 04:57:02 -0500 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ngx_http_random_index_module.md" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" index 3cf8301..dc340b8 100644 --- "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" @@ -1,8 +1,8 @@ # ngx_http_random_index_module -`ngx_http_random_index_module` 模块处理以 “/” 结尾的请求,然后随机选择一个文件作为首页展示,这个模块优先于 `ngx_http_index_module`。 +`ngx_http_random_index_module` 模块处理以 “/” 结尾的请求,然后随机选择一个文件作为首页展示,这个模块优先于 `ngx_http_index_module`。 -这个模块默认不会被构建到nginx中,需要在编译时加入 `--with-http_random_index_module` 配置参数。 +这个模块默认不会被构建到nginx中,需要在编译时加入 `--with-http_random_index_module` 配置参数。 ## 配置示例 ```nginx From e787762cbe743c778229aa3deaf27120b6d625c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=9F=AF=E7=8E=AE?= <15833997749@163.com> Date: Thu, 12 Oct 2017 04:57:42 -0500 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9ngx=5Fhttp=5Frandom=5Find?= =?UTF-8?q?ex=5Fmodule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ngx_http_random_index_module.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" index dc340b8..c279b30 100644 --- "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" @@ -7,7 +7,7 @@ ## 配置示例 ```nginx location / { - reandom_index on; + random_index on; } ``` ## 原文档