RuoYi 3 anni fa
parent
commit
56d50d10e9
2 ha cambiato i file con 18 aggiunte e 13 eliminazioni
  1. 2 2
      docker/copy.sh
  2. 16 11
      docker/nginx/conf/nginx.conf

+ 2 - 2
docker/copy.sh

@@ -9,8 +9,8 @@ usage() {
9 9
 
10 10
 # copy sql
11 11
 echo "begin copy sql "
12
-cp ../sql/ry_20220814.sql ./mysql/db
13
-cp ../sql/ry_config_20220510.sql ./mysql/db
12
+cp ../sql/ry_20230223.sql ./mysql/db
13
+cp ../sql/ry_config_20220929.sql ./mysql/db
14 14
 
15 15
 # copy html
16 16
 echo "begin copy html "

+ 16 - 11
docker/nginx/conf/nginx.conf

@@ -14,23 +14,28 @@ http {
14 14
         listen       80;
15 15
         server_name  localhost;
16 16
 
17
-		location / {
17
+        location / {
18 18
             root   /home/ruoyi/projects/ruoyi-ui;
19
-			try_files $uri $uri/ /index.html;
19
+            try_files $uri $uri/ /index.html;
20 20
             index  index.html index.htm;
21 21
         }
22
-		
23
-		location /prod-api/{
24
-			proxy_set_header Host $http_host;
25
-			proxy_set_header X-Real-IP $remote_addr;
26
-			proxy_set_header REMOTE-HOST $remote_addr;
27
-			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
28
-			proxy_pass http://ruoyi-gateway:8080/;
29
-		}
22
+
23
+        location /prod-api/{
24
+            proxy_set_header Host $http_host;
25
+            proxy_set_header X-Real-IP $remote_addr;
26
+            proxy_set_header REMOTE-HOST $remote_addr;
27
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
28
+            proxy_pass http://ruoyi-gateway:8080/;
29
+        }
30
+
31
+        # 避免actuator暴露
32
+        if ($request_uri ~ "/actuator") {
33
+            return 403;
34
+        }
30 35
 
31 36
         error_page   500 502 503 504  /50x.html;
32 37
         location = /50x.html {
33 38
             root   html;
34 39
         }
35 40
     }
36
-}# requirepass 123456
41
+}