title: Apache set-up with Flask and wsgi
body: <p>I have a small web application that I have built using Flask and python. With the internal server that I used for developing everything runs fine. However now I want to use apache to start using it. But it doesn`t work. Keep in mind that I have never worked with apache or web based stuff before. </p>
  
  <p>I used this guide as my starting point:
  <a href="http://flask.pocoo.org/docs/deploying/mod_wsgi/" rel="nofollow">http://flask.pocoo.org/docs/deploying/mod_wsgi/</a></p>
  
  <p>right now I have my application which is in the file called "/rg/server.py" and looks like this:</p>
  
  <pre><code>app=Flask(__name__)
  # all app routes...
  
  if __name__ == '__main__':
      app.run(
          debug=True,
          host="127.0.0.1",
          port=80
      )
  </code></pre>
  
  <p>than I have a wsgi file as "/rg/wsgi/minerva.wsgi"</p>
  
  <pre><code>import sys
  sys.path.insert(0, /rg)
  from server import app as minerva
  </code></pre>
  
  <p>and finally I have an apache config file in "etc/apach2/sites-available/minerva.com":</p>
  
  <pre><code>&lt;VirtualHost *&gt;
      ServerName minerva.test
  
      WSGIDaemonProcess minerva threads=10
      WSGIScriptAlias / /rg/wsgi/minerva.wsgi
  
      &lt;Directory /rg&gt;
      WSGIProcessGroup minerva
      WSGIApplicationGroup %{GLOBAL}
      Order deny,allow
      Allow from all
      &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Then I updated apache with a2ensite minerva.com which succeded. Then I releaded Apache and no errors. However I cannot acces minerva.test in any way...</p>
  
  <p>If I type in apache2ctl -S it does list minerva.test</p>
  
  <p>I have no idea what is going wrong...</p>
  
  <p>system information:
  OS: debian 64bit
  python 2.7</p>