miaofuhao 3 周之前
父节点
当前提交
928a0810ba
共有 6 个文件被更改,包括 269 次插入2 次删除
  1. 二进制
      bigScreen3/12151big.zip
  2. 111 0
      nginx copy.conf
  3. 156 0
      nginx.conf
  4. 1 1
      web/.env.development
  5. 1 1
      web/.env.production
  6. 二进制
      web/12151dist.zip

二进制
bigScreen3/12151big.zip


+ 111 - 0
nginx copy.conf

1
+user root;
2
+worker_processes auto;
3
+pid /run/nginx.pid;
4
+include /etc/nginx/modules-enabled/*.conf;
5
+
6
+events {
7
+	worker_connections 768;
8
+	# multi_accept on;
9
+}
10
+
11
+http {
12
+
13
+	##
14
+	# Basic Settings
15
+	##
16
+
17
+	sendfile on;
18
+	tcp_nopush on;
19
+	tcp_nodelay on;
20
+	keepalive_timeout 65;
21
+	types_hash_max_size 2048;
22
+	# server_tokens off;
23
+
24
+	# server_names_hash_bucket_size 64;
25
+	# server_name_in_redirect off;
26
+
27
+	include /etc/nginx/mime.types;
28
+	default_type application/octet-stream;
29
+
30
+	##
31
+	# SSL Settings
32
+	##
33
+
34
+	ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
35
+	ssl_prefer_server_ciphers on;
36
+
37
+	##
38
+	# Logging Settings
39
+	##
40
+
41
+	access_log /var/log/nginx/access.log;
42
+	error_log /var/log/nginx/error.log;
43
+
44
+	##
45
+	# Gzip Settings
46
+	##
47
+
48
+	gzip on;
49
+	# 大屏应用配置
50
+    server {
51
+        listen 9998;
52
+        server_name 47.93.202.126;
53
+        
54
+        # location = /bigScreen {
55
+        #     return 302 $scheme://$http_host/bigScreen/;
56
+        # }
57
+
58
+        # 后台应用
59
+        location / {
60
+            alias /home/website/zlzh/bigScreen/dist/;
61
+            index index.html;
62
+            try_files $uri $uri/ /bg/index.html;
63
+            
64
+        }
65
+        
66
+
67
+
68
+        # API代理配置
69
+        location /api {
70
+            # 这里需要替换为你的实际API服务器地址
71
+            proxy_pass http://127.0.0.1:8080;  # 请修改为你的API服务器地址
72
+            proxy_set_header Host $host;
73
+            proxy_set_header X-Real-IP $remote_addr;
74
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
75
+            proxy_set_header X-Forwarded-Proto $scheme;
76
+            
77
+            # 代理超时设置
78
+            proxy_connect_timeout 60s;
79
+            proxy_send_timeout 60s;
80
+            proxy_read_timeout 60s;
81
+            
82
+            # WebSocket支持(如果需要)
83
+            proxy_http_version 1.1;
84
+            proxy_set_header Upgrade $http_upgrade;
85
+            proxy_set_header Connection "upgrade";
86
+        }
87
+    
88
+    }
89
+
90
+    server {
91
+        listen 9988;
92
+        server_name 47.93.202.126;
93
+        
94
+        # location = /bigScreen {
95
+        #     return 302 $scheme://$http_host/bigScreen/;
96
+        # }
97
+        
98
+        # 后台应用
99
+        location / {
100
+            alias /home/website/zlzh/web/dist/;
101
+            index index.html;
102
+            try_files $uri $uri/ /index.html;
103
+            
104
+        }
105
+    
106
+    }
107
+
108
+	include /etc/nginx/conf.d/*.conf;
109
+	include /etc/nginx/sites-enabled/*;
110
+}
111
+

+ 156 - 0
nginx.conf

1
+user root;
2
+worker_processes auto;
3
+pid /run/nginx.pid;
4
+include /etc/nginx/modules-enabled/*.conf;
5
+
6
+events {
7
+	worker_connections 768;
8
+	# multi_accept on;
9
+}
10
+
11
+http {
12
+
13
+	##
14
+	# Basic Settings
15
+	##
16
+
17
+	sendfile on;
18
+	tcp_nopush on;
19
+	tcp_nodelay on;
20
+	keepalive_timeout 65;
21
+	types_hash_max_size 2048;
22
+	# server_tokens off;
23
+
24
+	# server_names_hash_bucket_size 64;
25
+	# server_name_in_redirect off;
26
+
27
+	include /etc/nginx/mime.types;
28
+	default_type application/octet-stream;
29
+
30
+	##
31
+	# SSL Settings
32
+	##
33
+
34
+	ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
35
+	ssl_prefer_server_ciphers on;
36
+
37
+	##
38
+	# Logging Settings
39
+	##
40
+
41
+	access_log /var/log/nginx/access.log;
42
+	error_log /var/log/nginx/error.log;
43
+
44
+	##
45
+	# Gzip Settings
46
+	##
47
+
48
+	gzip on;
49
+	# 大屏应用配置
50
+server {
51
+    listen 9998;
52
+    server_name 47.93.202.126;
53
+    
54
+    # location = /bigScreen {
55
+    #     return 302 $scheme://$http_host/bigScreen/;
56
+    # }
57
+    
58
+    location /bigScreen/ {
59
+        alias /home/website/zlzh/bigScreen/dist/;
60
+        try_files $uri $uri/ /index.html;
61
+        
62
+        # 静态文件缓存
63
+        location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
64
+            expires 1y;
65
+            add_header Cache-Control "public, immutable";
66
+        }
67
+    }
68
+
69
+     # API代理配置
70
+    location /api {
71
+        # 这里需要替换为你的实际API服务器地址
72
+        proxy_pass http://127.0.0.1:8080;  # 请修改为你的API服务器地址
73
+        proxy_set_header Host $host;
74
+        proxy_set_header X-Real-IP $remote_addr;
75
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
76
+        proxy_set_header X-Forwarded-Proto $scheme;
77
+        
78
+        # 代理超时设置
79
+        proxy_connect_timeout 60s;
80
+        proxy_send_timeout 60s;
81
+        proxy_read_timeout 60s;
82
+        
83
+        # WebSocket支持(如果需要)
84
+        proxy_http_version 1.1;
85
+        proxy_set_header Upgrade $http_upgrade;
86
+        proxy_set_header Connection "upgrade";
87
+    }
88
+    
89
+    # Web应用配置(根目录)
90
+    location / {
91
+        root /home/website/zlzh/web/dist;
92
+        try_files $uri $uri/ /index.html;
93
+        
94
+        # 静态文件缓存
95
+        location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
96
+            expires 1y;
97
+            add_header Cache-Control "public, immutable";
98
+        }
99
+    }
100
+}
101
+
102
+# Web应用和API配置
103
+server {
104
+    listen 10000;
105
+    server_name zhyh.hnyulin.com;
106
+    
107
+    # API代理配置
108
+    location /api {
109
+        # 这里需要替换为你的实际API服务器地址
110
+        proxy_pass http://127.0.0.1:8080;  # 请修改为你的API服务器地址
111
+        proxy_set_header Host $host;
112
+        proxy_set_header X-Real-IP $remote_addr;
113
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
114
+        proxy_set_header X-Forwarded-Proto $scheme;
115
+        
116
+        # 代理超时设置
117
+        proxy_connect_timeout 60s;
118
+        proxy_send_timeout 60s;
119
+        proxy_read_timeout 60s;
120
+        
121
+        # WebSocket支持(如果需要)
122
+        proxy_http_version 1.1;
123
+        proxy_set_header Upgrade $http_upgrade;
124
+        proxy_set_header Connection "upgrade";
125
+    }
126
+    
127
+    # Web应用配置(根目录)
128
+    location / {
129
+        root /home/website/zlzh/web;
130
+        try_files $uri $uri/ /index.html;
131
+        
132
+        # 静态文件缓存
133
+        location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
134
+            expires 1y;
135
+            add_header Cache-Control "public, immutable";
136
+        }
137
+    }
138
+    
139
+    # 通用配置
140
+    # access_log /var/log/nginx/zhyh_access.log main;
141
+    # error_log /var/log/nginx/zhyh_error.log notice;
142
+    
143
+    # 客户端限制
144
+    client_max_body_size 100M;
145
+    
146
+    # 禁止访问隐藏文件
147
+    location ~ /\. {
148
+        deny all;
149
+    }
150
+}
151
+
152
+
153
+	include /etc/nginx/conf.d/*.conf;
154
+	include /etc/nginx/sites-enabled/*;
155
+}
156
+

+ 1 - 1
web/.env.development

2
 
2
 
3
 # 接口地址104  110 http://222.143.135.71:29092 http://127.0.0.1:9090http://215y970n20.iask.in:15091 http://36.133.40.34:9091    
3
 # 接口地址104  110 http://222.143.135.71:29092 http://127.0.0.1:9090http://215y970n20.iask.in:15091 http://36.133.40.34:9091    
4
 # VUE_APP_BASE_API  = 'http://192.168.1.15:9090/'    http://39.164.159.226:9090/    http://zhyh.hnyulin.com/api/
4
 # VUE_APP_BASE_API  = 'http://192.168.1.15:9090/'    http://39.164.159.226:9090/    http://zhyh.hnyulin.com/api/
5
-VUE_APP_BASE_API  = http://192.168.1.15:9090/
5
+VUE_APP_BASE_API  = http://zhyh.hnyulin.com/api/
6
 VUE_APP_WS_API = 'http://222.143.133.238:29092'
6
 VUE_APP_WS_API = 'http://222.143.133.238:29092'
7
 
7
 
8
 # VUE_APP_BASE_API  = 'http://127.0.0.1:9090'
8
 # VUE_APP_BASE_API  = 'http://127.0.0.1:9090'

+ 1 - 1
web/.env.production

3
 # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
3
 # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
4
 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http  http://222.143.135.71:29092   http://192.168.1.15:9090/
4
 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http  http://222.143.135.71:29092   http://192.168.1.15:9090/
5
 # VUE_APP_BASE_API  = 'http://zhyh.hnyulin.com/api/'
5
 # VUE_APP_BASE_API  = 'http://zhyh.hnyulin.com/api/'
6
-VUE_APP_BASE_API = http://192.168.1.15:9090/
6
+VUE_APP_BASE_API = http://zhyh.hnyulin.com/api/
7
 # 如果接口是 http 形式, wss 需要改为 ws
7
 # 如果接口是 http 形式, wss 需要改为 ws
8
 VUE_APP_WS_API = 'http://192.168.1.15:9090/'
8
 VUE_APP_WS_API = 'http://192.168.1.15:9090/'

二进制
web/12151dist.zip