Problems with deploying flask WSGI application on apache2 Problems with deploying flask WSGI application on apache2 flask flask

Problems with deploying flask WSGI application on apache2


Generally want:

WSGIScriptAlias /flask_test/ /var/www/flask_test/flask_test.wsgi

No trailing slash on the mount point for a sub URL.

Worse is that you have:

Deny from all

So you are explicitly telling Apache to return forbidden.

You should have:

Allow from all

in that context.


The problem was in .wsgi file.I didn't import the app object correctly. Basically you want to make sure that app object is imported as application in your wsgi. For example from flask_test import app as application