Python
Python – a general-purpose programming language that can be integrated to run websites and applications.
To add a Python project, follow these steps:
- Install Python.
- Configure user.
- Create a website for a project with Python.
- Add a Python project.
- Functional check
Install Python
To enable:
- In the Main menu select Settings.
- From the drop-down list select Software Configuration.
- On the form that opens, select Python from the list and click on Install.
Once the installation is complete, Python will become available as a handler when you create the site.
Configure user
Once Python is installed on the panel, add usage rights to the user under which Python projects will be added, to do this:
- In the Main menu select Users.
- Select the appropriate user and click on Edit.
- On the form that opens, find the Access section.
- Enable the Python checkbox and click the Save button.

After saving, a Python icon will be displayed in the user Status column.
Create a website for a project with Python.
Now you need to create a site with a Node.js handler, to do this:
- In the Main menu select Sites.
- On the form that opens click Create website.
- Select the Extended settings tab (for a detailed description of the settings, see Add a website) and fill in the required fields. Below are the important fields when creating a website with a Python project:
- Main settings section:
- Domain name – the domain name;
- Website directory – the path to the website directory that is relative to the owner's home directory;
- Website aliases – the names of the aliases you want to add to your website (optional field);
- Handler – select Python;
- SSL certificate – select an SSL certificate that will be used for this website. You can specify the existing certificate or create a new self-signed certificate;
- IP address – a list of IP addresses assigned to the website;
- Website owner – select the website owner;
- Default website (checkbox) – if the website is marked as default, it will process a request by the domain name which is not registered on this webserver (including requests by IP) to any IP address assigned to this website;
- Handler (Python) section:
- Application mode:
- CGI (Apache + Python) – Python interpreter is called by Apache2, the code will be executed by accessing the file directly;
- Python web server– some Python packages need server configuration (for example, Django). Configure after the appropriate package is installed:
- Path to server – the path to the application server file relative to the home directory of the website;
- Server arguments – list of arguments that will be passed to the server at startup;
- Connection method (method selection is only available when Python Web Server mode is selected):
- Port – free unprivileged port will be assigned to the website;
- Socket file – the website will work via a socket.
- Python version – select the required Python version.
- Application mode:
- Main settings section:
- Click on Create.

On the Sites page, the created website will be added with the Python icon in the Parameters column.
Add a Python project
Add your Python project to the created site by doing the following:
- In the Main menu select Sites.
- Select the required site and click on the Website files button.
- On the File Manager form that opens, click Upload.
- Select where you want to upload the files from:
- Local computer file – click on Choose file or move the necessary files to the drag-and-drop area;
- File URL on remote server:
- URL – a link to the file to be uploaded, for example, http://example.com/dir/file.html;
- File name – the name of the file to be saved with in the current directory. If you leave this field blank, the file name will be extracted from the URL.
- Specify the required packages in the requirements.txt file.
- Click on Back to the list of websites arrow.
- Click on “…“ and select Installing Python packages.
Python will install all the specified packages of your project. The installation process is indicated by a gray Python icon in the Parameters column. - After installation is complete, click on the “…“ button and select Restart (Python).
The project will be restarted; the Python icon will turn green, which means the project is working properly.
- Configure the website by clicking Edit.
- Navigate to the Handler section and fill in the fields for Python web server.
- After filling in the fields, click on the Save button.
- If necessary, configure the installed Python package.
Functional check
To check if it works:
- If the Unix family OS is installed on the PC, add the following entry to the /etc/hosts file:
Where:1.1.1.1 example.com
- 1.1.1.1 — is the IP-address of your server;
- example.com — the website name;
- If Windows OS is installed on the PC, add the following entry to the C:\windows\system32\drivers\etc\hosts file:
Where:1.1.1.1 example.com
- 1.1.1.1 — is the IP-address of your server;
- example.ru — the website name.
Enter the name of the website in your browser to check if it was created correctly.