Browse Source

监督端-查询统计

dev-v1.0.2
庄锐波 3 months ago
parent
commit
c96fdda3b8
  1. 5
      doc/部署说明/部署过程描述.md
  2. 42
      ng/14/nginx.conf
  3. 108
      ng/15/nginx.conf
  4. 311
      ng/3/nginx-原始备份.conf
  5. 19
      ng/3/nginx.conf
  6. 2
      zdxt-web-client/zdxt-admin-plus-ui/.env.development
  7. 2
      zdxt-web-client/zdxt-admin-plus-ui/.env.development-zrb-cust
  8. 4
      zdxt-web-client/zdxt-admin-plus-ui/.env.production
  9. 2
      zdxt-web-client/zdxt-admin-plus-ui/src/main.ts
  10. 4
      zdxt-web-client/zdxt-efcode-enforcement-app/vite-config/index.js
  11. 2
      zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-dev-zrb
  12. 4
      zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-prod
  13. 4
      zdxt-web-client/zdxt-efcode-enterprise-app/vite-config/index.js
  14. 2
      zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-zrb
  15. 2
      zdxt-web-client/zdxt-efcode-supervision-app/vite-env/.env.supervision-dev
  16. 2
      zdxt-web-client/zdxt-efcode-supervision-app/vite-env/.env.supervision-prod
  17. 2
      zdxt-web-server/zdxt-admin-web-server/src/main/resources/application-prod.yml

5
doc/部署说明/部署过程描述.md

@ -1,3 +1,6 @@
地址
## 10.76.108.1
### df -h
@ -266,7 +269,7 @@ firewall-cmd --list-all
ng配置文件路径
/etc/nginx/nginx.conf
日志在 /var/log/nginx/
---
## 10.76.108.15 监督端前端

42
ng/14/nginx.conf

@ -79,5 +79,47 @@ http {
location = /50x.html {
}
}
# zdxt-efcode-enforcement-app 执法端应用
server {
listen 12003;
listen [::]:12003;
server_name _;
# 执法端前端静态资源
location / {
root /efcode20/zdxt-enf-app;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
# 后端API代理(匹配前端 VITE_BASE_URL = '/api/ent-ep')
location /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/;
}
# 限制外网访问 actuator 相关路径
location ~ ^(/[^/]*)?/actuator.*(/.*)?$ {
return 403;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}

108
ng/15/nginx.conf

@ -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 {
# }
# }
}

311
ng/3/nginx-原始备份.conf

@ -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;
}
}
}

19
ng/3/nginx.conf

