您的位置:首页 > 其它

Tengine健康检查模块配置

2017-07-26 18:51 501 查看
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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息