summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNate Case <ncase@xes-inc.com>2008-09-05 09:45:36 -0500
committerJeremy Kerr <jk@ozlabs.org>2008-09-08 10:03:48 +1000
commit8df76da1f7f4f6bc9a22d2b2db233618c251eeb5 (patch)
tree3ec4e47436571910a2a07aad4b9b2623f0e3dc12 /lib
parente3fadcd6476158e57577a0b4ab69e33b0824ae6d (diff)
downloadpatchwork-8df76da1f7f4f6bc9a22d2b2db233618c251eeb5.tar.bz2
patchwork-8df76da1f7f4f6bc9a22d2b2db233618c251eeb5.tar.xz
mod_python example configuration fixes
These fixes correct the example patchwork.mod_python.conf file to actually work properly: * Patchwork base directory needs to be in PythonPath so that things like "apps.urls" will import * Set DJANGO_SETTINGS_MODULE to "settings" instead of "patchwork.settings" so that it can find the settings file to import * Use LocationMatch instead of Location in order for the pattern matching to work (this was causing none of the images/stylesheets to be found when using mod_python) Signed-off-by: Nate Case <ncase@xes-inc.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/apache2/patchwork.mod_python.conf8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/apache2/patchwork.mod_python.conf b/lib/apache2/patchwork.mod_python.conf
index a84a9e2..6dbb09b 100644
--- a/lib/apache2/patchwork.mod_python.conf
+++ b/lib/apache2/patchwork.mod_python.conf
@@ -7,13 +7,13 @@ NameVirtualHost patchwork.example.com:80
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
- PythonPath "['/srv/patchwork/apps', '/srv/patchwork/lib/python'] + sys.path"
- SetEnv DJANGO_SETTINGS_MODULE patchwork.settings
+ PythonPath "['/srv/patchwork/apps', '/srv/patchwork', '/srv/patchwork/lib/python'] + sys.path"
+ SetEnv DJANGO_SETTINGS_MODULE settings
</Location>
- <Location "/(images|css|js|media)/">
+ <LocationMatch "^/+(images|css|js|media)/">
SetHandler None
- </Location>
+ </LocationMatch>
LogLevel warn
ErrorLog /var/log/apache2/patchwork-error.log