I am developing a django project in the instantiate (droplet) in which is created ubuntu server 14.04 + django.
far so good, but when configuring the instance with virtualenv as the documentation says http://gunicorn-docs.readthedocs.org/en/latest/deploy.html#using-virtualenv the virtualenv is not recognized because when installing an app (with pip installer) eg “django framework rest” this is not recognized and throws 500 error since there is no such app.
I was also seeing this post https://www.digitalocean.com/community/questions/usinv-virtualenv-in-django-image in which mention the modification of the configuration file in which you must assign the address of the new gunicorn that is created in the virtualenv but at the time of the service restart it throws an error 502: /
/* structure directory*/ /home/django /myproject (django) /envs/myapp (virtualenvs) /* Gunicorn file */ description "Gunicorn daemon for Django project" start on (local-filesystems and net-device-up IFACE=eth0) stop on runlevel [!12345] respawn setuid django setgid django chdir /home/django exec gunicorn \ (**Here is where you change the url and gave 502 error) --name=myproject \ --pythonpath=myproject \ --bind=0.0.0.0:9000 \ --config /etc/gunicorn.d/gunicorn.py \ conf.wsgi:application
have no idea why this situation? someone been in a situation like that can help me to solve this problem.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.