Deploying Python3 Flask App On Apache 2 (Fedora 35 Server)
A python flask app runs on a Werkzeug’s server during development, by default, but it is highly recommended to use another web server when deploying to a production environment. The two major options available are Nginx and Apache.
Since I’m more familiar with the apache web server on fedora, here’s the way to setup the server and deploy a flask app.
There are two ways for doing this, one by installing the wsgi module in apache, then configuring it, while the other method installs the wsgi module via pip, so it’s installed inside your python environment.
I’ll go with the first method, here. [more on the subject can be found in the mod_wsgi — mod_wsgi 4.9.0 documentation]
Continue…