django wsgi multiple projects different url same apache server

Posted by Thomas Schultz on Server Fault See other posts from Server Fault or by Thomas Schultz
Published on 2010-06-04T13:41:55Z Indexed on 2010/06/06 12:53 UTC
Read the original article Hit count: 400

Filed under:
|
|
|
|

Hello, 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>

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

</VirtualHost>

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!

© Server Fault or respective owner

Related posts about apache

Related posts about django