Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to get 2 separate django projects running on the same apache server with mod_wsgi that are also under the same domain but different urls. Like www.example.com/site1/ and www.example.com/site2

What I'm trying to do is something like...

<VirtualHost *:80>
    ServerName www.example.com

    <location "/site1/">
        DocumentRoot "/var/www/html/site1"
        WSGIScriptAlias / /var/www/html/site1/django.wsgi

    <location "/site2/">
        DocumentRoot "/var/www/html/site2"
        WSGIScriptAlias / /var/www/html/site2/django.wsgi


The closes thing I've seen is this http://docs.djangoproject.com/en/dev/howto/deployment/modpython/ but "mysite" is different for both of these cases and they're using mod_python instead of mod_wsgi.

Any help with this would be great thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted


WSGIScriptAlias /site1 /var/www/html/site1/django.wsgi
WSGIScriptAlias /site2 /var/www/html/site2/django.wsgi

<Directory /var/www/html/site1>
Order allow,deny
Allow from all

<Directory /var/www/html/site2>
Order allow,deny
Allow from all

No need to scope it in a Location directive.

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.