server {
    client_max_body_size 1024M;
    listen  20035;

    location ^~/admin/ {
            client_max_body_size 1024M;
            rewrite    ^(.*)admin(.*)$   $1/$2; break;
            proxy_pass  http://192.168.45.243:20100;
            proxy_http_version 1.1;
            proxy_connect_timeout 4s;
            proxy_read_timeout 60s;
            proxy_send_timeout 12s;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
			add_header 'Access-Control-Allow-Origin' "$http_origin";
			add_header 'Access-Control-Allow-Credentials' true;
			add_header 'Access-Control-Allow-Headers' Wcommon,Accept,Accept-Encoding,Content-Type,Cache-Control,Pragma,Referer,Token;
    }
	
	location ^~/api/ {
            client_max_body_size 1024M;
			add_header Access-Control-Allow-Credentials 'true';
            rewrite    ^(.*)api(.*)$   $1/$2; break;
            proxy_pass  http://192.168.81.104:31099;
            proxy_http_version 1.1;
            proxy_connect_timeout 4s;
            proxy_read_timeout 60s;
            proxy_send_timeout 12s;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
			
    }      
    location / {
        include mime.types;
        gzip_static on;
        default_type application/octet-stream;
        client_max_body_size 1024M;
        #root /opt/testdeploy/wsd/wiiotweb/business;
        root /wecon/wsd/wiiotweb/business;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        client_max_body_size 1024M;
        root   html;
    }
}

server {
    client_max_body_size 1024M;
    listen  30035;

	location ^~/api/ {
            client_max_body_size 1024M;
            rewrite    ^(.*)api(.*)$   $1/$2; break;
            proxy_pass  http://192.168.51.117:8091;
            proxy_http_version 1.1;
            proxy_connect_timeout 4s;
            proxy_read_timeout 60s;
            proxy_send_timeout 12s;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
			
    }

}

