If you are getting a 500 error response, you aren't actually crashing
Apache, just the requests are failing. The questions is whether it is
a 500 error from Apache/mod_wsgi or from Django.
> If I switch my
> servers around, it is still always the second one that crashes. Is
> this a non workable setup on Windows without multiple daaemon
> processes for each application?
Generally it would work fine. There are some caveats, but doubt very
much that they would be your problem at this point.
> Log says:
>
> [Sat Sep 05 09:30:58 2009] [error] Unable to read settings_local.py
> [Sat Sep 05 09:30:58 2009] [error] [client 10.0.0.5] mod_wsgi
> (pid=6052): Exception occurred processing WSGI script 'C:/path/app2/
> apache/django.wsgi'.
What was the rest of the error log output around that section? There
is likely a Python error traceback and other stuff. Please post
sections from before and after that point. Basically anything onwards
from point you made the request.
> NameVirtualHost *:80
>
> <VirtualHost *:80>
> ServerName www.domain1.no
> WSGIScriptAlias / "/path/app1/apache/django.wsgi"
> <Directory "/path/app1/apache">
> AllowOverride None
> Options None
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerName www.domain2.no
> WSGIScriptAlias / "/path/app2/apache/django.wsgi"
> <Directory "/path/app2/apache">
> AllowOverride None
> Options None
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
>
> My wsgi files are identical
>
> import os, sys
> WSGI_ROOT = os.path.normpath(os.path.dirname(__file__))
You shouldn't need os.path.normpath().
> home = WSGI_ROOT + '/../'
Read up Python documentation about os.path.join().
This is possible wrong anyway, as you generally would use two
directories above the 'apache' subdirectory you created.
> if not home in sys.path:
> sys.path.insert(0, home)
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
Always a bad idea to use just settings.
You should set sys.path to be directory containing your Django
instances, not the Django instances themselves. The
DJANGO_SETTINGS_MODULE variable should then reference the site name,
ie., directory the instance is stored in.
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
Graham