Nginx模块讲解_http_random_index_module

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/longgeqiaojie304/article/details/84987322

Nginx模块讲解_http_random_index_module

1、http_random_index_module详解

(1)http_random_index_module作用

(2)举例

location / {

    random_index on;

}

2、random_index语法

Syntax:

random_index on | off;

Default:

random_index off;

Context:

location

3、random_index配置

4、验证配置是否生效

(1)/usr/share/nginx/html/muti_ip目录下创建三个html文件

(2)访问nginx得到的结果

随机访问不同的页面,一会儿访问server2.html,一会儿访问server1.html,一会儿访问server3.html,不固定:

猜你喜欢

转载自blog.csdn.net/longgeqiaojie304/article/details/84987322
今日推荐