Symptoms
The Python support option is missing in Domains > example.com > Hosting Settings. As a result, it is not possible to execute Python scripts on a server.
Cause
The Python module for Apache is deprecated since Plesk 17.8.
Resolution
Apply one of the solutions below:
Note: the solutions below were not officially tested with the Plesk, we cannot guarantee the stability of the workarounds.
For RHEL based systems (CentOS/CloudLinux)
Log into the server via SSH.
Install
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
- Log in to Plesk.
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.
For Debian based systems (Ubuntu/Debian)
Log into the server via SSH.
Install
mod_pythonby executing the command below:# apt install libapache2-mod-python
- Restart the Apache service:
# service apache2 restart
- Log in to Plesk.
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 Parameters tab.
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.