Ask Your Question

Deploying askbot to passenger

asked 2011-06-24 16:21:02 -0500

Victor gravatar image

updated 2011-06-24 17:04:58 -0500

Does anyone have a code snippet to install Askbot into Passenger? I'm on Dreamhost and can't really edit httpd.conf, like manual suggests.

OSQA has a, for instance - I'd like to have one like that. And I don't even know Python, not saying Django.

edit: maybe it's just my configuration broken. I have:

  • Dreamhost account with web directory set to ~/
  • local Python 2.5 in ~local
  • askbot directory set to ~/ and forum directory to ~/
  • the following in ~/ directory:


import sys,os
INTERP = "/home/mysite/local/bin/python"
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
os.environ['DJANGO_SETTINGS_MODULE'] = 'askbot.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

The site just dies. In httpd's error.log I get things like:

[Fri Jun 24 14:24:53 2011] [error] [client xx.xx.xx.xx] Premature end of script headers:

edit retag flag offensive close merge delete


sorry, the server is slow as I am abusing it right now. I'll try mod_passenger.
Evgeny gravatar imageEvgeny ( 2011-06-24 16:39:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-06-24 16:43:37 -0500

Evgeny gravatar image

updated 2011-06-24 17:24:12 -0500

I think that simply renaming django.wsgi (or copying) to should do the trick.

Looking at the manuals for passenger and wsgi - I do not see anything passenger-specific in those files.

edit: there is no askbot/forum in askbot. If your is in, then instead of your sys.path.append() have


Askbot actually has it's own slightly different version of django.wsgi in askbot/setup_templates that should just work regardless of your specific paths (well in your case you need a custom line to replace the python interpreter).

edit flag offensive delete link more


I copied `` from OSQA (replacting respective parts) and my test site just stopped responding. I see that it's mostly generated from `django.wsgi`. I think I'll add more details about my specific case.
Victor gravatar imageVictor ( 2011-06-24 16:56:07 -0500 )edit
So my main concern is - what's the problem with my configuration?
Victor gravatar imageVictor ( 2011-06-24 17:23:25 -0500 )edit
A question - which directory contains your
Evgeny gravatar imageEvgeny ( 2011-06-24 18:39:06 -0500 )edit

Gave it another try. Did no "startforum", just used the current manual. Still, result is the same - site just plain doesn't respond. Can it be a problem with no 500 error logging? ( What can I do to diagnose this?

Victor gravatar imageVictor ( 2011-09-11 17:56:48 -0500 )edit

But does it work in simple django runserver? If it does, then issues are due to your deployment, otherwise - with the application. Are you deploying askbot with some other apps on the same site?

Evgeny gravatar imageEvgeny ( 2011-09-11 19:27:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-06-24 16:21:02 -0500

Seen: 508 times

Last updated: Jun 24 '11