Python Flask App

Deploy Flask App with Apache

This required a lot of configuration to work with WSGI, but I finally made it work for the tlom project while working at Revi North and it was very stable in the end. However, Flask isn’t so great because you’re writing html with Python, then serving the html, which javascript is much better at.

sudo apt install libapache2-mod-wsgi-py3

sudo a2enmod wsgi

Disable apache2:

sudo update-rc.d apache2 disable

sudo update-rc.d apache2 enable

sudo service apache2 restart

sudo service apache2 start

sudo service apache2 stop

Serve a Flask App from Ubuntu Apache Server with WSGI
sudo apt-get install libapache2-mod-wsgi-py3

Put the files you have been using to dev in

/var/www/app_name