#user nobody; worker_processes 2; #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 1000s; proxy_read_timeout 1000s; client_max_body_size 50m; #gzip on; # 企业端 server { listen 80; server_name cwp.catarc.org.cn www.cwp.catarc.org.cn; #证书 listen 443 ssl; ssl_certificate D:\income_payments\SSL\Nginx\cwp.catarc.org.cn_bundle.pem; ssl_certificate_key D:\income_payments\SSL\Nginx\cwp.catarc.org.cn.key; # listen 80; # gzip config gzip on; gzip_min_length 1k; gzip_comp_level 9; gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary on; gzip_disable "MSIE [1-6]\."; #charset koi8-r; #access_log logs/host.access.log main; location / { root D:/income_payments/UI_enterprise/enterprise; #try_files $uri $uri/ /index.html; proxy_read_timeout 150s; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; add_header 'Referrer-Policy' 'origin'; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff"; #add_header X-Frame-Options "ALLOW-FROM http://casa.catarc.org.cn:7008/"; #add_header Strict-Transport-Security "max-age=16070400;"; index index.html index.htm; # root html; # index index.html index.htm; if (!-e $request_filename) { rewrite ^(.*)$ /index.html?s=$1 last; break; } } location /jero-boot { proxy_pass http://localhost:8077; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #会员系统的后端 location /memberApi { proxy_pass http://localhost:7009/api; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; error_page 404 /404.html; error_page 403 =404 /404.html; location = /50x.html { root html; } } # 管理端 server { listen 8066; server_name cwp.catarc.org.cn www.cwp.catarc.org.cn; # listen 80; # gzip config gzip on; gzip_min_length 1k; gzip_comp_level 9; gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary on; gzip_disable "MSIE [1-6]\."; #charset koi8-r; #access_log logs/host.access.log main; location / { root D:/income_payments/UI/dist; #try_files $uri $uri/ /index.html; #proxy_read_timeout 150; proxy_connect_timeout 120000s; #nginx跟后端服务器连接超时时间(代理连接超时) proxy_send_timeout 120000s; #后端服务器数据回传时间(代理发送超时) proxy_read_timeout 120000s; #连接成功后,后端服务器响应时间(代理接收超时) index index.html index.htm; # root html; # index index.html index.htm; if (!-e $request_filename) { rewrite ^(.*)$ /index.html?s=$1 last; break; } } location /jero-boot { proxy_pass http://localhost:8077; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # 请求大屏客户环境 location /zxd { proxy_pass http://www.catarc.org.cn:8088; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #请求WP29客户环境 location /WPApi { proxy_pass http://www.catarc.org.cn:20045/wp29/back; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /ISO { proxy_pass http://www.catarc.org.cn:20046/iso/back; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; error_page 404 /404.html; error_page 403 =404 /404.html; location = /50x.html { root html; } } server { listen 7008; server_name casa.catarc.org.cn; #server_name cwp.catarc.org.cn www.cwp.catarc.org.cn; # listen 80; # gzip config gzip on; gzip_min_length 1k; gzip_comp_level 9; gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary on; gzip_disable "MSIE [1-6]\."; #charset koi8-r; #access_log logs/host.access.log main; location / { root D:/standards_association/dist_vip; #try_files $uri $uri/ /index.html; proxy_read_timeout 150; index index.html index.htm; # root html; # index index.html index.htm; if (!-e $request_filename) { rewrite ^(.*)$ /index.html?s=$1 last; break; } } location /api { proxy_pass http://localhost:7009; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /jero-boot { proxy_pass http://localhost:8077; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; error_page 404 /404.html; error_page 403 =404 /404.html; location = /50x.html { root html; } } server { listen 80; server_name casa.catarc.org.cn; #server_name cwp.catarc.org.cn www.cwp.catarc.org.cn; # listen 80; # gzip config gzip on; gzip_min_length 1k; gzip_comp_level 9; gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary on; gzip_disable "MSIE [1-6]\."; #charset koi8-r; #access_log logs/host.access.log main; location / { root D:/standards_association/dist; #try_files $uri $uri/ /index.html; proxy_read_timeout 150; index index.html index.htm; # root html; # index index.html index.htm; if (!-e $request_filename) { rewrite ^(.*)$ /index.html?s=$1 last; break; } } location /api { proxy_pass http://localhost:7009; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /jero-boot { proxy_pass http://localhost:8077; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; error_page 404 /404.html; error_page 403 =404 /404.html; location = /50x.html { root html; } } server { listen 8092; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location ^~ /getCorsFile { return 404; index index.html index.htm; } location ^~ / { proxy_pass http://cwp.catarc.org.cn:8093/; } } }