How do I use python fastCGI on dreamhost?

vy32 asked:

I’ve been using CGI since 1996 or so, so it’s probably time to move to FastCGI or something else. (Flask?)

I’m using Dreamhost. I did some googling and found this article, but the article claims to be out of date and, sure enough, it doesn’t work.

One of the things I really like about CGI is being able to change the script and instantly see the results. I know that flask leaves a single Python script running and re-uses it, but as a result you need to modify some file to tell flask to re-read your Python file. That seems odd—why can’t flask see that the file has been modified? But I guess it makes sense for large programs that have literally hundreds of python includes.

Is FastCGI just not a thing anymore?

My answer:


FastCGI came and mostly went, too. PHP still uses a variant of it, known as FPM, but everyone else has moved on to language specific application servers that speak HTTP and are generally proxied from a web server that handles things like authentication and static files.

As for hot reloading, this is useful in development, but it really doesn’t matter in production, since you aren’t going to do it there.

As for Dreamhost, it looks like their currently supported method for deploying Python apps is with Passenger. I personally think that’s an odd choice, but I’m sure they have their reasons.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.