-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
29 lines (24 loc) · 686 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
upstream django {
server unix:/app/app.sock; # for a file socket
}
server {
listen 80 default;
listen [::]:80 default;
server_name _;
charset utf-8;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
gzip on;
gzip_proxied any;
gzip_types application/javascript application/x-javascript application/json text/css;
location /static/ {
alias /app/static/;
}
location / {
uwsgi_pass django;
include /app/uwsgi_params; # the uwsgi_params file you installed
uwsgi_read_timeout 300;
}
}