title: flask app only shows list of files with apache2
body: <p>Im trying to host a flask app with an apache2 server. The server works but I'm only seeing a list of files, the wonderful "index of" page. My code is pretty simple. This is my hello.py file in /var/www/flask_dev:</p>
  
  <pre><code>from flask import Flask
  app = Flask(__name__)
  
  @app.route('/')
  def hello_world():
  return 'Hello World!'
  
  if __name__ == '__main__':
      app.run(host='0.0.0.0')
  </code></pre>
  
  <p>I also created an apache config file located in /etc/apache2/sites-available/flask_dev.conf:</p>
  
  <pre><code>ServerName example.com
  
  &lt;VirtualHost *:80&gt;
  
          ServerAdmin webmaster@localhost
          WSGIDaemonProcess hello user=www-data group=www-data threads=5     python-path=/var/www/flask_dev
          WSGIScriptAlias / /var/www/flask_dev/start.wsgi
          &lt;Directory /var/www/flask_dev&gt;
                  WSGIProcessGroup hello
                  WSGIApplicationGroup %{GLOBAL}
                  Options Indexes FollowSymLinks
                  AllowOverride None
                  Require all granted
          &lt;/Directory&gt;
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>And the needed wsgi file also located in /var/www/flask_dev/start.wsgi:</p>
  
  <pre><code>from hello import app as application
  
  import sys
  sys.stdout = sys.stderr
  </code></pre>
  
  <p>I'm not sure what I did wrong, I just followed a simple tutorial.</p>
  
  <p>Thanks for your help :)</p>