-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathisard.conf
83 lines (65 loc) · 2.12 KB
/
isard.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
71
72
73
74
75
76
77
78
79
80
81
82
upstream isard-fe {
server isard-webapp:5000 fail_timeout=0;
}
server {
listen 80;
server_name isard.local;
return 301 https://$server_name$request_uri;
}
server {
listen 443;
ssl on;
ssl_certificate "/etc/nginx/external/cert.pem";
ssl_certificate_key "/etc/nginx/external/key.pem";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
server_name isard.local;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
client_max_body_size 1500M;
#root /;
#location /static/ {
# root /usr/local/src/isard/webapp/static/;
#}
location ~ /stream {
proxy_pass http://isard-webapp:5000;
proxy_buffering off;
proxy_cache off;
access_log /var/log/nginx/eventsource_stream.access.log;
error_page 504 =200 @isard-fe-close-graceful;
proxy_set_header Connection '';
chunked_transfer_encoding off;
proxy_http_version 1.1;
}
location @isard-fe-close-graceful {
add_header Content-Type text/event-stream;
return 200;
}
location /socket.io {
proxy_pass http://isard-webapp:5000/socket.io;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Websockets support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
tcp_nodelay on;
}
location / {
proxy_pass http://isard-webapp:5000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header REMOTE_ADDR $remote_addr;
}
location /admin/media {
proxy_pass http://isard-webapp:5000;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header REMOTE_ADDR $remote_addr;
client_max_body_size 10000M;
}
}