zoukankan      html  css  js  c++  java
  • nginx.conf

    #user  nobody;
    worker_processes  1;
    
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    #pid        logs/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
    
        #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
        #                  '$status $body_bytes_sent "$http_referer" '
        #                  '"$http_user_agent" "$http_x_forwarded_for"';
    
        #access_log  logs/access.log  main;
    
        sendfile        on;
        #tcp_nopush     on;
    
        #keepalive_timeout  0;
        keepalive_timeout  65;
    
        #gzip  on;
        
        ################################
      upstream default-tomcat-service-clsip-01-8080 {
            # Load balance algorithm; empty for round robin, which is the default
            least_conn;
            server 172.30.10.5:8080 max_fails=0 fail_timeout=0;
            server 172.30.28.2:8080 max_fails=0 fail_timeout=0;
        }
        upstream default-tomcat-service-clsip-02-8080 {
            # Load balance algorithm; empty for round robin, which is the default
            least_conn;
            server 172.30.10.5:8080 max_fails=0 fail_timeout=0;
            server 172.30.28.2:8080 max_fails=0 fail_timeout=0;
        }
        upstream default-tomcat-service-clsip-8080 {
            # Load balance algorithm; empty for round robin, which is the default
            least_conn;
            server 172.30.10.5:8080 max_fails=0 fail_timeout=0;
            server 172.30.28.2:8080 max_fails=0 fail_timeout=0;
        }
        upstream default-tomcat-service-test01-8080 {
            # Load balance algorithm; empty for round robin, which is the default
            least_conn;
            server 172.30.10.5:8080 max_fails=0 fail_timeout=0;
            server 172.30.28.2:8080 max_fails=0 fail_timeout=0;
        }
        upstream default-tomcat-service-test02-8080 {
            # Load balance algorithm; empty for round robin, which is the default
            least_conn;
            server 172.30.10.5:8080 max_fails=0 fail_timeout=0;
            server 172.30.28.2:8080 max_fails=0 fail_timeout=0;
        }
        upstream default-tomcat-service-test022-8403 {
            # Load balance algorithm; empty for round robin, which is the default
            least_conn;
            server 127.0.0.1:8181 max_fails=0 fail_timeout=0;
        }
        upstream upstream-default-backend {
            # Load balance algorithm; empty for round robin, which is the default
            least_conn;
            server 172.30.92.3:8080 max_fails=0 fail_timeout=0;
        }
    
        #######################################
        
        server {
            server_name gcp33.boco.com;
            listen 8765;
            listen [::]:8765;
            set $proxy_upstream_name "-";
            location /gcp11 {
               
                proxy_pass http://default-tomcat-service-clsip-8080;
            }
            location / {
       
                proxy_pass http://upstream-default-backend;
            }
    
        }
    
        server {
            server_name gcp44.boco.com;
            listen 8764;
            listen [::]:8764;
            set $proxy_upstream_name "-";
            location /gcp33 {
            
                proxy_pass http://default-tomcat-service-clsip-02-8080;
            }
            location /gcp22 {
                proxy_pass http://default-tomcat-service-clsip-01-8080;
            }
            location / {
               proxy_pass http://upstream-default-backend;
            }
    
        }
        
        
        
         server {
            server_name gcp2.boco.com;
            listen 8765;
            listen [::]:8765;
            set $proxy_upstream_name "-";
            location /gcp222 {
               
                proxy_pass http://default-tomcat-service-test022-8403;
            }
            location /gcp22 {
                
                proxy_pass http://default-tomcat-service-test02-8080;
            }
            location /gcp2 {
               
                proxy_pass http://default-tomcat-service-test01-8080;
            }
            location / {
               
    
                proxy_pass             http://upstream-default-backend;
            }
    
        }
    ######################################
    }
  • 相关阅读:
    排序
    FileOutputStream文件写入 —— 覆盖、追加
    判断一个地图坐标是否在中国镜内
    地图坐标转换
    全文检索 使用最新lucene3.0.3+最新盘古分词 pangu2.4 .net 实例
    blob转base64位 base64位转blob
    div中粘贴图片并上传服务器 div中拖拽图片文件并上传服务器
    DIV 粘贴插入文本或者其他元素后,移动光标到最新处
    project 计划添加编号或 任务分解时为任务添加编号
    修改project任务的默认开始时间
  • 原文地址:https://www.cnblogs.com/guoziyi/p/7458173.html
Copyright © 2011-2022 走看看