@ -101,6 +101,18 @@ http {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /efcode20-enf-app/ {
proxy_pass http://10.76.108.14:12003/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /efcode20-sup-web/ {
proxy_pass http://10.76.108.15:12004/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#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;
@ -271,6 +283,13 @@ http {
proxy_send_timeout 600s;
proxy_read_timeout 600s;
}
location /efcode20-sup-web/ {
proxy_pass http://10.76.108.15:12004/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 88;

2
zdxt-web-client/zdxt-admin-plus-ui/.env.development

@ -12,7 +12,7 @@ VITE_APP_BASE_API = '/dev-api'
VITE_APP_PROXY_TARGET = 'http://localhost:8080'
# 应用访问路径 例如使用前缀 /admin/
VITE_APP_CONTEXT_PATH = '/'
VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/'
# 监控地址
VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications'

2
zdxt-web-client/zdxt-admin-plus-ui/.env.development-zrb-cust

@ -10,7 +10,7 @@ VITE_APP_ENV = 'development'
VITE_APP_BASE_API = '/dev-api'
# 应用访问路径 例如使用前缀 /admin/
VITE_APP_CONTEXT_PATH = '/'
VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/'
# 监控地址
VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications'

4
zdxt-web-client/zdxt-admin-plus-ui/.env.production

@ -6,7 +6,7 @@ VITE_APP_LOGO_TITLE = 执法监督码•执法监督
VITE_APP_ENV = 'production'
# 应用访问路径 例如使用前缀 /admin/
VITE_APP_CONTEXT_PATH = '/'
VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/'
# 监控地址
VITE_APP_MONITOR_ADMIN = '/admin/applications'
@ -15,7 +15,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
VITE_APP_SNAILJOB_ADMIN = '/snail-job'
# 生产环境
VITE_APP_BASE_API = '/prod-api'
VITE_APP_BASE_API = '/efcode20-sup-web/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

2
zdxt-web-client/zdxt-admin-plus-ui/src/main.ts

@ -60,4 +60,4 @@ directive(app);
app.mount('#app');
// 初始化开发者工具保护(仅生产环境)
initDevToolsProtection();
// initDevToolsProtection();

4
zdxt-web-client/zdxt-efcode-enforcement-app/vite-config/index.js

@ -42,10 +42,10 @@ const baseCfg = (viteEnv = {}) => {
open: false,
cors: true,
proxy: {
'/api': {
'/efcode20-enf-app/api': {
target: VITE_PROXY_TARGET || 'http://localhost:17000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
rewrite: (path) => path.replace(/^\/efcode20-enf-app\/api/, ''),
},
}
},

2
zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-dev-zrb

@ -1,6 +1,6 @@
# 执法端测试环境
VITE_PORT = 12002
VITE_BASE_URL = '/api/enf-ep'
VITE_BASE_URL = '/efcode20-enf-app/api/enf-ep'
VITE_CONTEXT_PATH = '/efcode20-enf-app/'
VITE_PROXY_TARGET = 'http://localhost:17000'
VITE_DEFAULT_LOGIN = '/enforcement/loginByPassword'

4
zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-prod

@ -1,7 +1,7 @@
# 执法端生产环境
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_CONTEXT_PATH = '/efcode20-enf-app/'
VITE_DEFAULT_LOGIN = '/enforce/login'
VITE_DEFAULT_LOGIN = '/enforce/loginByPassword'
VITE_APP_ENV = 'prod'

4
zdxt-web-client/zdxt-efcode-enterprise-app/vite-config/index.js

@ -42,10 +42,10 @@ const baseCfg = (viteEnv = {}) => {
open: false,
cors: true,
proxy: {
'/api': {
'/efcode20-ent-app/api': {
target: VITE_PROXY_TARGET ||'http://139.186.148.21:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
rewrite: (path) => path.replace(/^\/efcode20-ent-app\/api/, ''),
configure: (proxy) => {
proxy.on('proxyReq', (proxyReq, req) => {
console.log(`[Proxy] ${req.method} ${req.url}${proxyReq.protocol}//${proxyReq.host}${proxyReq.path}`);

2
zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev-zrb

@ -1,7 +1,7 @@
# 企业端开发环境
VITE_PORT = 12001
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_DEFAULT_LOGIN = '/enterprise/loginByPassword'
VITE_APP_ENV = 'dev'

2
zdxt-web-client/zdxt-efcode-supervision-app/vite-env/.env.supervision-dev

@ -1,5 +1,5 @@
# 监督端开发环境
VITE_PORT = 12003
VITE_PORT = 12002
VITE_BASE_URL = '/api/sup-ep'
VITE_DEFAULT_LOGIN = '/supervision/login'
VITE_APP_ENV = 'dev'

2
zdxt-web-client/zdxt-efcode-supervision-app/vite-env/.env.supervision-prod

@ -1,5 +1,5 @@
# 监督端生产环境
VITE_PORT = 12003
VITE_PORT = 12002
VITE_BASE_URL = '/api/sup-ep'
VITE_DEFAULT_LOGIN = '/supervision/login'
VITE_APP_ENV = 'prod'

2
zdxt-web-server/zdxt-admin-web-server/src/main/resources/application-prod.yml

@ -96,7 +96,7 @@ spring:
spring.data:
redis:
# 地址
host: 10.76.108.1
host: 10.76.108.12
# 端口,默认为6379
port: 6379
# 数据库索引

Loading…
Cancel
Save