Revision history [back]
Deploying askbot to passenger
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 passenger_wsgi.py, 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
~/mysite.com/public - local Python 2.5 in
~local - askbot directory set to
~/mysite.com/askbotand forum directory to~/mysite.com/askbot/forum - the following
passenger_wsgi.pyin~/mysite.com/directory:
.
import sys,os
INTERP = "/home/mysite/local/bin/python"
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
sys.path.append("/home/mysite/mysite.com/")
sys.path.append("/home/mysite/mysite.com/askbot/forum")
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:
Deploying askbot to passenger
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 passenger_wsgi.py, 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
~/mysite.com/public - local Python 2.5 in
~local - askbot directory set to
~/mysite.com/askbotand forum directory to~/mysite.com/askbot/forum - the following
passenger_wsgi.pyin~/mysite.com/directory:
.
import sys,os
INTERP = "/home/mysite/local/bin/python"
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
sys.path.append("/home/mysite/mysite.com/")
sys.path.append("/home/mysite/mysite.com/askbot/forum")
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: