My favorites | Sign in
Project Home Wiki Issues
New issue   Search
for
  Advanced search   Search tips
Issue 1136: Support for apache/mod_wsgi
7 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jun 2010


Sign in to add a comment
 
Reported by plaes...@gmail.com, May 29, 2009
This was required to get review-board running with mod_wsgi under apache

reviewboard.wsgi::

#!/usr/bin/env python
import os, sys

sys.path.insert(0, "path/to/conf")
os.environ["DJANGO_SETTINGS_MODULE"] = "reviewboard.settings"
os.environ["PYTHON_EGG_CACHE"] = "path/to/egg_cache"

import django.core.handlers.wsgi
_application = django.core.handlers.wsgi.WSGIHandler()

def application(environ, start_response):
    environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
    return _application(environ, start_response)

Comment 1 by plaes...@gmail.com, May 29, 2009
And for apache conf:

# Reviewboard
Alias /media "path/to/media"
Alias /errordocs "path/to/errordocs"
WSGIScriptAlias /path-to-review-board /path/to/reviewboard.wsgi

Comment 2 by project member chip...@gmail.com, Aug 5, 2009
(No comment was entered for this change.)
Status: Confirmed
Labels: Milestone-Release1.1 Component-Deployment
Comment 3 by Graham.Dumpleton@gmail.com, Aug 6, 2009
That WSGI script file is only correct if using Django < 1.0 and the application is mounted at a sub URL and the 
urls.py is setup in a specific way. If the application is mounted at the root of the site, it would be done 
differently and you wouldn't need the fiddles at all if using Django 1.0 or later.

Thus, you are going to need a lot of qualifications on this if you are going to promote it as the deployment 
method.
Comment 4 by project member chip...@gmail.com, Dec 20, 2009
(No comment was entered for this change.)
Labels: Milestone-Release1.5
Comment 5 by project member trowb...@gmail.com, Jun 13, 2010
Fixed in 9fe599c. Thanks!
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting