500 internal server error with new django and passenger setup


#1

I tried to set up a django/passenger installation by following the instructions on the wiki. I ran through the first 4 steps with no problems, but when I upload my local development files (which work on my dev environment) into the place that it created my django project files using the setup script, I just get 500 internal server errors, and this is all that shows up in the log files:

[Mon Dec 13 17:39:55 2010] [error] [client 76.121.230.231] Premature end of script headers:
[Mon Dec 13 17:39:55 2010] [error] [client 76.121.230.231] Premature end of script headers: internal_error.html

If it helps/matters, this used to be a PHP/Codeigniter installation, which I’ve started using python/django/passenger instead. If I add a ‘hello world’ into passenger_wsgi.py’ it works correctly:

def application(environ, start_response):
write = start_response(‘200 OK’, [(‘Content-type’, ‘text/plain’)])
return [“Hello, world!”]

Any help would be appreciated…