I have configured reviewboard and I am able to logon if I start it using:
./manage.py runserver
However, I want to use it in Apache using a sub directory, e.g.
http://server.domain/reviewboard should show the home page of reviewboard
(e.g. the dashboard).
I am using mod_python in apache, so I am trying to use the
apache-modpython.conf.in file (from contrib/conf directory) as a template.
My apache configuration currently looks like:
DocumentRoot /opt/reviewboard/htdocs
ErrorDocument 500 /reviewboard/errordocs/500.html
<Location "/reviewboard/">
PythonPath "['/usr/lib/python2.4/site-packages/django'] +
['/opt/reviewboard'] + ['/opt/reviewboard/djblets'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonAutoReload Off
PythonDebug On
PythonInterpreter reviewboard
</Location>
# Serve static media without running it through mod_python (overrides the
above)
<LocationMatch ^(/reviewboard/(media|errordocs))>
SetHandler None
</LocationMatch>
# Alias static media requests to filesystem
Alias /reviewboard/media /opt/reviewboard/htdocs/media
Alias /reviewboard/errordocs /opt/reviewboard/htdocs/errordocs
However, when I try to logon I get the following in browser:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299,
in HandlerDispatch
result = object(req)
File
"/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line
189, in handler
return ModPythonHandler()(req)
File
"/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line
153, in __call__
self.load_middleware()
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py",
line 27, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:
File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 28,
in __getattr__
self._import_settings()
File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 59,
in _import_settings
self._target = Settings(settings_module)
File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 87,
in __init__
raise ImportError, "Could not import settings '%s' (Is it on sys.path?
Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'reviewboard.settings' (Is it on
sys.path? Does it have syntax errors?): No module named reviewboard.settings
I am a little confused about reviewboard.settings file and what should go
in it, and where it needs to be placed. I tried to put a file by this name
in various locations, but I get the same error as above.
Can you please:
1. Explain to me what reviewboard.settings should contain
2. Tell me where I need to put the reviewboard.settings file
3. Help me with my configuration so that I can use Apache and have
reviewboard in the /reviewboard location, rather than at top of the URL. I
cannot use top of URL since I have another Apache site at that location.
Thanks,
Tim