I am having an issue deploying a flask app on apache2 using wsgi. I guess i have already tried every solution proposed on this site, but nothing has helped. Every input or suggestions are appreciated.
Here are my files and logs
apache conf
WSGIScriptAlias /wsgi D:/microblog/test/wsgi.py
<Directory D:/microblog/test>
AllowOverride None
Options None
Order deny,allow
Allow from all
</Directory>
wsgi.py
import sys
from test import app as application
sys.path.insert(0, 'D:/microblog/test')
_init_.py
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
import sys
app = Flask(__name__)
app.config.from_pyfile("app_config.py")
app.debug = True
@app.route('/')
def hello_world():
return "hi"
app.run()
apache log
[Wed Apr 09 09:52:27 2014] [error] [client 127.0.0.1] mod_wsgi (pid=3368):
Exception occurred processing WSGI script 'D:/microblog/test/wsgi.py'.
[Wed Apr 09 09:52:27 2014] [error] [client 127.0.0.1] Traceback (most recent call last):
[Wed Apr 09 09:52:27 2014] [error] [client 127.0.0.1] File "D://microblog/test/wsgi.py", line 2, in <module>
[Wed Apr 09 09:52:27 2014] [error] [client 127.0.0.1] from test import app as application
[Wed Apr 09 09:52:27 2014] [error] [client 127.0.0.1] ImportError: cannot import name app
thanks!