• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Hosting Python Django WebApp

Hello,

In the Plesk panel, go to the website you want to activate Python on, go to Hosting settings and just check the box that says: Python support.

To test it, create a file called index.py on your server with the following code:
Code:
#!/usr/bin/env python
print "Content-Type: text/html"
print
print """\
<html>
 <head>
  <title>Python - Hello World</title>
 </head>
 <body>
  Hello World
 </body>
</html>
"""

If you can see Hello World in your browser, it means that Python is working successfully :)
 
Hi @cipcip

thanks for your answer..

the problem is, i don't have there any Python support, just SSI, CGI, FastCGI and PHP.

i just tried it anyway but is not working..
 
Hello @FelixB

Do the following steps:

- Navigate to Tools & Settings
- PHP Settings
- Where you have this text at the top: "Select the PHP handlers you want to make available. You can install additional handlers using the Plesk Installer." click on Plesk Installer
- In Plesk Installer, go to Web Hosting -> Apache -> mod_python to see if you have it installed, if not, install it by clicking on the dropdown area and choose install.
- Click on the Continue button and follow the steps to the end to install.
 
I have it so maybe it depends because I have it as originally I had plesk 17.5 and updated to 17.8, but coming directly from 17.8, I do not know if it is there... apparently is not.

Check this thread: Python installation

More specifically, the answer from @IgorG that says to install it like so in your environment:

# plesk installer --select-release-current --install-component mod_python

But even like so, I do not think that it will find it.... I do not know another way to do this, maybe Igor can help.
 
Back
Top