Sun

How to Create Python App on your cPanel hosting?

  1. Home
  2. Knowledge Base
  3. Hosting
  4. cPanel
  5. Web Hosting
  6. How to Create Python App on your cPanel hosting?

How to Create Python App on your cPanel hosting?

1. To set up the Python app in your cPanel, firstly, you should log in to the panel:

  • Log in to your account in our Clients Area: https://billing.hostens.com/clientarea
  • Choose your Web Hosting(cPanel) service;
  • Press the button “Access Control Panel” on the left menu and then the button “Click here to access control panel“.

Don’t forget to check our cheap web hosting plans here >>

2. In the “Software” category choose the “Setup Python App” application.

3. “Python version” allows you to choose between “2.7”, “3.3” and “3.6” versions. “App Directory” allows you to set directory on which the application is located. Lastly set URI for accessing your application. To proceed, press the “Setup” button.

PythonAppDetails1

4. Every new application created, is added to “Existing applications” category at the bottom of the page. Advanced configuration can be done after the application is added. If you want, you can adjust the settings set for the application on step 3, by clicking “Edit” on the right side of the table. Any changes made should be used by saving via “Save” link that will replace the “Edit” option.

AllPythonSettings

In addition to editing previous settings, additional configurations can be done. “WSGI file location” is used to specify the python WSGI application entry point. It has to be set as a filename, must be callable, and separated by a colon. This field value should be set as “path/to/app:callable”. For example, if app is running from file “appX/run.py”, the field should be set as “appX/run.py:app”.

By choosing the “show” link in “modules” you can open the additional menu on which you can enable specific modules. The module list is navigated by entering the module name in the search field

Field “Execute command” allows you to run simple commands from within the settings interface. For example, you can install packages from specific repositories.

5. If you will be doing any changes to the already loaded configuration, no changes will be done until pressing the “Update” button at the bottom left corner. If you have changed something but not saved it, you can revert back to the last saved configuration by pressing “Restart”.

After creating the configuration in the “Setup Python App” menu, you still have to upload the application files you have specified in the configuration.

6. When the app is configured and files are uploaded to the proper directory, it can be started by running the APP URI.

Was this article helpful?

Related Articles