Although there are literally hundreds of configuration examples online, I found it rather difficult to get my first Nginx, uWSGI, and Flask production environment up and running. Hopefully this overview will dumb it down enough for anyone that was having trouble, like I was.
So, first off, you’ll need to install Nginx. The code before is for Ubuntu 12.04 Precise. If you’re running another version of Ubuntu, you’ll need to change “precise” to your version. For example, 10.04 is “lucid”. More info on installing Nginx can be found at http://wiki.nginx.org/Install
Then, you’ll need to update your Nginx config. Mine is located at /etc/nginx/nginx.conf In this particular example, I’m redirecting all requests to https with Nginx.