1👍
How are you setting SESSION_COOKIE_DOMAIN?
and SESSION_COOKIE_NAME?
Are they the same for both sites? The one for the domain should at least refer to the sub domain and not the main domain.
UPDATE 1
Instead of:
WSGIAuthUserScript /var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py
WSGIAuthGroupScript /var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py
use:
WSGIAuthUserScript /var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py application-group=new.mydomain.com
WSGIAuthGroupScript /var/www/sites/master/EurekaStart.git/EurekaStart/wsgi.py application-group=new.mydomain.com
The Python code run by WSGIAuthUserScript and WSGIAuthGroupScript always runs in the Apache child worker processes, never in daemon mode process where the main web application is.
More of a problem in your case is that by default the code runs in the main interpreter (application group) context. Because you have two sites, the code will not be separated.
By using application-group option on those directives, you can force the code for each separate site to run in different sub interpreters of the process they run in. Use a different value for application-group for the other site.
You also cannot use:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "EurekaStart.settings")
you must use:
os.environ["DJANGO_SETTINGS_MODULE"] = "EurekaStart.settings"
Using dict.setdefault() causes problems when used by more than one site in the same process, even though in different sub interpreters. For more details see: