Answer the question
In order to leave comments, you need to log in
How to setup wsgi + gunicorn + nginx + django?
I'm building a website on the server.
The sitename/sitename/wsgi.py folder contains the standard code:
import os
from django.core.handlers.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sitename.settings")
application = get_wsgi_application()
import os, sys
import django.core.handlers.wsgi
os.environ['DJANGO_SETTINGS_MODULE'] = 'sitename.settings'
application = django.core.handlers.wsgi.WSGIHandler()
Answer the question
In order to leave comments, you need to log in
I was looking for the query "nginx uwsgi django" and found a really working instruction
blog.djangofan.ru/2014/01/django-uwsgi-nginx-ubunt ...
Where is the sitename.wsgi file from? I didn't have it initially.
/sitename/wsgi.py
gunicorn sitename.wsgi
must be run from the project folder where /sitename/ is located
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question