
#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 {
    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''   close;
    }

    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;
    
	server_names_hash_bucket_size 64;
	
	server {
        listen 28082;
        #server_name gjd.uijs.cn;
		server_name localhost;
		#开启和关闭gzip
        gzip on;
        #gizp压缩起点，文件大于1k才进行压缩
        gzip_min_length 1k;
         # gzip 压缩级别，1-9，数字越大压缩的越好，也越占用CPU时间
        gzip_comp_level 6;
         # 进行压缩的文件类型。
         gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/xml text/javascript application/json image/png image/gif image/jpeg;
         #nginx对于静态文件的处理模块，开启后会寻找以.gz结尾的文件，直接返回，不会占用cpu进行压缩，如果找不到则不进行压缩
         # gzip_static on|off
         # 是否在http header中添加Vary: Accept-Encoding，建议开启
         gzip_vary on;
         # 设置压缩所需要的缓冲区大小，以4k为单位，如果文件为7k则申请2*4k的缓冲区
         gzip_buffers 4 16k;
		 
        #ssl_certificate gjd.uijs.cn_cert_chain.pem;
        #ssl_certificate_key gjd.uijs.cn_key.key;
        #ssl_session_cache    shared:SSL:1m;
        #ssl_session_timeout 5m;
        #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        #ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        #ssl_prefer_server_ciphers on;
        proxy_connect_timeout    360000;
        proxy_read_timeout       360000;
        proxy_send_timeout       360000;
        client_max_body_size  100m;
        location / {
			root   html_simulator_plat/dist;
			index  index.html index.htm;
			 
        }
		location /simulatorFile {
			alias D:/simulatorFile/;
			autoindex on;
		}
		
		 location /simulator/manage {
				
                if ($request_uri ~ "\.\.") {
                        return 404;
                }
                proxy_pass   http://127.0.0.1:19100;
                #proxy_set_header       Host $host;
                proxy_buffering        off;
                proxy_cache_valid      200  1d;
                proxy_cache_use_stale  error timeout invalid_header updating
                           http_500 http_502 http_503 http_504;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
				#try_files $uri $uri/ /htmltcs/dist/index.html;
                proxy_set_header Host $http_host;
                # 客户端真实ip
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 客户端真实协议(http/https)
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_redirect off;
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Allow-Credentials' 'true';
                add_header 'Access-Control-Allow-Methods' '*';
        }
		location /simulator/business {
				
                if ($request_uri ~ "\.\.") {
                        return 404;
                }
                proxy_pass   http://127.0.0.1:19200;
                #proxy_set_header       Host $host;
                proxy_buffering        off;
                proxy_cache_valid      200  1d;
                proxy_cache_use_stale  error timeout invalid_header updating
                           http_500 http_502 http_503 http_504;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
				#try_files $uri $uri/ /htmltcs/dist/index.html;
                proxy_set_header Host $http_host;
                # 客户端真实ip
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 客户端真实协议(http/https)
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_redirect off;
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Allow-Credentials' 'true';
                add_header 'Access-Control-Allow-Methods' '*';
        }
    }
	server {
        listen 28083 ;
        #server_name gjd.uijs.cn;
		server_name localhost;
		#开启和关闭gzip
        gzip on;
        #gizp压缩起点，文件大于1k才进行压缩
        gzip_min_length 1k;
         # gzip 压缩级别，1-9，数字越大压缩的越好，也越占用CPU时间
        gzip_comp_level 6;
         # 进行压缩的文件类型。
         gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/xml text/javascript application/json image/png image/gif image/jpeg;
         #nginx对于静态文件的处理模块，开启后会寻找以.gz结尾的文件，直接返回，不会占用cpu进行压缩，如果找不到则不进行压缩
         # gzip_static on|off
         # 是否在http header中添加Vary: Accept-Encoding，建议开启
         gzip_vary on;
         # 设置压缩所需要的缓冲区大小，以4k为单位，如果文件为7k则申请2*4k的缓冲区
         gzip_buffers 4 16k;
		 
        #ssl_certificate gjd.uijs.cn_cert_chain.pem;
        #ssl_certificate_key gjd.uijs.cn_key.key;
        #ssl_session_cache    shared:SSL:1m;
        #ssl_session_timeout 5m;
        #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        #ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        #ssl_prefer_server_ciphers on;
        proxy_connect_timeout    360000;
        proxy_read_timeout       360000;
        proxy_send_timeout       360000;
        client_max_body_size  100m;
        location / {
			root   html_simulator_large_screen/dist;
			index  index.html index.htm;
			 
        } 
		 location /simulator/manage {
				
                if ($request_uri ~ "\.\.") {
                        return 404;
                }
                proxy_pass   http://127.0.0.1:19100;
                #proxy_set_header       Host $host;
                proxy_buffering        off;
                proxy_cache_valid      200  1d;
                proxy_cache_use_stale  error timeout invalid_header updating
                           http_500 http_502 http_503 http_504;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
				#try_files $uri $uri/ /htmltcs/dist/index.html;
                proxy_set_header Host $http_host;
                # 客户端真实ip
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 客户端真实协议(http/https)
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_redirect off;
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Allow-Credentials' 'true';
                add_header 'Access-Control-Allow-Methods' '*';
        }
    }
	
	server {
        listen       38800 ssl;
        server_name  yijia.zhengdaojiapei.com;
        #server_name  localhost;
        #rewrite ^(.*)$ https://$host$1:18080 permanent;

        #charset koi8-r;

        #开启和关闭gzip
        gzip on;
       #gizp压缩起点，文件大于1k才进行压缩
       gzip_min_length 1k;
        # gzip 压缩级别，1-9，数字越大压缩的越好，也越占用CPU时间
        gzip_comp_level 6;
       # 进行压缩的文件类型。
       gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/xml text/javascript application/json image/png image/gif image/jpeg;
       #nginx对于静态文件的处理模块，开启后会寻找以.gz结尾的文件，直接返回，不会占用cpu进行压缩，如果找不到则不进行压缩
        # gzip_static on|off
        # 是否在http header中添加Vary: Accept-Encoding，建议开启
      gzip_vary on;
      # 设置压缩所需要的缓冲区大小，以4k为单位，如果文件为7k则申请2*4k的缓冲区
       gzip_buffers 4 16k;

		ssl_certificate yijia.zhengdaojiapei.com.pem;
        ssl_certificate_key yijia.zhengdaojiapei.com.key;
        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on;

       proxy_connect_timeout    360000;
        proxy_read_timeout       360000;
        proxy_send_timeout       360000;
        client_max_body_size  100m;
       location / {
           root   html_saas_platform/dist;
           index  index.html index.htm;
           try_files $uri $uri/ /index.html;
        }
		location /saasFile {
			alias D:/tempFile/saas/;
			autoindex on;
		}
        location /saas {
                if ($request_uri ~ "\.\.") {
                        return 404;
                }
                #root html/dist;
                #index  index.html index.htm;
                proxy_pass   http://127.0.0.1:37700;
                #proxy_set_header       Host $host;
                proxy_buffering        off;
                proxy_cache_valid      200  1d;
                proxy_cache_use_stale  error timeout invalid_header updating
                           http_500 http_502 http_503 http_504;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
                #try_files $uri $uri/ /html/dist/index.html;
                proxy_set_header Host $http_host;
                # 客户端真实ip
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 客户端真实协议(http/https)
                proxy_set_header X-Forwarded-Proto $scheme;

        }
	}
	server {
        listen       38810 ssl;
        server_name  yijia.zhengdaojiapei.com;
        #server_name  localhost;
        #rewrite ^(.*)$ https://$host$1:18080 permanent;

        #charset koi8-r;

        #开启和关闭gzip
        gzip on;
       #gizp压缩起点，文件大于1k才进行压缩
       gzip_min_length 1k;
        # gzip 压缩级别，1-9，数字越大压缩的越好，也越占用CPU时间
        gzip_comp_level 6;
       # 进行压缩的文件类型。
       gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/xml text/javascript application/json image/png image/gif image/jpeg;
       #nginx对于静态文件的处理模块，开启后会寻找以.gz结尾的文件，直接返回，不会占用cpu进行压缩，如果找不到则不进行压缩
        # gzip_static on|off
        # 是否在http header中添加Vary: Accept-Encoding，建议开启
      gzip_vary on;
      # 设置压缩所需要的缓冲区大小，以4k为单位，如果文件为7k则申请2*4k的缓冲区
       gzip_buffers 4 16k;

		ssl_certificate yijia.zhengdaojiapei.com.pem;
        ssl_certificate_key yijia.zhengdaojiapei.com.key;
        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on;

       proxy_connect_timeout    360000;
        proxy_read_timeout       360000;
        proxy_send_timeout       360000;
        client_max_body_size  100m;
       location / {
           root   html_sass_large/dist;
           index  index.html index.htm;
           try_files $uri $uri/ /index.html;
        }
		location /saasFile {
			alias D:/tempFile/saas/;
			autoindex on;
		}
        location /saas {
                if ($request_uri ~ "\.\.") {
                        return 404;
                }
                #root html/dist;
                #index  index.html index.htm;
                proxy_pass   http://127.0.0.1:37700;
                #proxy_set_header       Host $host;
                proxy_buffering        off;
                proxy_cache_valid      200  1d;
                proxy_cache_use_stale  error timeout invalid_header updating
                           http_500 http_502 http_503 http_504;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
                #try_files $uri $uri/ /html/dist/index.html;
                proxy_set_header Host $http_host;
                # 客户端真实ip
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 客户端真实协议(http/https)
                proxy_set_header X-Forwarded-Proto $scheme;

        }
	}
	server {
        listen       443 ssl;
         server_name  xueche.zhengdaojiapei.com;
        #server_name  localhost;
        #rewrite ^(.*)$ https://$host$1:18080 permanent;

        #charset koi8-r;

        #开启和关闭gzip
        gzip on;
       #gizp压缩起点，文件大于1k才进行压缩
       gzip_min_length 1k;
        # gzip 压缩级别，1-9，数字越大压缩的越好，也越占用CPU时间
        gzip_comp_level 6;
       # 进行压缩的文件类型。
       gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/xml text/javascript application/json image/png image/gif image/jpeg;
       #nginx对于静态文件的处理模块，开启后会寻找以.gz结尾的文件，直接返回，不会占用cpu进行压缩，如果找不到则不进行压缩
        # gzip_static on|off
        # 是否在http header中添加Vary: Accept-Encoding，建议开启
      gzip_vary on;
      # 设置压缩所需要的缓冲区大小，以4k为单位，如果文件为7k则申请2*4k的缓冲区
       gzip_buffers 4 16k;
	   
	   ssl_certificate xueche.zhengdaojiapei.com.pem;
        ssl_certificate_key xueche.zhengdaojiapei.com.key;
        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on;

       proxy_connect_timeout    360000;
        proxy_read_timeout       360000;
        proxy_send_timeout       360000;
        client_max_body_size  100m;
	   
	   location /{
			alias D:/ds-server/nginx/;
			autoindex on;
	   }
	   
       
		location /saasFile {
			alias D:/tempFile/saas/;
			autoindex on;
		}
		location /tk_files {
			alias D:/tk_gj/PICTURE/tk-wechat/;
			autoindex on;
		}
        location /saas {
                if ($request_uri ~ "\.\.") {
                        return 404;
                }
                #root html/dist;
                #index  index.html index.htm;
                proxy_pass   http://127.0.0.1:37710;
                #proxy_set_header       Host $host;
                proxy_buffering        off;
                proxy_cache_valid      200  1d;
                proxy_cache_use_stale  error timeout invalid_header updating
                           http_500 http_502 http_503 http_504;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
                #try_files $uri $uri/ /html/dist/index.html;
                proxy_set_header Host $http_host;
                # 客户端真实ip
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 客户端真实协议(http/https)
                proxy_set_header X-Forwarded-Proto $scheme;

        }
	}
	server {
        listen       443 ssl;
         server_name  yijia.zhengdaojiapei.com;
        #server_name  localhost;
        #rewrite ^(.*)$ https://$host$1:18080 permanent;

        #charset koi8-r;

        #开启和关闭gzip
        gzip on;
       #gizp压缩起点，文件大于1k才进行压缩
       gzip_min_length 1k;
        # gzip 压缩级别，1-9，数字越大压缩的越好，也越占用CPU时间
        gzip_comp_level 6;
       # 进行压缩的文件类型。
       gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/xml text/javascript application/json image/png image/gif image/jpeg;
       #nginx对于静态文件的处理模块，开启后会寻找以.gz结尾的文件，直接返回，不会占用cpu进行压缩，如果找不到则不进行压缩
        # gzip_static on|off
        # 是否在http header中添加Vary: Accept-Encoding，建议开启
      gzip_vary on;
      # 设置压缩所需要的缓冲区大小，以4k为单位，如果文件为7k则申请2*4k的缓冲区
       gzip_buffers 4 16k;
	   
	   ssl_certificate yijia.zhengdaojiapei.com.pem;
        ssl_certificate_key yijia.zhengdaojiapei.com.key;
        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on;

       proxy_connect_timeout    360000;
        proxy_read_timeout       360000;
        proxy_send_timeout       360000;
        client_max_body_size  100m;
	   
	   location /{
			alias D:/ds-server/nginx/;
			autoindex on;
	   }
	   
       
		location /saasFile {
			alias D:/tempFile/saas/;
			autoindex on;
		}
        location /saas {
                if ($request_uri ~ "\.\.") {
                        return 404;
                }
                #root html/dist;
                #index  index.html index.htm;
                proxy_pass   http://127.0.0.1:37720;
                #proxy_set_header       Host $host;
                proxy_buffering        off;
                proxy_cache_valid      200  1d;
                proxy_cache_use_stale  error timeout invalid_header updating
                           http_500 http_502 http_503 http_504;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
                #try_files $uri $uri/ /html/dist/index.html;
                proxy_set_header Host $http_host;
                # 客户端真实ip
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 客户端真实协议(http/https)
                proxy_set_header X-Forwarded-Proto $scheme;

        }
	}
}
