Nginx 配置

# 172.18.150.198 epros-test-01
upstream eprosdesignerService {
     server 172.18.150.198:8080;
}

upstream eprosviewerService {
     server 172.18.150.198:8088;
}

upstream eprosssoService {
     server 172.18.150.198:8099;
}

upstream eprosapiService {
     server 172.18.150.198:18088;
}

upstream eprospreviewService {
     server 172.18.150.198:8012;
}

server {
        listen 80;
        server_name epros-test.xxxx.net;
        client_max_body_size 50m;
    

        location /WW_verify_ZZLkKF0nSfxhgH7R.txt {
                default_type text/html;
                return 200 'ZZLkKF0nSfxhgH7R';
        }

    
        location / {
               proxy_set_header Host $host:$server_port;
            proxy_set_header Remote_Addr $remote_addr;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Cookie $http_cookie;
            proxy_cookie_path / /;
            proxy_connect_timeout  800; 
            proxy_read_timeout  800; 
            proxy_send_timeout  800; 
            proxy_pass http://eprosdesignerService/;
        }
        location ^~/epros/static-web {
            root html;
            index index.html;
            try_files $uri $uri//index.html;
        }
    
        location ^~/epros/inventory {
            root html;
            index index.html;
            try_files $uri $uri//index.html;
        }        

        location ^~/epros {
            proxy_set_header Host $host:$server_port;
            proxy_set_header Remote_Addr $remote_addr;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Cookie $http_cookie;
            proxy_cookie_path / /;
            proxy_connect_timeout  800; 
            proxy_read_timeout  800; 
            proxy_send_timeout  800; 
            proxy_pass http://eprosdesignerService/;
        }

       location ^~/epros/api/ {
             proxy_set_header Host $host:$server_port;
              proxy_set_header Remote_Addr $remote_addr;
              proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Cookie $http_cookie;
             proxy_cookie_path / /;
             proxy_connect_timeout  800; 
             proxy_read_timeout  800; 
             proxy_send_timeout  800; 
             proxy_pass http://eprosviewerService/;
         }

         location ^~/epros/Interface {
             proxy_set_header Host $host:$server_port; 
             proxy_set_header Remote_Addr $remote_addr;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Cookie $http_cookie;
             proxy_cookie_path / /;
             proxy_connect_timeout  800; 
             proxy_read_timeout  800; 
             proxy_send_timeout  800; 
        
             proxy_pass http://eprosapiService/epros/Interface;
         }

         location ^~/webjars {
             proxy_set_header Host $host:$server_port; 
             proxy_set_header Remote_Addr $remote_addr;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Cookie $http_cookie;
             proxy_cookie_path / /;
             proxy_connect_timeout  800; 
             proxy_read_timeout  800; 
             proxy_send_timeout  800; 

             proxy_pass http://eprosapiService/epros/Interface/webjars;
         }


         location ^~/epros/sso {
             proxy_set_header Host $host:$server_port; 
             proxy_set_header Remote_Addr $remote_addr;
             proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header Cookie $http_cookie;
              proxy_cookie_path / /;
             proxy_connect_timeout  800; 
             proxy_read_timeout  800; 
             proxy_send_timeout  800; 

             proxy_pass http://eprosssoService/;
         }

         location ^~/preview-service {
             proxy_set_header Host $host:$server_port;
             proxy_set_header Remote_Addr $remote_addr;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_connect_timeout  800; 
             proxy_read_timeout  800; 
             proxy_send_timeout  800; 

             proxy_pass http://eprospreviewService/preview-service;
         }

}

 

posted @ 2023-05-23 17:02  lovleo  阅读(10)  评论(0编辑  收藏  举报