- Plesk for Linux
The Python support option is missed in Plesk > Domains > example.com > Hosting Settings, as result, it is not possible to execute Python scripts on a server with CentOS 7/RHEL 7/CloudLinux 7 OS.
Python modules for Apache are no longer supported by
httpd project according to the Apache official website.
Note: since python officially not supported by CentOS 7/RHEL 7/CloudLinux 7 OS, we cannot guarantee the stability of the workaround below.
Log into the server via SSH.
mod_pythonfrom 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 -y
- Restart the Apache service:
# service httpd restart
Refresh Plesk components by pressing the Refresh button in Tools & Settings > Server Components.
Enable the Python support checkbox in Service Plans > Hosting Plans > ServicePlanName > Hosting Settings.
- Scroll down and press the Update & Sync button.
Enable the Python support checkbox in Domains > example.com > Hosting Settings.
- Scroll down and press the OK button to apply the changes.