Flask hello world using apache and mod_wsgi shows files in webroot only Flask hello world using apache and mod_wsgi shows files in webroot only flask flask

Flask hello world using apache and mod_wsgi shows files in webroot only


in /var/www/flask_dev/hello.wsgi you should be importing app not ass.Second you should not be using DocumentRoot to store your scripts. DocumentRoot is for storing static files and so it will certainly list them as files and never run them as script.

Try using

    WSGIScriptAlias / /var/www/flask_dev/hello.wsgi    <Directory "/var/www/flask_dev">       WSGIProcessGroup hello       WSGIApplicationGroup %{GLOBAL}       Order deny,allow       Allow from all    </Directory>

Check this page.