Tengine健康检查模块配置,tengine模块


Step 1:
在node11节点执行命令

vi /opt/apps/tengine/conf/nginx.conf

添加如下属性:

    upstream test {
            server 192.168.80.11:8080  weight=2;
            server 192.168.80.12:8080  weight=1;
           check interval=3000 rise=2 fall=5 timeout=1000 type=http;
           check_http_send "HEAD / HTTP/1.0\r\n\r\n";
           check_http_expect_alive http_2xx http_3xx;
        }

Step 2:
在nginx.conf配置文件http—server下面添加如下属性

        location /status {
         check_status;
        }

Step 3:
在nginx.conf配置文件http—server—location下面添加如下属性

location / {
           proxy_pass http://test;
           root   html;
            index  index.html;

Step 4:
在node11节点执行命令,启动tengine

service nginxd start

Step 5:
打开浏览器,输入网址进行查看
http://192.168.80.11/status

相关内容

    暂无相关文章