где конфиги? почему не связка nginx + uwsgi + supervisor? по моему тут проще некуда.
Ставим uwsgi: sudo pip install uwsgi
Ставим supervisor: sudo apt-get install supervisor
создаем .env в директории в корне проекта командой: virtualenv .env
source .env/bin/activate
ставим зависимости вашего проекта
pip install -r requirements.txt
File: /etc/supervisor/conf.d/yoursite.conf
[program:yoursite]
command=uwsgi --ini /etc/uwsgi.ini
autostart=true
autorestart=true
stderr_logfile = /tmp/uwsgi-err.log
stdout_logfile = /tmp/uwsgi.log
File: /etc/uwsgi.ini
[uwsgi]
chdir = /home/projectroot
wsgi-file = /home/projectroot/wsgi.py
home = /home/projectroot/.env
logto = /var/log/uwsgi.log
master = true
processes = 10
socket = /tmp/yoursite.sock
vacuum = true
touch-reload = /tmp/yoursite.reload
File: /etc/nginx/sites-enabled/yoursite.conf
server {
listen 80;
server_name yoursite.com;
access_log /home/var/log/nginx/yoursite.nginx.access.log;
error_log /home/var/log/nginx/yoursite.nginx.error.log;
location / {
uwsgi_pass unix:///tmp/yoursite.sock;
include uwsgi_params;
}
location /static/ {
alias /home/yoursite/assets/;
}
}
перезагружаемся: sudo /etc/init.d/nginx/restart
sudo supervisorctl reload
sudo supervisorctl restart yoursite