Answer the question
In order to leave comments, you need to log in
How to fix FATAL Exited too quickly error when deploying Django to VDS?
Guys! Help django noob please.. Stuck for a day on this problem (which is not googled yet). System: Debian 8x64, CPU core 1 pc., RAM 2 GB. Python 3.4 + Django 1.10.x.
I do everything according to this manual: djbook.ru/examples/62 (one to one, step by step), but at the moment with the launch of supervisorctl, this comes out:
myproject FATAL Exited too quickly (process log may have details)
I tried to restart VDS and again (fortunately a clean test server) from scratch the OS rolled and repeated according to that manual, but one fig .. exactly the same phrase is written in the logs.
Help me please! Maybe there is another way to run on VDS (other than uWSGI)? I would like to try to deploy it on the web, and not just drive it on the LAN.
Answer the question
In order to leave comments, you need to log in
This tutorial helped: https://www.digitalocean.com/community/tutorials/h...
Try to start without a supervisor - nginx, your Django project. Proxy the request from nginx to port 8000 of the local djanga server. This is the first iteration.
Then screw on the gunicorn. Now nginx will proxy requests to gunicorn, and it will run your project. This is the second iteration.
Then supervisor. Now the supervisor will pick up the gunicorn from under him, nginx works offline. For a start, this is enough for you.
nginx:
server {
listen 80;
server_name example.com; #либо ip, либо доменное имя
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
python manage.py runserver
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question