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;
            }
    
        }
    ######################################
    }
  • 相关阅读:
    ip addr add 192.168.1.5 peer 192.168.1.6 dev enahisic2i1
    mininet对象添加带外管理
    mininet + mnec +bgpd
    Exception: Could not find a default OpenFlow controller
    mininet xterm图像化
    哇塞的Docker——vscode远程连接Docker容器进行项目开发(三)
    DJB Hash Function,也称times33算法, php的实现与分析-算法
    特别好用的音乐软件(亲测有效)
    实验室第一次排位赛
    C语言 编写“剪刀石头布”小游戏
  • 原文地址:https://www.cnblogs.com/guoziyi/p/7458173.html
Copyright © 2011-2022 走看看