• 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.4.71.119:5002;
            #server 192.168.1.220:5002;
        
            check interval=3000 rise=2 fall=5 timeout=1000 type=http;
            check_keepalive_requests 100;
            check_http_send "GET / HTTP/1.0 ";
            check_http_expect_alive http_2xx http_3xx;
        }
       
        server {
            listen       80;
            server_name  localhost;
            
            location / {
                root    /opt/app02/sys-webclient;
                index   index.html index.htm;
            }

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

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

            location /status {
                check_status;
                access_log   off;

                #allow 10.10.22.96;
                #deny all;
            }

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

  • 相关阅读:
    intelliJ IDEA最常用的快捷键
    Git使用说明
    mac快速安装程序
    java面试-String、StringBuffer和StringBuilder的区别
    linux静态与动态库创建及使用实例
    linux下动态库编译的依赖问题
    动态库与静态库的区别
    gcc-4.8.3安装,gdb-7.6安装
    设计模式之单件模式
    设计模式之抽象工厂模式
  • 原文地址:https://www.cnblogs.com/rigid/p/10680391.html
Copyright © 2020-2023  润新知