I have a file manage.py,
import os
from app import create_app
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
if __name__ == '__main__':
app.run()
manage.py is working fine when tested in debug mode. However, I'm not able to host it on apache.
my wsgi file: start.wsgi
from manage import app as application
import sys
sys.stdout = sys.stderr
virtual host:
<VirtualHost *:80>
ServerName domain.com
WSGIDaemonProcess manage user=user group=user threads=5
WSGIScriptAlias / /var/www/apioflifeapp/app/start.wsgi
<Directory /var/www/apioflifeapp/app>
Require all granted
Options all
AllowOverride all
Allow from all
</Directory>
</VirtualHost>
error in error log
[Sat Feb 21 10:55:47.329450 2015] [:error] [pid 25422] [client 197.226.128.204:56062] File "/var/www/apioflifeapp/app/start.wsgi", line 1, in <module>
[Sat Feb 21 10:55:47.329601 2015] [:error] [pid 25422] [client 197.226.128.204:56062] from manage import app as application
[Sat Feb 21 10:55:47.329624 2015] [:error] [pid 25422] [client 197.226.128.204:56062] ImportError: No module named manage
i'm not understanding why i'm getting the import error
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…