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.

1 Answer 1


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 wsgi.py if your Django version doesn't do it for you.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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