I’m hoping someone ran into a similar issue and has a fix/workaround for this:
I’m trying to setup my first Django app on dreamhost, and am running into 500 errors when attempting to load /admin/
the errors seem to be coming from Apache and not Python/Django. the error log contains the following 2 lines for each page load attempt:
[font=Courier][Sun Feb 13 21:25:03 2011] [error] [client ] Premature end of script headers: admin
[Sun Feb 13 21:25:03 2011] [error] [client ] Premature end of script headers: internal_error.html[/font]
and the access log this:
[font=Courier] - - [13/Feb/2011:21:25:03 -0800] “GET /admin/ HTTP/1.1” 500 691 “-” “Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13”
- - [13/Feb/2011:21:25:03 -0800] “GET /favicon.ico HTTP/1.1” 304 172 “-” “Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13”[/font]
I’ve even tried a clean install of Django on a new sub-domain - using passenger, as describe here: http://wiki.dreamhost.com/Django - and followed the ‘Polls’ tutorial app instructions through to the top of this section: http://docs.djangoproject.com/en/dev/intro/tutorial02/ and still get the same error. If I remove the
line from INSTALLED_APPS in settings.py, the admin site load correctly.
If I leave the ‘polls’ line in settings.py and launch a server via:
[font=Courier]$ ./manage.py runserver :8080[/font]
and load :8080/admin/ then the admin site also loads correctly, with Polls correctly installed, etc. So the same code works via runserver and does not work via passenger_wsgi.
Does anyone have any ideas how to fix or further diagnose this?