Big thanks to Graham Dumpleton and his project https://github.com/GrahamDumpleton/mod_wsgi. Feel free to share or modify it as you need. You might want to update Python version or wsgi_module variable to newer version once they become available.
- Centos / RedHat distro with sudo rights
- Ansible
sudo yum install epel-release
sudo yum install ansible
Simply run ansible playbook install.yaml
.
Please note the installation stops if Python version 3.7.3 is installed already.
ansible-playbook ./install.yaml
Remove all softlinks, folders and files created, restart Apache
To make sure the mod_wsgi is loaded, check the HTTP header Server
. Assuming your webserver runs at port 80
curl -s -I -X GET http://localhost | grep "Server:"
the output should contain wsgi_mod/
and Python/
with proper versions.
Server: Apache/2.4.6 (CentOS) mod_wsgi/4.6.5 Python/3.7 PHP/7.2.20
- Pre install check validates only if Python 3.7.3 is installed, but does not check
mod_wsgi
version - Limited OS support. PR welcome :)
- No ansible playbook for uninstall