Applicable to:
- Plesk for Linux
Symptoms
The Python support option is missing in Plesk > Domains > example.com > Hosting Settings, as 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.
-
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 -y - Restart the Apache service:
# service httpd restart
- Log into 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.
-
Log into the server via SSH.
-
Install
mod_python
by executing the command below:# apt install libapache2-mod-python
- Restart the Apache service:
# service apache2 restart
- Log into 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.
Comments
4 comments
Hello Gilberto,
I did not reproduce the on my test server Centos7
If you are using CentOS 7/RHEL 7/CloudLinux 7 check that /etc/yum.repos.d/lux.repo contains below lines:
[lux]
name=CentOS $releasever - $basearch - Lux
baseurl=http://repo.iotti.biz/CentOS/$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LUX
Also you can change baseurl
from:
baseurl=http://repo.iotti.biz/CentOS/$releasever
to:
baseurl=http://repo.iotti.biz/CentOS/7/
You can also search for any other 3rdpaty repositories that have mod_python through the internet.
After installing mod_python there were errors in the next Plesk update.
Exception: Failed to solve dependencies:
2:postfix-2.10.1-6.el7.lux.1.x86_64 requires libcdb.so.1()(64bit)
2:postfix-2.10.1-6.el7.lux.1.x86_64 requires tinycdb
ERROR: The Yum utility failed to install the required packages.
This article suggests disabling the lux repo - https://support.plesk.com/hc/en-us/articles/115003325473-Unable-to-install-Plesk-updates-Failed-to-solve-dependencies-requires-tinycdb-requires-libcdb-so-1-64bit-
Hi,
there is some problem mit repo file
# yum install mod_python
Geladene Plugins: changelog, product-id, search-disabled-repos, subscription-manager
PLESK_17_8_11-extras | 2.9 kB 00:00:00
PLESK_17_PHP56 | 2.9 kB 00:00:00
PLESK_17_PHP70 | 2.9 kB 00:00:00
PLESK_17_PHP71 | 2.9 kB 00:00:00
PLESK_17_PHP72 | 2.9 kB 00:00:00
http://repo.iotti.biz/CentOS/7Server/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Can I install another mod_phyton?
Hello @Quotes,
indeed, if you have 3rd-party repo enabled, this article should help to achieve your goal.
Please sign in to leave a comment.