So it fails under the /admin/ area, but does the rest of your site work at all? If so, then your wsgi configuration above seems to work, and perhaps the problem instead lies with some sort of semantic issue.
I'd definitely check your apache error log. Django will dump the stacktrace there, and often has been my only clue as to why something fails. What do you find there? (Additionally, once you can give the error a name and a place, you could try walking through it all manually in the python interpreter... executing your wsgi file with python directly, importing the 'django' package, performing various imports at or near the error in your apache error log, etc. It can be easier to figure out the exact problem like that, instead of guess-and-check methodology.) Tim On Wed, May 27, 2009 at 9:31 AM, Gijs Nijholt <[email protected]>wrote: > > Hi, > > I'm almost up and running on my VPS account using mod_wsgi and Django > (trunk) > I've just spent two hours searching google, groups and some forums, > but I'm stuck. > > The problem: the Django admin under /admin gives a 500 internal server > error. > I use the following .wsgi file: > > ------- > ALLDIRS = ['/a/website.nl', '/a/website.nl/website', '/a/website.nl/ > lib/python2.5', '/a/website.nl/lib/python2.5/site-packages'] > > import sys, os > import site > > prev_sys_path = list(sys.path) > > for directory in ALLDIRS: > site.addsitedir(directory) > > new_sys_path = [] > for item in list(sys.path): > if item not in prev_sys_path: > new_sys_path.append(item) > sys.path.remove(item) > sys.path[:0] = new_sys_path > > sys.path.append('/a/website.nl') > sys.path.append('/a/website.nl/website') > > os.environ['DJANGO_SETTINGS_MODULE'] = 'website.settings' > > import django.core.handlers.wsgi > from django.core.servers.basehttp import AdminMediaHandler > from django.core.handlers.wsgi import WSGIHandler > > application = AdminMediaHandler(WSGIHandler()) > ------- > > Am I doing something wrong here? Or could something else cause the > error? > > Thanks... > > Gijs > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
