How to set up Django Hosting on the latest Plesk Onyx - PleskHow to set up Django Hosting on the latest Plesk Onyx - Plesk
Here's your step-by-step guide on how to set up django hosting on the latest Plesk Onyx, brought to you by one of our insider engineers, Ivan P.




Skip to content Contact us: +34 944 58 06 58 Plesk Partner Program Plesk Lifecycle Policy Blog Contact us Plesk 360 Menu Contact us: +34 944 58 06 58 Plesk Partner Program Plesk Lifecycle Policy Blog Contact us Plesk 360 Solutions By Role Developers Content Managers Digital Agencies IT Admins Web Hosters Hyperscalers Menu Developers Content Managers Digital Agencies IT Admins Web Hosters Hyperscalers By Edition Web Admin Edition Web Pro Edition Web Host Edition Business & Collaboration Plesk WordPress Edition Menu Web Admin Edition Web Pro Edition Web Host Edition Business & Collaboration Plesk WordPress Edition By Cloud Amazon Web Services Microsoft Azure Alibaba Cloud GCP Marketplace Vultr DigitalOcean Linode Menu Amazon Web Services Microsoft Azure Alibaba Cloud GCP Marketplace Vultr DigitalOcean Linode Partner Program Exclusive discounts, benefits and exposure to take your business to the next level Become a partner Product Explore Features Everyone Admins & Web Hosters Developers Designers & Agencies Plesk Features Menu Everyone Admins & Web Hosters Developers Designers & Agencies Plesk Features Key Topics WordPress Toolkit SEO Toolkit Plesk eCommerce Toolkit Joomla! Toolkit Plesk Premium Email Plesk Email Security Menu WordPress Toolkit SEO Toolkit Plesk eCommerce Toolkit Joomla! Toolkit Plesk Premium Email Plesk Email Security Feature Packs Business & Collaboration WordPress Pack Hosting Pack Power Pack Language Pack Menu Business & Collaboration WordPress Pack Hosting Pack Power Pack Language Pack Featured Extension SEO Toolkit Pricing Extensions Help Center More Careers Events Plesk University FREE TRIAL Solutions By Role Developers Content Managers Digital Agencies IT Admins Web Hosters Hyperscalers By Edition Web Admin Edition Web Pro Edition Web Host Edition Business & Collaboration WordPress Edition By Cloud Amazon Web Services Microsoft Azure Alibaba Cloud GCP Marketplace Vultr DigitalOcean Linode Partner Program Partner Program Product Explore Features Everyone Admins & Web Hosters Developers Designers & Agencies Plesk Features Key Topics WordPress Toolkit SEO Toolkit Plesk eCommerce Toolkit Joomla! Toolkit Plesk Premium Email Plesk Email Security Feature Packs Business & Collaboration WordPress Pack Hosting Pack Power Pack Language Pack Featured Extension Extension Pricing Extensions Help center More Careers Events Webinars Plesk University Blog Plesk Partner Program Contact Us FREE TRIAL Menu Solutions By Role Developers Content Managers Digital Agencies IT Admins Web Hosters Hyperscalers By Edition Web Admin Edition Web Pro Edition Web Host Edition Business & Collaboration WordPress Edition By Cloud Amazon Web Services Microsoft Azure Alibaba Cloud GCP Marketplace Vultr DigitalOcean Linode Partner Program Partner Program Product Explore Features Everyone Admins & Web Hosters Developers Designers & Agencies Plesk Features Key Topics WordPress Toolkit SEO Toolkit Plesk eCommerce Toolkit Joomla! Toolkit Plesk Premium Email Plesk Email Security Feature Packs Business & Collaboration WordPress Pack Hosting Pack Power Pack Language Pack Featured Extension Extension Pricing Extensions Help center More Careers Events Webinars Plesk University Blog Plesk Partner Program Contact Us FREE TRIAL How to set up Django Hosting on the latest Plesk Onyx By Ivan Postnikov February 18, 2019 Guides, Product and technology 6 Minutes Following your Django installation on Plesk, it’s now time to learn how to organize Django hosting on Plesk Onyx. We’ll be using CentOS 7 and Plesk 17.8 for this use case scenario, however you can always refer to this article for instructions regarding different OS and serving applications by NGINX. Getting started with Python First, let’s check if Python is present in the system. At this stage, you’ll need a root server access, which you can get by issuing the following command: python36 –version One of the outputs you can get is the following: Python 3.6.6 In case you don’t have Python installed, you can do it using the following commands. a) Add EPEL repository and install Python 3.6: # yum install -y epel-release # yum install -y python36 b) Download and install the Python package manager from the official website: # wget https://bootstrap.pypa.io/get-pip.py # python36 get-pip.py Next, it’s common practice to have a separate virtual environment for each Python application. So, let’s install the “virtualenv” package (under the “root” user): python36 -m pip install virtualenv We’ll then use Phusion Passenger as an application server for hosting Django projects. So, let’s install it yum update plesk installer --select-release-current --install-component passenger Stage Two: Preconfiguring the web server In our case, the application will be a server by Apache. So, you can enable the passenger module at Tools & Settings > Apache WeSkip - to - content - Contact - us: - +34 - 944 - 58 - 06 - 58 - Plesk - Partner - Program - Plesk - Lifecycle - Policy - Blog - Contact - us - Plesk - 360 - Menu - Contact - us: - +34 - 944 - 58 - 06 - 58 - Plesk - Partner - Program - Plesk - Lifecycle - Policy - Blog - Contact - us - Plesk - 360 - Solutions - By - Role - Developers - Content - Managers - Digital - Agencies - IT - Admins - Web - Hosters - Hyperscalers - Menu - Developers - Content - Managers - Digital - Agencies - IT - Admins - Web - Hosters - Hyperscalers - By - Edition - Web - Admin - Edition - Web - Pro - Edition - Web - Host - Edition - Business - & - Collaboration - Plesk - WordPress - Edition - Menu - Web - Admin - Edition - Web - Pro - Edition - Web - Host - Edition - Business - & - Collaboration - Plesk - WordPress - Edition - By - Cloud - Amazon - Web - Services - Microsoft - Azure - Alibaba - Cloud - GCP - Marketplace - Vultr - DigitalOcean - Linode - Menu - Amazon - Web - Services - Microsoft - Azure - Alibaba - Cloud - GCP - Marketplace - Vultr - DigitalOcean - Linode - Partner - Program - Exclusive - discounts - - benefits - and - exposure - to - take - your - business - to - the - next - level - Become - a - partner - Product - Explore - Features - Everyone - Admins - & - Web - Hosters - Developers - Designers - & - Agencies - Plesk - Features - Menu - Everyone - Admins - & - Web - Hosters - Developers - Designers - & - Agencies - Plesk - Features - Key - Topics - WordPress - Toolkit - SEO - Toolkit - Plesk - eCommerce - Toolkit - Joomla! - Toolkit - Plesk - Premium - Email - Plesk - Email - Security - Menu - WordPress - Toolkit - SEO - Toolkit - Plesk - eCommerce - Toolkit - Joomla! - Toolkit - Plesk - Premium - Email - Plesk - Email - Security - Feature - Packs - Business - & - Collaboration - WordPress - Pack - Hosting - Pack - Power - Pack - Language - Pack - Menu - Business - & - Collaboration - WordPress - Pack - Hosting - Pack - Power - Pack - Language - Pack - Featured - Extension - SEO - Toolkit - Pricing - Extensions - Help - Center - More - Careers - Events - Plesk - University - FREE - TRIAL - Solutions - By - Role - Developers - Content - Managers - Digital - Agencies - IT - Admins - Web - Hosters - Hyperscalers - By - Edition - Web - Admin - Edition - Web - Pro - Edition - Web - Host - Edition - Business - & - Collaboration - WordPress - Edition - By - Cloud - Amazon - Web - Services - Microsoft - Azure - Alibaba - Cloud - GCP - Marketplace - Vultr - DigitalOcean - Linode - Partner - Program - Partner - Program - Product - Explore - Features - Everyone - Admins - & - Web - Hosters - Developers - Designers - & - Agencies - Plesk - Features - Key - Topics - WordPress - Toolkit - SEO - Toolkit - Plesk - eCommerce - Toolkit - Joomla! - Toolkit - Plesk - Premium - Email - Plesk - Email - Security - Feature - Packs - Business - & - Collaboration - WordPress - Pack - Hosting - Pack - Power - Pack - Language - Pack - Featured - Extension - Extension - Pricing - Extensions - Help - center - More - Careers - Events - Webinars - Plesk - University - Blog - Plesk - Partner - Program - Contact - Us - FREE - TRIAL - Menu - Solutions - By - Role - Developers - Content - Managers - Digital - Agencies - IT - Admins - Web - Hosters - Hyperscalers - By - Edition - Web - Admin - Edition - Web - Pro - Edition - Web - Host - Edition - Business - & - Collaboration - WordPress - Edition - By - Cloud - Amazon - Web - Services - Microsoft - Azure - Alibaba - Cloud - GCP - Marketplace - Vultr - DigitalOcean - Linode - Partner - Program - Partner - Program - Product - Explore - Features - Everyone - Admins - & - Web - Hosters - Developers - Designers - & - Agencies - Plesk - Features - Key - Topics - WordPress - Toolkit - SEO - Toolkit - Plesk - eCommerce - Toolkit - Joomla! - Toolkit - Plesk - Premium - Email - Plesk - Email - Security - Feature - Packs - Business - & - Collaboration - WordPress - Pack - Hosting - Pack - Power - Pack - Language - Pack - Featured - Extension - Extension - Pricing - Extensions - Help - center - More - Careers - Events - Webinars - Plesk - University - Blog - Plesk - Partner - Program - Contact - Us - FREE - TRIAL - How - to - set - up - Django - Hosting - on - the - latest - Plesk - Onyx - By - Ivan - Postnikov - February - 18 - - 2019 - Guides - - Product - and - technology - 6 - Minutes - Following - your - Django - installation - on - Plesk - - it’s - now - time - to - learn - how - to - organize - Django - hosting - on - Plesk - Onyx. - We’ll - be - using - CentOS - 7 - and - Plesk - 17.8 - for - this - use - case - scenario - - however - you - can - always - refer - to - this - article - for - instructions - regarding - different - OS - and - serving - applications - by - NGINX. - Getting - started - with - Python - First - - let’s - check - if - Python - is - present - in - the - system. - At - this - stage - - you’ll - need - a - root - server - access - - which - you - can - get - by - issuing - the - following - command: - python36 - –version - One - of - the - outputs - you - can - get - is - the - following: - Python - 3.6.6 - In - case - you - don’t - have - Python - installed - - you - can - do - it - using - the - following - commands. - a) - Add - EPEL - repository - and - install - Python - 3.6: - # - yum - install - -y - epel-release - # - yum - install - -y - python36 - b) - Download - and - install - the - Python - package - manager - from - the - official - website: - # - wget - https://bootstrap.pypa.io/get-pip.py - # - python36 - get-pip.py - Next - - it’s - common - practice - to - have - a - separate - virtual - environment - for - each - Python - application. - So - - let’s - install - the - “virtualenv” - package - (under - the - “root” - user): - python36 - -m - pip - install - virtualenv - We’ll - then - use - Phusion - Passenger - as - an - application - server - for - hosting - Django - projects. - So - - let’s - install - it - yum - update - plesk - installer - --select-release-current - --install-component - passenger - Stage - Two: - Preconfiguring - the - web - server - In - our - case - - the - application - will - be - a - server - by - Apache. - So - - you - can - enable - the - passenger - module - at - Tools - & - Settings - > - Apache - We -