Код: Выделить всё
import sys
sys.path.insert(0, '/home/ubuntu/dev/test')
from test import app as application
и в моем 000-default.conf у меня есть:
Код: Выделить всё
# RewriteEngine On
# RewriteCond %{HTTPS} !=on
# RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
# ServerName MY-SERVER
# Redirect permanent / https://MY-ADDRESS
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
WSGIDaemonProcess test threads=5
WSGIScriptAlias / /home/ubuntu/dev/test/test.wsgi
WSGIProcessGroup test
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Подробнее здесь: https://stackoverflow.com/questions/795 ... -wsgi-file