Trying to configure apache with mod_wsgi and Python3
mod_wsgi config
LoadModule wsgi_module /etc/httpd/mod_wsgi/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
Flask App config
WSGIScriptAlias /test /var/www/FlaskApp/FlaskApp/flask_app.wsgi <Directory /var/www/FlaskApp/FlaskApp/> # set permissions as per apache2.conf file Options FollowSymLinks AllowOverride None Require all granted </Directory> ErrorLog /var/log/httpd/error.log LogLevel warn CustomLog /var/log/httpd/access.log combined
I installed mod_wsgi for Python3 using pip3 install mod_wsgi4.6.7.tar.gz.
mod_wsgi.so for Python2.7 works but for Python3.6.6 it ignores the loadmodule directive.
The above is to setup a Flask application that will handle restapi.