43 lines
810 B
Nginx Configuration File
43 lines
810 B
Nginx Configuration File
upstream django {
|
|
server 127.0.0.1:8001;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name crm-poizonstore.ru;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
set $APP_HOME /var/www/phzhik-poizonstore;
|
|
|
|
listen 443 ssl;
|
|
server_name crm-poizonstore.ru;
|
|
charset utf-8;
|
|
|
|
# === Add here SSL config ===
|
|
|
|
# max upload size
|
|
client_max_body_size 75M; # adjust to taste
|
|
|
|
# Django media
|
|
location /media {
|
|
autoindex on;
|
|
alias $APP_HOME/media;
|
|
}
|
|
|
|
location /static {
|
|
autoindex on;
|
|
alias $APP_HOME/assets;
|
|
}
|
|
|
|
location / {
|
|
uwsgi_pass django;
|
|
uwsgi_read_timeout 300;
|
|
keepalive_timeout 70;
|
|
proxy_read_timeout 1200s;
|
|
|
|
include /etc/nginx/uwsgi_params;
|
|
include /etc/nginx/proxy_params;
|
|
}
|
|
} |