python - How deploy Flask application on Webfaction? -


Anyone know how to deploy a simple flask application on webfication? I know webfaction support mod_wsgi and I have read the guide on the flask site, but still I can not work my app.

UPDATE to respond to a comment by Graham Dumpton

I get 500 internal server errors. Apache does not show any errors in the log WSGI script has been executed and this application is being prepared correctly, but I am getting 500 errors.

Thank you.

I am working with the following process:

  • Create and app type 'myapp' mod_wsgi 3.3 / Python 2.7 webfine will create the following folders:

      myapp | - apache2 | - htdocs  
  • Webfissions will also automatically create a simple script index.py your htdocs directory In. Check if the sample script works by going to the root of your newly created application (you need to "mount" on the website to slim on webfunction) If this is all right, then scripts Modify:

    application
  • in apache2 / conf / httpd Conf add the follwing lines:

      WSGIPythonPath / home / username / webapps / MyApp / htdocs / #if Sore instruction applications do not specify * work, but you will index.py #See in the way all subdir WSGIScriptAlias ​​/ /home/username/webapps/myapp/htdocs/index.py & LT; Directory / home / user name / webapps / myApp / htdocs & gt; AddHandler wsgi-scripts. Retrieval on PureRENEngine / WSGIScriptReloading at & lt; / Directory & gt;  
  • Restart Apache 2


Comments