tengine upstream


user  root;
worker_processes  1;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;


    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
    # 不能有下划线
    upstream backend {
        ip_hash;
        server 49.;
        #server 19;
    
        check interval=3000 rise=2 fall=5 timeout=1000 type=http;
        check_keepalive_requests 100;
        check_http_send "GET / HTTP/1.0\r\n\r\n";
        check_http_expect_alive http_2xx http_3xx;
    }
   
    server {
        listen       80;
        server_name  localhost;
        
        location / {
            root    /sys-webclient;
            index   index.html index.htm;
        }

                
        location ~*/(micr|resource)/ {
             proxy_pass  http://backend;
        }

        location = /nginx_status {
            stub_status on;
        
            #allow 10;
            #deny all;
        }

        location /status {
            check_status;
            access_log   off;

            #allow 10.;
            #deny all;
        }

        #error_page  404              /404.html;
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}

posted on 2019-04-09 22:43  rigidwang  阅读(166)  评论(0)    收藏  举报