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