I have two django projects on the same machine. They are set up using the standard django/apache/mod_python configuration, basically:
<Location "/mysite">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonOption django.root /mysite
PythonDebug On
PythonPath "['/path/to/project/parent'] + sys.path"
</Location>
where mysite varies for the two projects (in the Location directive, the DJANGO_SETTINGS_MODULE, and the django.root). The PythonPath also varies.
When only one of the two Location directives are in place, whichever site it is for works fine. Either configuration works alone.
When I have both Location directives (which refer to distinct url paths), I can only get to one site. I have location directives for "/portal" and "/apitest", and when I go to http://mydomain.com/apitest, I always get the code from "/portal" being served.
Is it possible to serve two django sites from the same host just by including multiple Location directives, or is it necessary to use VirtualHosts?
Thanks, David