orztv commited on
Commit
410a11e
·
1 Parent(s): 20eb8b7
Files changed (1) hide show
  1. nginx.conf +16 -6
nginx.conf CHANGED
@@ -21,19 +21,29 @@ http {
21
 
22
  server {
23
  listen 7860;
24
-
25
- location /flask {
26
- rewrite ^/flask$ /flask/ permanent;
27
  proxy_pass http://127.0.0.1:6000/;
28
  proxy_set_header Host $host;
29
  proxy_set_header X-Real-IP $remote_addr;
30
  }
31
-
32
- location /node {
33
- rewrite ^/node$ /node/ permanent;
 
 
 
 
 
34
  proxy_pass http://127.0.0.1:7000/;
35
  proxy_set_header Host $host;
36
  proxy_set_header X-Real-IP $remote_addr;
37
  }
 
 
 
 
 
38
  }
39
  }
 
21
 
22
  server {
23
  listen 7860;
24
+
25
+ # Configuration for Flask application
26
+ location /flask/ {
27
  proxy_pass http://127.0.0.1:6000/;
28
  proxy_set_header Host $host;
29
  proxy_set_header X-Real-IP $remote_addr;
30
  }
31
+
32
+ # Redirect /flask to /flask/
33
+ location = /flask {
34
+ return 301 /flask/;
35
+ }
36
+
37
+ # Configuration for Node.js application
38
+ location /node/ {
39
  proxy_pass http://127.0.0.1:7000/;
40
  proxy_set_header Host $host;
41
  proxy_set_header X-Real-IP $remote_addr;
42
  }
43
+
44
+ # Redirect /node to /node/
45
+ location = /node {
46
+ return 301 /node/;
47
+ }
48
  }
49
  }