Não use os.environ.setdefault()
. O Django estragou a hospedagem de vários aplicativos em um processo mod_wsgi quando eles mudaram para essa maneira de configurar variáveis de ambiente.
Isso está documentado em meu blog: Solicitações sendo executadas na instância errada do Django sob Apache / mod_wsgi.
There are two solutions if this is the cause. The quickest is to replace the use of setdefault() to set the environment variable in the WSGI script file with more usual assignment.
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
An alternative which involves a bit more work, but can have other benefits, is to switch to using daemon mode of mod_wsgi to run the Django instances and delegate each to a separate set of processes. By running the Django instances in separate processes there can be no possibility of environment variables leaking from one to the other.
WSGIDaemonProcess project-2 WSGIScriptAlias /suburl /some/path/project-2/wsgi.py process-group=project-2 WSGIDaemonProcess project-1 WSGIScriptAlias / /some/path/project-1/wsgi.py process-group=project-1