17 changed files with 500 additions and 17 deletions
@ -0,0 +1,108 @@ |
|||||
|
# For more information on configuration, see: |
||||
|
# * Official English Documentation: http://nginx.org/en/docs/ |
||||
|
# * Official Russian Documentation: http://nginx.org/ru/docs/ |
||||
|
|
||||
|
user nginx; |
||||
|
worker_processes auto; |
||||
|
error_log /var/log/nginx/error.log; |
||||
|
pid /run/nginx.pid; |
||||
|
|
||||
|
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. |
||||
|
include /usr/share/nginx/modules/*.conf; |
||||
|
|
||||
|
events { |
||||
|
worker_connections 1024; |
||||
|
} |
||||
|
|
||||
|
http { |
||||
|
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 main; |
||||
|
|
||||
|
sendfile on; |
||||
|
tcp_nopush on; |
||||
|
tcp_nodelay on; |
||||
|
keepalive_timeout 65; |
||||
|
types_hash_max_size 4096; |
||||
|
|
||||
|
include /etc/nginx/mime.types; |
||||
|
default_type application/octet-stream; |
||||
|
|
||||
|
# Load modular configuration files from the /etc/nginx/conf.d directory. |
||||
|
# See http://nginx.org/en/docs/ngx_core_module.html#include |
||||
|
# for more information. |
||||
|
include /etc/nginx/conf.d/*.conf; |
||||
|
|
||||
|
# zdxt-efcode-enterprise-app 企业端应用 |
||||
|
server { |
||||
|
listen 12004; |
||||
|
listen [::]:12004; |
||||
|
server_name _; |
||||
|
|
||||
|
# 企业端前端静态资源 |
||||
|
location / { |
||||
|
root /efcode20/zdxt-sup-web; |
||||
|
try_files $uri $uri/ /index.html; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
|
||||
|
# 后端API代理(匹配前端 VITE_BASE_URL = '/api/ent-ep') |
||||
|
location /prod-api/ { |
||||
|
proxy_set_header Host $http_host; |
||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||
|
proxy_set_header REMOTE-HOST $remote_addr; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
proxy_read_timeout 86400s; |
||||
|
proxy_http_version 1.1; |
||||
|
proxy_set_header Upgrade $http_upgrade; |
||||
|
proxy_set_header Connection upgrade; |
||||
|
proxy_buffering off; |
||||
|
proxy_cache off; |
||||
|
proxy_pass http://10.76.108.11:17000/sup-ep/; |
||||
|
} |
||||
|
|
||||
|
# 限制外网访问 actuator 相关路径 |
||||
|
location ~ ^(/[^/]*)?/actuator.*(/.*)?$ { |
||||
|
return 403; |
||||
|
} |
||||
|
|
||||
|
error_page 404 /404.html; |
||||
|
location = /40x.html { |
||||
|
} |
||||
|
|
||||
|
error_page 500 502 503 504 /50x.html; |
||||
|
location = /50x.html { |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# Settings for a TLS enabled server. |
||||
|
# |
||||
|
# server { |
||||
|
# listen 443 ssl http2; |
||||
|
# listen [::]:443 ssl http2; |
||||
|
# server_name _; |
||||
|
# root /usr/share/nginx/html; |
||||
|
# |
||||
|
# ssl_certificate "/etc/pki/nginx/server.crt"; |
||||
|
# ssl_certificate_key "/etc/pki/nginx/private/server.key"; |
||||
|
# ssl_session_cache shared:SSL:1m; |
||||
|
# ssl_session_timeout 10m; |
||||
|
# ssl_ciphers PROFILE=SYSTEM; |
||||
|
# ssl_prefer_server_ciphers on; |
||||
|
# |
||||
|
# # Load configuration files for the default server block. |
||||
|
# include /etc/nginx/default.d/*.conf; |
||||
|
# |
||||
|
# error_page 404 /404.html; |
||||
|
# location = /40x.html { |
||||
|
# } |
||||
|
# |
||||
|
# error_page 500 502 503 504 /50x.html; |
||||
|
# location = /50x.html { |
||||
|
# } |
||||
|
# } |
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,311 @@ |
|||||
|
|
||||
|
#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 { |
||||
|
include mime.types; |
||||
|
default_type application/octet-stream; |
||||
|
add_header X-Frame-Options SAMEORIGIN; |
||||
|
server_tokens off; |
||||
|
|
||||
|
# 定义后端集群 |
||||
|
upstream java_cluster { |
||||
|
server 10.76.108.1:85; |
||||
|
# server 10.76.108.4:85; |
||||
|
# server 10.76.108.5:85; |
||||
|
# server 10.76.108.6:85; |
||||
|
# 可加 weight、backup、max_fails 等参数 |
||||
|
} |
||||
|
|
||||
|
#allow 61.144.226.33; |
||||
|
#allow 10.76.108.25; |
||||
|
#allow 192.168.93.1; |
||||
|
#deny all; |
||||
|
#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 { |
||||
|
listen 81; |
||||
|
|
||||
|
location / { |
||||
|
proxy_pass http://10.76.108.1:80; |
||||
|
proxy_set_header Host $host; |
||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
server { |
||||
|
listen 80; |
||||
|
server_name localhost; |
||||
|
|
||||
|
client_max_body_size 200M; |
||||
|
#charset koi8-r; |
||||
|
|
||||
|
#access_log logs/host.access.log main; |
||||
|
#prpoxy_cookie_path / "/; httponly;secure; SameSite=Lax"; |
||||
|
location / { |
||||
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
#proxy_headers_hash_max_size 51200; |
||||
|
#1proxy_headers_hash_bucket_size 6400; |
||||
|
#proxy_set_header X-Real-IP $remote_addr; |
||||
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
#root /usr/local/nginx/html/HTML-ICP/; |
||||
|
root /usr/local/nginx/html/dist-zf/; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
|
||||
|
location /icp { |
||||
|
alias /usr/local/nginx/html/HTML-ICP/; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
#location ~* /(uploads|images)/.*\.(php|php2|php3|php4|php5|phpm|phpml|phtml|phtm|phps|pht|asp|aspx|asa|cer|cdx|ashx|exe|sh|bash|jsp|jspx|jspa|html|web.config|cfm|cgi|war|ashx|htaccess|py|pl)$ { |
||||
|
#deny all; # 拦截.html和.htm文件,并返回403禁止访问 |
||||
|
#return 403; |
||||
|
#} |
||||
|
location /enforce { |
||||
|
# 执法端 |
||||
|
alias /usr/local/nginx/html/dist-zf-tmp/; |
||||
|
#root /usr/local/nginx/html/zfjdm/; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
location /enterprise { |
||||
|
# 企业端 |
||||
|
#proxy_set_header X-Real-IP $remote_addr; |
||||
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
# 注意这里只能使用 alias |
||||
|
alias /usr/local/nginx/html/dist-qy/; |
||||
|
# root /usr/local/nginx/html/st-screen; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
|
||||
|
location /enforcetest { |
||||
|
# 执法端 - 测试 |
||||
|
alias /usr/local/nginx/html/dist-qy-test/; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
location /enterprisetest { |
||||
|
# 企业端 - 测试 (注意这里只能使用 alias) |
||||
|
alias /usr/local/nginx/html/dist-qy-test/; |
||||
|
# root /usr/local/nginx/html/st-screen; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
|
||||
|
#proxy_cookie_path / "/; httponly;secure; SameSite=Lax"; |
||||
|
#location / { |
||||
|
# proxy_cookie_path / "/api; secure; SameSite=None"; |
||||
|
# proxy_pass http://10.76.108.1:85; |
||||
|
#} |
||||
|
#error_page 404 /404.html; |
||||
|
|
||||
|
# redirect server error pages to the static page /50x.html |
||||
|
# |
||||
|
error_page 500 502 503 504 /50x.html; |
||||
|
location = /50x.html { |
||||
|
root html; |
||||
|
} |
||||
|
location /siqApi { |
||||
|
proxy_pass https://egbpub.szsiq.com/egb/api/thirdauth; |
||||
|
# proxy_pass http://10.76.108.3/siqApi; |
||||
|
} |
||||
|
location ^~ /sjWeb/ { |
||||
|
proxy_pass http://www.szcredit.com.cn/web/GSZJGSPT/; |
||||
|
#proxy_pass http://10.76.108.3/siqApi; |
||||
|
} |
||||
|
location /GJQYCredit { |
||||
|
proxy_pass http://www.szcredit.com.cn/web/GSZJGSPT/; |
||||
|
} |
||||
|
location /mssqApi { |
||||
|
proxy_pass http://10.224.158.64:8282/proxy; |
||||
|
} |
||||
|
location /profile/ { |
||||
|
proxy_pass http://10.76.108.1:85/profile/; |
||||
|
} |
||||
|
|
||||
|
location /szszfjdm { |
||||
|
alias /usr/local/nginx/html/zfjdm/; |
||||
|
index index.html index.htm; |
||||
|
} |
||||
|
|
||||
|
#执法监督码后台接口地址 |
||||
|
location ^~ /jdmApi/ { |
||||
|
# proxy_pass http://10.76.108.1:85/; |
||||
|
proxy_pass http://java_cluster/; |
||||
|
proxy_set_header Host $host:$server_port; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
proxy_set_header X-Forwarded-Proto $scheme; |
||||
|
proxy_set_header X-Forwarded-Port $server_port; |
||||
|
proxy_pass_header Set-Cookie; |
||||
|
#proxy_set_header Host $host; |
||||
|
#proxy_set_header X-Real-IP $remote_addr; |
||||
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
#proxy_headers_hash_max_size 51200; |
||||
|
#proxy_headers_hash_bucket_size 6400; |
||||
|
#proxy_intercept_errors on; |
||||
|
#error_page 301 302 307 = @handle_redirects; |
||||
|
#client_max_body_size 5120m; |
||||
|
} |
||||
|
# 执法监督码后台测试接口地址 |
||||
|
location ^~ /jdmTestApi/ { |
||||
|
proxy_pass http://10.76.108.1:88/; |
||||
|
proxy_set_header Host $host:$server_port; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
proxy_set_header X-Forwarded-Proto $scheme; |
||||
|
proxy_set_header X-Forwarded-Port $server_port; |
||||
|
proxy_pass_header Set-Cookie; |
||||
|
|
||||
|
proxy_intercept_errors on; |
||||
|
error_page 301 302 307 = @handle_redirects; |
||||
|
client_max_body_size 5120m; |
||||
|
} |
||||
|
location @handle_redirects { |
||||
|
set $saved_redirect_location '$upstream_http_location'; |
||||
|
proxy_pass $saved_redirect_location; |
||||
|
} |
||||
|
# proxy the PHP scripts to Apache listening on 127.0.0.1:80 |
||||
|
#location ~ \.php$ { |
||||
|
# proxy_pass http://127.0.0.1; |
||||
|
#} |
||||
|
|
||||
|
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
||||
|
# |
||||
|
#location ~ \.php$ { |
||||
|
# root / html; |
||||
|
# fastcgi_pass 127.0.0.1:9000; |
||||
|
# fastcgi_index index.php; |
||||
|
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; |
||||
|
# include fastcgi_params; |
||||
|
#} |
||||
|
|
||||
|
# deny access to .htaccess files, if Apache's document root |
||||
|
# concurs with nginx's one |
||||
|
# |
||||
|
#location ~ /\.ht { |
||||
|
# deny all; |
||||
|
#} |
||||
|
} |
||||
|
|
||||
|
server { |
||||
|
listen 8087; |
||||
|
server_name localhost; |
||||
|
#proxy_cookie_path / "/; httponly;secure; SameSite=Lax"; |
||||
|
location / { |
||||
|
proxy_pass http://10.224.158.64:8282/; |
||||
|
|
||||
|
proxy_set_header Host $host:$server_port; |
||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||
|
proxy_set_header REMOTE-HOST $remote_addr; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
client_max_body_size 50m; |
||||
|
client_body_buffer_size 256k; |
||||
|
proxy_connect_timeout 100; |
||||
|
proxy_send_timeout 100; |
||||
|
proxy_read_timeout 100; |
||||
|
proxy_buffer_size 256k; |
||||
|
proxy_buffers 4 256k; |
||||
|
proxy_busy_buffers_size 256k; |
||||
|
proxy_temp_file_write_size 256k; |
||||
|
proxy_next_upstream error timeout invalid_header http_500 http_503 http_404; |
||||
|
proxy_max_temp_file_size 128m; |
||||
|
} |
||||
|
} |
||||
|
server { |
||||
|
listen 85; |
||||
|
server_name localhost; |
||||
|
proxy_set_header Host $host; |
||||
|
proxy_set_header X-real-ip $remote_addr; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
client_max_body_size 100M; |
||||
|
location / { |
||||
|
# proxy_pass http://10.76.108.1:85; |
||||
|
proxy_pass http://java_cluster/; |
||||
|
proxy_set_header Host $host:$server_port; |
||||
|
proxy_set_header REMOTE-HOST $remote_addr; |
||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
proxy_redirect default; |
||||
|
proxy_connect_timeout 600s; |
||||
|
proxy_send_timeout 600s; |
||||
|
proxy_read_timeout 600s; |
||||
|
} |
||||
|
} |
||||
|
server { |
||||
|
listen 88; |
||||
|
server_name localhost; |
||||
|
proxy_set_header Host $host; |
||||
|
proxy_set_header X-real-ip $remote_addr; |
||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
client_max_body_size 100M; |
||||
|
location / { |
||||
|
proxy_pass http://10.76.108.1:81/; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
# another virtual host using mix of IP-, name-, and port-based configuration |
||||
|
# |
||||
|
#server { |
||||
|
# listen 8000; |
||||
|
# listen somename:8080; |
||||
|
# server_name somename alias another.alias; |
||||
|
|
||||
|
# location / { |
||||
|
# root html; |
||||
|
# index index.html index.htm; |
||||
|
# } |
||||
|
#} |
||||
|
|
||||
|
|
||||
|
# HTTPS server |
||||
|
# |
||||
|
server { |
||||
|
listen 443 ssl; |
||||
|
server_name jdm.szssfj.cn; |
||||
|
|
||||
|
ssl_certificate /usr/local/nginx/ssl/szssfj.cn.pem; |
||||
|
ssl_certificate_key /usr/local/nginx/ssl/szssfj.cn.key; |
||||
|
|
||||
|
ssl_session_cache shared:SSL:1m; |
||||
|
ssl_session_timeout 5m; |
||||
|
|
||||
|
ssl_ciphers HIGH:!aNULL:!MD5; |
||||
|
ssl_prefer_server_ciphers on; |
||||
|
|
||||
|
root /usr/local/nginx/html; |
||||
|
|
||||
|
location /enterprisetest { |
||||
|
# 企业端 |
||||
|
#proxy_set_header X-Real-IP $remote_addr; |
||||
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
|
# 注意这里只能使用 alias |
||||
|
alias /usr/local/nginx/html/dist-qy-test/; |
||||
|
index index.html index.htm; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,7 +1,7 @@ |
|||||
# 执法端生产环境 |
# 执法端生产环境 |
||||
VITE_PORT = 12002 |
VITE_PORT = 12002 |
||||
VITE_BASE_URL = 'http://localhost:17000/enf-ep' |
VITE_BASE_URL = '/efcode20-enf-app/api/enf-ep' |
||||
VITE_PROXY_TARGET = 'http://localhost:17000' |
VITE_PROXY_TARGET = 'http://localhost:17000' |
||||
VITE_CONTEXT_PATH = '/efcode20-enf-app/' |
VITE_CONTEXT_PATH = '/efcode20-enf-app/' |
||||
VITE_DEFAULT_LOGIN = '/enforce/login' |
VITE_DEFAULT_LOGIN = '/enforce/loginByPassword' |
||||
VITE_APP_ENV = 'prod' |
VITE_APP_ENV = 'prod' |
||||
|
|||||
@ -1,7 +1,7 @@ |
|||||
# 企业端开发环境 |
# 企业端开发环境 |
||||
VITE_PORT = 12001 |
VITE_PORT = 12001 |
||||
VITE_PROXY_TARGET = 'http://localhost:17000' |
VITE_PROXY_TARGET = 'http://localhost:17000' |
||||
VITE_BASE_URL = '/api/ent-ep' |
VITE_BASE_URL = '/efcode20-ent-app/api/ent-ep' |
||||
VITE_CONTEXT_PATH = '/efcode20-ent-app/' |
VITE_CONTEXT_PATH = '/efcode20-ent-app/' |
||||
VITE_DEFAULT_LOGIN = '/enterprise/loginByPassword' |
VITE_DEFAULT_LOGIN = '/enterprise/loginByPassword' |
||||
VITE_APP_ENV = 'dev' |
VITE_APP_ENV = 'dev' |
||||
|
|||||
@ -1,5 +1,5 @@ |
|||||
# 监督端开发环境 |
# 监督端开发环境 |
||||
VITE_PORT = 12003 |
VITE_PORT = 12002 |
||||
VITE_BASE_URL = '/api/sup-ep' |
VITE_BASE_URL = '/api/sup-ep' |
||||
VITE_DEFAULT_LOGIN = '/supervision/login' |
VITE_DEFAULT_LOGIN = '/supervision/login' |
||||
VITE_APP_ENV = 'dev' |
VITE_APP_ENV = 'dev' |
||||
|
|||||
@ -1,5 +1,5 @@ |
|||||
# 监督端生产环境 |
# 监督端生产环境 |
||||
VITE_PORT = 12003 |
VITE_PORT = 12002 |
||||
VITE_BASE_URL = '/api/sup-ep' |
VITE_BASE_URL = '/api/sup-ep' |
||||
VITE_DEFAULT_LOGIN = '/supervision/login' |
VITE_DEFAULT_LOGIN = '/supervision/login' |
||||
VITE_APP_ENV = 'prod' |
VITE_APP_ENV = 'prod' |
||||
|
|||||
Loading…
Reference in new issue