diff --git a/nginxConfig/dev/nginx_income_payments.conf b/nginxConfig/dev/nginx_income_payments.conf new file mode 100644 index 00000000..9b88af3a --- /dev/null +++ b/nginxConfig/dev/nginx_income_payments.conf @@ -0,0 +1,175 @@ + +user root; +worker_processes 1; + +error_log /data/DeploymentPackage/income_payments/logs/error.log; +error_log /data/DeploymentPackage/income_payments/logs/error.log notice; +error_log /data/DeploymentPackage/income_payments/logs/error.log info; + +pid /data/DeploymentPackage/income_payments/logs/nginx_income_payments.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 120; + + client_max_body_size 50m; + + #gzip on; + # 企业端 + server { + listen 8066; + server_name 10.10.10.46; + #listen 443 ssl; + # gzip config + #https + #ssl_certificate /data/DeploymentPackage/income_payments/SSL/1_bxxt.hzwlsoft.com_bundle.crt; + #ssl_certificate_key /data/DeploymentPackage/income_payments/SSL/2_bxxt.hzwlsoft.com.key; + #ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置 + #ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置 + 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 /data/DeploymentPackage/income_payments/UI/enterprise; + #try_files $uri $uri/ /index.html; + #proxy_read_timeout 150; + proxy_connect_timeout 60000; #nginx跟后端服务器连接超时时间(代理连接超时) + proxy_send_timeout 60000; #后端服务器数据回传时间(代理发送超时) + proxy_read_timeout 60000; #连接成功后,后端服务器响应时间(代理接收超时) + index index.html index.htm; + if (!-e $request_filename) { + rewrite ^(.*)$ /index.html?s=$1 last; + break; + } + } + # 来款系统的后端 + location /jero-boot { + proxy_pass http://10.10.10.46: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://10.10.10.46:9101/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 8055; + server_name 10.10.10.46; + # 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 /data/DeploymentPackage/income_payments/UI/dist; + #try_files $uri $uri/ /index.html; + #proxy_read_timeout 150; + 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 SAMEORIGIN; + proxy_connect_timeout 3600; #nginx跟后端服务器连接超时时间(代理连接超时) + proxy_send_timeout 3600; #后端服务器数据回传时间(代理发送超时) + proxy_read_timeout 3600; #连接成功后,后端服务器响应时间(代理接收超时) + index index.html index.htm; + if (!-e $request_filename) { + rewrite ^(.*)$ /index.html?s=$1 last; + break; + } + } + location /jero-boot { + proxy_pass http://10.10.10.46: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/zxd; + 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://10.10.10.46:9301/jeecg-boot; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + #请求ISO客户环境 + location /ISO { + proxy_pass http://10.10.10.46:9401/jeecg-boot; + 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; + } + + } +} diff --git a/nginxConfig/prod/nginx.conf b/nginxConfig/prod/nginx.conf new file mode 100644 index 00000000..d4db0725 --- /dev/null +++ b/nginxConfig/prod/nginx.conf @@ -0,0 +1,303 @@ + +#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/; + } + } + +}