-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
39 lines (34 loc) · 883 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
upstream flask1 {
server 0.0.0.0:5000;
}
upstream flask2 {
server 0.0.0.0:5001;
}
server {
listen 48763 ;
server_name 0.0.0.0;
client_max_body_size 1024M;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
location / {
root /usr/src/app/frontend;
try_files $uri $uri/ @router;
index index.html;
}
location @router {
rewrite ^.*$ /index.html last;
}
location /api1/ {
proxy_pass http://flask1;
proxy_redirect off;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api2/ {
root /usr/src/app/backend;
index index.html;
include /etc/nginx/uwsgi_params;
uwsgi_pass flask2;
}
}