- Plesk for Linux
It is not possible to execute Python scripts on a server with CentOS 7/RHEL 7/CloudLinux 7. There is no option Python support in Plesk > Domains > example.com > Hosting Settings.
Python modules for Apache are no longer supported by
project according to the Apache official website.
Note: Since python officially not supported by CentOS 7/RHEL 7/CloudLinux 7 OSes, we cannot guarantee the stability of this workaround.
Log into the server via SSH.
Install mod_python from third-party resource:
# wget http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm
# rpm -Uvh lux-release*rpm
# yum install mod_python
- Restart the Apache service:
# service httpd restart
Refresh Plesk components by pressing Refresh button in Tools & Settings > Server Components until mod_python is visible in the list.
Check the Python support checkbox in Service Plans > ServicePlanName > Hosting Settings.
Check the Python support checkbox in Domains > example.com > Hosting Settings.