/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:
/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()