Skip to content

Latest commit

 

History

History
45 lines (39 loc) · 1.12 KB

README.md

File metadata and controls

45 lines (39 loc) · 1.12 KB

Flask Web Application

This is an example flask web application for ubuntu server

Installation for server configuration

sudo apt-get -y install apache2 apache2-dev
unzip mod_wsgi*.zip
cd mod_wsgi*
which python3
./configure --with-python='insert_python3_path_without_quote'
sudo make && sudo make install

Configuration for Apache2 conf file

Append these configuration after DocumentRoot line of /etc/apache2/sites-enabled/000-default.conf file

WSGIDaemonProcess flaskapp threads=5
WSGIScriptAlias / /var/www/html/rsbpi_flask/flaskapp.wsgi
<Directory flaskapp>
    WSGIProcessGroup flaskapp
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
</Directory>

Download the Flask App and Configure for Apache2

git clone https://github.com/chuuhtetnaing/rsbpi_flask.git
sudo ln -sT ./rsbpi_flask /var/www/html/rsbpi_flask
cd rsbpi_flask
virtualenv --python=python3 venv
source venv/bin/activate
pip install -r requirements.txt

Restart the Apache server

sudo service apache2 restart