Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is the problem: I want to host several development projects in Zend, Drupal, and Django on a single Apache2 server. While I have had this working in the past, the method of getting it to work was messy.

How does one set up Django and PHP in separate virtualhosts (configs in /etc/sites-available) for separate projects?


I should have mentioned my setup: I will be using a single version of django across multiple sites, installed from Ubuntu's repositories in Ubuntu 13.04 (django 1.4; in the repositories, 1.4.5-1). I will be using multiple versions of Zend and Drupal, but this should make no difference as each project can contain it's own libraries without causing any issues with other projects.

I am using Apache2 with mod_wsgi.

share|improve this question

It depends on how you want to deploy Django, what version you want to deploy, and how you want your website to work, there is no real answer for this. There are a lot of tutorials on how to deploy Django X.X.X on Apache2, follow the one that fits you the best.

I did it using mod_wsgi. You can add a virtual host for the website or an WSGI allias on httpd.conf and /etc/apache2/sites-available/default. Remember to configure your if your Django version doesn't do it for you.

By the way serverfault might be a better place to ask.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.