Setting up the Apache WSGI module on OSX 10.9

Last month I posted a blog article called Running a Flask application under the Apache WSGI module. I detailed all the steps when running on a typical Ubuntu/Debian machine. Today however, I thought I’d try and do the same setup on my mac. There were a few gotchas, which is why I’m writing this. As with most things Mac, I can’t promise this as a guide for everyone, just it worked for me and hopefully it will for you.

Ok, so before I get started, I’ve only performed this setup on OS X 10.9.4, one of the problems I had, was not a problem in versions prior to OS X 10.8. However if you’re that out of date, you might want to upgrade anyway.

Continue reading

Running a Flask application under the Apache WSGI module

Python is a fantastic programming language and Flask is an equally fantastic micro framework for Python… at least as far as I can tell from my experiences so far. However, as I’m sure you are already aware, Python just like Ruby, is not a native web language, like PHP is. So to get your Python code running on a production web server can be tricky.

The Flask website does detail ways of getting your code deployed on Apache, CGI, Fast CGI and multiple standalone WSGI containers. However I found the Flask documentation to be incomplete and not very helpful. Clearly from the amount of complaints on stack overflow, I’m not the only one. So today I’m focusing on deploying to an Apache server, for all you lovely people.

Continue reading