-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_basic.conf
executable file
·70 lines (58 loc) · 1.77 KB
/
nginx_basic.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
server {
listen 80;
client_max_body_size 20M;
client_body_buffer_size 20M;
add_header Access-Control-Allow-Origin *;
location /static_qed/ {
alias /src/collected_static/;
}
location /assets/ {
alias /src/collected_static/hms/webapp/assets/;
}
location /hms/assets/ {
alias /src/collected_static/hms/webapp/assets/;
}
location / {
try_files $uri @uwsgi_django;
}
location @uwsgi_django {
include uwsgi_params;
uwsgi_pass uwsgi_django:8080; # 'uwsgi_django' is the hostname given in Docker-Compose YAML 'links' section
proxy_read_timeout 600;
proxy_send_timeout 600;
uwsgi_read_timeout 600s;
uwsgi_send_timeout 600s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# HMS webapp static content routing:
#location /hms/webapp/ {
# autoindex on;
# alias /src/collected_static/hms/hms_webapp;
#}
#location /hms/webapp/assets/ {
# autoindex on;
# alias /src/collected_static/hms_webapp/assets;
#}
#location /hms/webapp/leaflet/ {
# autoindex on;
# alias /src/collected_static/hms_webapp/leaflet;
#}
}
# Flask back-end
server {
listen 7777;
client_max_body_size 20M;
client_body_buffer_size 20M;
location / {
try_files $uri @uwsgi_flask;
}
location @uwsgi_flask {
include uwsgi_params;
uwsgi_pass uwsgi_flask:8080; # 'uwsgi_flask' is the hostname given in Docker-Compose YAML 'links' section
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}