Setting up Python/Django project to run

April 16, 2015 580 views
Python Django Ubuntu

Hey Guys,

I've been digging around stackoverflow, DO, and reddit for an answer. Most of my attempts have failed. I am looking to run a Python/Django via either a subdomain or directory (which ever is easier).

How do I accomplish this? (LAMP Ubuntu image, Django running on it as well)

Thus far it only runs via

1 Answer

There are a few ways that you could do this. If you are already running Apache, then using mod_wsgi might be a good approach. This tutorial takes you through its installation and configuration. It should point you in the right direction:

To set it up in a sub-domain, you'll need to use a separate VirtualHost.

Let us know how it goes, and if you run into any problems.

by Justin Ellingwood
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 14.04 VPS.
Have another answer? Share your knowledge.