blob: 27a24aebce0478631d60831f83d256b3165f3738 (
plain)
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
|
server {
listen #NGINX_PORT#;
listen [::]:#NGINX_PORT#;
server_name #URL#;
root #INSTALL_PATH#;
access_log /var/log/django/#APP_NAME#-access.log;
error_log /var/log/django/#APP_NAME#-error.log;
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/rss+xml image/svg+xml;
# if you change client_max_body_size do not forget to change it also
# to your corresponding local_settings.py file
client_max_body_size #MAX_UPLOAD_SIZE#M;
location /static/ { # STATIC_URL
alias #INSTALL_PATH#/#APP_NAME#/static/; # STATIC_ROOT
expires 30d;
}
location /media/ { # MEDIA_URL
alias #INSTALL_PATH#/#APP_NAME#/media/; # MEDIA_ROOT
expires 30d;
}
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:#UWSGI_PORT#;
uwsgi_read_timeout 1800;
uwsgi_send_timeout 600;
}
}
|