Question

Drupal setup on a Django server.

  • Posted July 10, 2014

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.

Subscribe
Share

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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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
</Directory>

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

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