How to set up Django on Plesk Onyx - Plesk GuidesHow to set up Django on Plesk Onyx - Plesk Guides
Here's our full guide on how to set up and configure a Django environment under Plesk Onyx - from our expert team to you.




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 Google PageSpeed Insights 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 on Plesk By Alexei Yuzhakov October 23, 2014 Product and technology 4 Minutes As a follow-up to the article about Ruby on Rails and Plesk I’ll try to explain how to organize Django hosting on Plesk. We will use an Ubuntu 14.04 server and Plesk 12.0 for our experiments. I assume that you will get this configuration somehow. Plesk may use Apache and Apache+nginx for serving of websites. In the scope of this article we’ll check how to setup Django apps hosting only for Apache without nginx. Let’s get started. First of all let’s check Python presence in the system. You can do it by issuing the command: python --version An output can be the following: Python 2.7.6 Install a Python package manager (under the “root” user): apt-get install python-pip It is common practice to have a separate virtual environment for each Python application. So, let’s install the “virtualenv” package (under the “root” user): pip install virtualenv We will use Phusion Passenger as an application server for hosting Django projects. So, let’s install it (under the “root” user): apt-get install libapache2-mod-passenger The next step is to create a domain in Plesk for the application. Let it be a subdomain in our case. We’ll have a separate directory for document root and app files: One should take into account that the document root is a subdirectory. In our example django-public is located inside the django-app directory. This is needed for the proper functioning of the application server. To avoid problems, you need to clean up the newly created django-puSkip - 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 - Google - PageSpeed - Insights - 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 - on - Plesk - By - Alexei - Yuzhakov - October - 23 - - 2014 - Product - and - technology - 4 - Minutes - As - a - follow-up - to - the - article - about - Ruby - on - Rails - and - Plesk - I’ll - try - to - explain - how - to - organize - Django - hosting - on - Plesk. - We - will - use - an - Ubuntu - 14.04 - server - and - Plesk - 12.0 - for - our - experiments. - I - assume - that - you - will - get - this - configuration - somehow. - Plesk - may - use - Apache - and - Apache+nginx - for - serving - of - websites. - In - the - scope - of - this - article - we’ll - check - how - to - setup - Django - apps - hosting - only - for - Apache - without - nginx. - Let’s - get - started. - First - of - all - let’s - check - Python - presence - in - the - system. - You - can - do - it - by - issuing - the - command: - python - --version - An - output - can - be - the - following: - Python - 2.7.6 - Install - a - Python - package - manager - (under - the - “root” - user): - apt-get - install - python-pip - It - is - common - practice - to - have - a - separate - virtual - environment - for - each - Python - application. - So - - let’s - install - the - “virtualenv” - package - (under - the - “root” - user): - pip - install - virtualenv - We - will - use - Phusion - Passenger - as - an - application - server - for - hosting - Django - projects. - So - - let’s - install - it - (under - the - “root” - user): - apt-get - install - libapache2-mod-passenger - The - next - step - is - to - create - a - domain - in - Plesk - for - the - application. - Let - it - be - a - subdomain - in - our - case. - We’ll - have - a - separate - directory - for - document - root - and - app - files: - One - should - take - into - account - that - the - document - root - is - a - subdirectory. - In - our - example - django-public - is - located - inside - the - django-app - directory. - This - is - needed - for - the - proper - functioning - of - the - application - server. - To - avoid - problems - - you - need - to - clean - up - the - newly - created - django-pu -