Notes on Deploying a Production Flask App to an Ubuntu Virtual Server Running Apache2 on DigitalOcean

Unfortunately I broke my Linux/Apache/MySQL/Python-Flask app last night. I simply wanted to change the name of the directories from FlaskApp to the name of my latest project, and also wanted to change the main python file from flaskapp.py to something more like my_latest_project.py. I figured this would be fairly easy, just change the Apache configuration file, restart Apache, and I should be good to go. Well, I was wrong! And now everything is broken and I either need to spin up and configure a new virtual server instance, or accept the file structure and naming conventions of the generic server image that I already have. So I just wanted to bookmark a few blog posts here for my own personal reference regarding setting up Python/Flask on an Ubuntu Virtual Server running Apache:

How To Deploy a Flask Application on an Ubuntu VPS

mod_wsgi (Apache)

 

topherPedersen