模块:nginx_upstream_check_module-master
upstream caihong_server{
server 192.168.1.20:8085;
server 192.168.1.21:8085;
check interval=3000 rise=2 fall=5 timeout=1000 type=http;
check_http_send "GET / HTTP/1.0\r\n\r\n";
check_http_expect_alive http_2xx http_3xx;
}
server {
listen 81;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
location /nstatus {
check_status;
access_log off;
}
}