Drupal setup on a Django server.

July 10, 2014 2.7k views

Hi I have a Ubuntu 14.04 LAMP server. I am currently using Django to serve the content of my site. I would like to add Drupal to my site and use it for a blog. Django is serveing the root right now (vinixinc.com) but I want to add a folder (/blog) to install Drupal to so if you go to (vinixinc.com/blog) it’ll load the Drupal project. If i use Django to serve the Drupal project I will have to create a view and add it to my urls for every page as well as configure each page to use CSRF. That will make things very complicated. So my question is can I setup Apache to serve a folder on a site without Django if the rest of my site is using Django.

1 Answer

If you are just going to keep the Drupal site in a sub-directory, you can set this up using Alias directive. It would look something like:

Alias /blog /path/to/drupal/
<Directory /path/to/drupal>
   # You Drupal configuration options here

WSGIScriptAlias / /path/to/django/project/app.wsgi
<Directory /path/to/django/project>
   # You Django configuration options here

Of course, you’ll need to install the rest of the LAMP stack (PHP, MySql) for Drupal.

by Justin Ellingwood
One of the most common steps to take when setting up a new server is to install a LAMP stack. LAMP stands for Linux, Apache, MySQL, and PHP. These individual components, when used together, allow us to host dynamic web content like websites and web apps on our server. We will demonstrate how to install these pieces and configure a basic setup for Ubuntu 14.04 in this guide.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!