tags:

views:

226

answers:

1

Anybody know how to deploy a simple Flask application on Webfaction? I know Webfaction support mod_wsgi and I read the guide on the Flask site but still I can't make my app working. Anybody have a working configuration?

UPDATE to answer a comment by Graham Dumpleton.

I get a 500 Internal server error. Apache does not show any error in the logs. The WSGI script is executed and seems to create the application correctly, but I keep getting a 500 error.

Thanks.

A: 

You need to set up a "Custom app (listening on port)" application. Make a note of the port that is assigned. Then in your Flask code, you need to put hardcode the port:

if __name__ == __main__:
    app.run(host='0.0.0.0' port=XXXXXXX)

Where you substitute XXXXXXX with the port that is randomly assigned to your custom app.

Hope that helps.

JoshFinnie