Cart (0)
  • Your cart is currently empty.

NEOSERV BLOG

Tips, guides and useful information about domains, hosting, SSL certificates, email, web optimization and online security.

Moja prva Python aplikacija
Category: Tips and Tricks
Published:

Did you know that Python is the third most popular programming language in the world? It’s an open-source system that allows you to develop applications and build websites. Find out how to make your first Python app in the cPanel control panel below.

Python application in cPanel

To build a Python application, you need a suitable web hosting. We offer the latter at NEOSERV, as Python is supported on the Green, Blue and Red packages, as well as on all Reseller and TURBO hosting packages.

Order Python hosting

After activating your hosting package, you can create your first Python application in the cPanel control panel in just six steps.

  1. Log in to the cPanel Control Panel and click on the Setup Python App icon under Software.

Setup Python App

  1. In the newly opened window, select the Python version.
  2. In the Application root window, enter the name of the folder where the Python application will be created.
  3. In the Application URL window , select the domain where the Python application will be available.
  4. In the Passenger log file window, specify the path to save the error log.
  5. Click on the Create button.

Python App Settings

You have successfully created your Python application.

Python application settings

In the cPanel, you can edit various settings for your Python application. Click on the Edit the application icon next to the desired application. Editing a Python application

  1. Change the Python version.
  2. Application root – change the name of the folder where the application is located.
  3. Application URL – change the URL where the application is located.
  4. Application startup file – change the name of the startup file.
  5. Application Entry point – change/set the application function.
  6. Passenger log file* – change the path for storing the error log.
  7. To save the changes made, click on the Restart button.

Additional settings in a Python App

* If you have a hosting package on a Litespeed server, then you can set up the Passenger log file directly by entering the command below in the .htaccess file (,located in the folder where the Application URL points):

PassengerAppLogFile "/home/vasadomesh13/hello/logs/passenger.log"

IMPORTANT: The root directory of the application in this example is “hello”; if you want to put the log in a subfolder (e.g. “logs”), you need to create this folder first.

Access to Python files

Python files are easily accessed via the control panel.

  1. Log in to the cPanel control panel.
  2. Under Files, click on File Manager.
  3. Open the folder where you made your application. In our case, this is the hello folder.
  4. Open the file passenger_wsgi.py.

Access to Python files

  1. You can now write your first Python command, for example “My first Python application”.

Editing a Python application

  1. Save your changes by clicking the Save changes button .
  2. In the cPanel, under Software, click on the Setup Python App icon.
  3. For the application you have changed, click on the Restart the application button.

Restarting a Python application

Congratulations, you have successfully made your first Python application. Open a web browser and enter the URL you specified when setting up your application.

Python Application in a Web Browser

At NEOSERV, we offer Python hosting that you can order in a few simple steps. Python hosting at NEOSERV also supports the installation of the extremely popular Django framework and systems such as SSH, GIT, PIP, MySQL/MariaDB and PostgreSQL.

After activating the package, follow the steps in this post to build your first Python application.

COMMENTS

COMMENT THE POST

(mandatory)
(mandatory, email address will be hidden)
(optional)
Security question that confirms you are a real person.