events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/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  /var/log/nginx/access.log;
    error_log  /var/log/nginx/error.log;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;

	# C++网关
	server
	{
		listen 30001;
		add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
                add_header X-XSS-Protection "1; mode=block";
                add_header X-Frame-Options "SAMEORIGIN always";
                add_header X-Content-Type-Options "nosniff";
		# 转发websocket需要的设置
		proxy_set_header X-Real_IP $remote_addr;
		proxy_set_header Host $host;
		proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection 'upgrade';
		location / {
                       proxy_set_header Connection 'keep-alive';
			proxy_pass http://gatewayserver.rz-dt:30001/;
		}
                location /weixin/ {
			proxy_pass http://ossaccessserver.rz-dt:30002/weixin/;
		}
                location /upload/ {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			proxy_pass http://fileserver.rz-dt:30001/upload/;
		}
                location /getStsToken/ {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			proxy_pass http://fileserver.rz-dt:30001/getStsToken/;
		}
                location /getPreviewUrl/ {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			proxy_pass http://fileserver.rz-dt:30001/getPreviewUrl/;
		}
		location /upload_esign/ {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			proxy_pass http://electronicpythonserver.rz-dt:30001/upload_esign;
		}
		location /download/ {
			proxy_pass http://fileserver.rz-dt:30001/download/;
		}
		location /fdd_notify/ {
			proxy_pass http://electroniccbpythonserver.rz-dt:30001/;
		}
                location /hdwd_download/ {
                        client_max_body_size 1024M;
                        client_body_buffer_size 1024M;
			proxy_pass http://investorrelationpythonserver.rz-dt:30001/download_interqa;
		}

                # 通讯录
        location /address_book/ {
            client_max_body_size 1024M;
            client_body_buffer_size 1024M;
			proxy_pass http://addressbookpythonserver.rz-dt:30001/;
		}

		access_log /var/log/nginx/way.realize.com.cn.log;
	}
	
	# 智库web端
	server
	{
		listen 30002;
		add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
                #add_header Content-Security-Policy "default-src 'self' http://zhiku.realize.com.cn; font-src 'self' data:; script-src unsafe-inline; script-src-elem unsafe-inline";
                add_header X-XSS-Protection "1; mode=block";
                add_header X-Frame-Options "SAMEORIGIN always";
                add_header X-Content-Type-Options "nosniff";

		# 转发websocket需要的设置
		proxy_set_header X-Real_IP $remote_addr;
		proxy_set_header Host $host;
		proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection 'upgrade';
		location / {
			proxy_pass http://frontdongmi.rz-dt:30001/;
		}
                location /marketData/ {
                        proxy_pass http://frontdongmi-marketdata.rz-dt:30001/marketData/;
                }
                location /weixin/ {
			proxy_pass http://ossaccessserver.rz-dt:30002/weixin/;
                }
                location /getStsToken/ {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			proxy_pass http://fileserver.rz-dt:30001/getStsToken/;
                }
                location /rzgateway/ {
                        client_max_body_size 1024M;
                        client_body_buffer_size 1024M;
			#proxy_pass http://47.101.207.223:8082/;
                        proxy_pass http://139.224.134.101:8082/;
		}
                location /rzwebgateway/ {
			proxy_pass http://106.14.227.7:9300/;
		}
		location /upload/ {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			proxy_pass http://fileserver.rz-dt:30001/upload/;
		}
                location /getPreviewUrl/ {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			proxy_pass http://fileserver.rz-dt:30001/getPreviewUrl/;
		}
		location /upload_esign/ {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			proxy_pass http://electronicpythonserver.rz-dt:30001/upload_esign;
		}
		location /download/ {
			proxy_pass http://fileserver.rz-dt:30001/download/;
		}
		location /fdd_notify/ {
			proxy_pass http://electroniccbpythonserver.rz-dt:30001/;
		}
		access_log /var/log/nginx/zhiku.realize.com.cn.log;
	}
	
	# 荣正网关
	server
	{
		listen 30003;
		add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
		# 转发websocket需要的设置
		proxy_set_header X-Real_IP $remote_addr;
		proxy_set_header Host $host;
		proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection 'upgrade';
		location / {
			client_max_body_size 1024M;
			client_body_buffer_size 1024M;
			#proxy_pass http://47.101.207.223:8082/;
                        proxy_pass http://139.224.134.101:8082/;
		}
		access_log /var/log/nginx/rzgateway.realize.com.cn.log;
	}

        # 采集平台
server
{
    listen 30004;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
    # 转发websocket需要的设置
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    location / {
        proxy_pass http://spiderflow.rz-dt:30001/;
    }
    access_log /var/log/nginx/spider.realize.com.cn.log;
}

    # 视频营销
	server
	{
		listen 30005;
		add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
		# 转发websocket需要的设置
		proxy_set_header X-Real_IP $remote_addr;
		proxy_set_header Host idtcdn.oss-cn-hangzhou.aliyuncs.com;
		proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection 'upgrade';
		location / {
			proxy_pass http://idtcdn.oss-cn-hangzhou.aliyuncs.com/;
		}
		access_log /var/log/nginx/video.realize.com.cn.log;
	}
}

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