-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx_production.conf
72 lines (54 loc) · 1.63 KB
/
nginx_production.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
upstream pzapi {
server backend:8000;
}
upstream pzfrontend {
server frontend:3000;
}
server {
listen 8080;
client_max_body_size 200M;
charset utf-8;
gzip on;
gzip_comp_level 9;
gzip_min_length 128;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css application/json application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
proxy_send_timeout 120s;
proxy_read_timeout 120s;
fastcgi_send_timeout 120s;
fastcgi_read_timeout 120s;
# access_log /var/log/nginx/host.access.log main;
# Proxy pass to frontend development server with live relead
# Based in this article: https://nathanfriend.io/2018/05/14/live-reloading-an-angular-2-app-behind-nginx.html
location / {
proxy_pass http://pzfrontend;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
# live reload
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_cache_bypass $http_upgrade;
}
location /api {
include uwsgi_params;
uwsgi_pass pzapi;
}
location /admin {
include uwsgi_params;
uwsgi_pass pzapi;
}
location /django_static {
include uwsgi_params;
uwsgi_pass pzapi;
}
location /archive/data {
alias /var/www/data/;
try_files $uri $uri/ /index.html;
autoindex off;
}
location /saml2 {
include uwsgi_params;
uwsgi_pass pzapi;
}
}