Commit 8df76da1 authored by Nate Case's avatar Nate Case Committed by Jeremy Kerr
Browse files

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

* 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: default avatarNate Case <>
Signed-off-by: default avatarJeremy Kerr <>
parent e3fadcd6
......@@ -7,13 +7,13 @@ NameVirtualHost
<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"
<Location "/(images|css|js|media)/">
<LocationMatch "^/+(images|css|js|media)/">
SetHandler None
LogLevel warn
ErrorLog /var/log/apache2/patchwork-error.log
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment