Answer the question
In order to leave comments, you need to log in
How to configure an Apache2 virtual host to work with Django 1.7 (mod_wsgi)?
I don't have enough knowledge to configure an Apache2 virtual host for Django 1.7. Created a project in directory:
/home/artem/atheme
---manage.py
/home/artem/atheme/mysite
---__init__.py
---settings.py
---urls.py
---wsgi.py
Like configure?
How to check if the setting is correct?
Answer the question
In order to leave comments, you need to log in
/etc/apache2/sites-available/api.conf:
WSGIScriptAlias / /var/www/api/api.wsgi
ServerName develop-api.dev
Alias /static /var/www/api/static
DocumentRoot /var/www/api
Order allow,deny
Allow from all
api.wsgi itself:
/var/www/api/api.wsgi
import os
import sys
sys.path = ['/var/www/api/'] + sys.path
os.environ['DJANGO_SETTINGS_MODULE '] = 'api.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question