orztv commited on
Commit
f2ef0bf
·
1 Parent(s): b9bc096
Files changed (1) hide show
  1. nginx.conf +6 -9
nginx.conf CHANGED
@@ -24,26 +24,23 @@ http {
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
  }
 
24
 
25
  # Configuration for Flask application
26
  location /flask {
27
+ rewrite ^/flask$ /flask/ permanent;
28
  proxy_pass http://127.0.0.1:6000/;
29
  proxy_set_header Host $host;
30
  proxy_set_header X-Real-IP $remote_addr;
31
  }
32
 
 
 
 
 
 
33
  # Configuration for Node.js application
34
+ location /node {
35
+ rewrite ^/node$ /node/ permanent;
36
  proxy_pass http://127.0.0.1:7000/;
37
  proxy_set_header Host $host;
38
  proxy_set_header X-Real-IP $remote_addr;
39
  }
40
 
41
+ # Redirect root to /flask
42
+ location = / {
43
+ return 302 /flask;
44
  }
45
  }
46
  }