random_index_module 语法配置如下:

nginx random_index module讲解

这个配置默认是关闭的,必须是配置在location目录下才可以生效。

andom_index on |off:表示的是随机选择该目录下的一个文件显示出来但是这个文件如果是一个隐藏的文件,也就是以.开头的文件,那么random_index对此是没有作用的。Mv 3.html .3.html。mv表示的是重命名此时使用ls -a 才能显示所有的文件,包含隐藏的文件.

nginx random_index module讲解

  nginx random_index module讲解

  访问时,随机显示1.html,2.html.3.html的内容。





相关文章:

  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-10
  • 2021-06-23
  • 2022-12-23
  • 2021-06-21
  • 2021-12-22
  • 2022-02-05
相关资源
相似解决方案