diff options
author | Martin Krafft <madduck@madduck.net> | 2010-01-31 02:32:45 +0100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2010-08-10 11:49:35 +0800 |
commit | 2ad2af87e5e438f26ae1f26d21d02052f75cc091 (patch) | |
tree | 1524f1ba1ac9817706fbe3f7408fb78725da3c83 /lib/apache2/patchwork.wsgi.conf | |
parent | ef3b7b60bbfbcd7b61e3a04797d110ee19fc4506 (diff) | |
download | patchwork-2ad2af87e5e438f26ae1f26d21d02052f75cc091.tar.bz2 patchwork-2ad2af87e5e438f26ae1f26d21d02052f75cc091.tar.xz |
lib/apache2: Add WSGI Handler
Patchwork/Django can be run directly with WSGI, which is bound to be
faster and less complex than FastCGI. This patch provides the necessary
Apache configuration and the WSGI handler, as well as an update to the
docs.
Since python-flup is deprecated and WSGI supersedes FastCGI, it should
be(come) the preferred method. Hence I documented it first.
For the xmlrpc interface to work with WSGI, the HTTP authorization
information needs to be passed to the WSGI handler. This is done by
setting WSGIPassAuthorization On in the apache2 config file snippet.
Ref: http://www.arnebrodowski.de/blog/508-Django,-mod_wsgi-and-HTTP-Authentication.html
Signed-off-by: martin f. krafft <madduck@madduck.net>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/apache2/patchwork.wsgi.conf')
-rw-r--r-- | lib/apache2/patchwork.wsgi.conf | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/apache2/patchwork.wsgi.conf b/lib/apache2/patchwork.wsgi.conf new file mode 100644 index 0000000..e99f8c6 --- /dev/null +++ b/lib/apache2/patchwork.wsgi.conf @@ -0,0 +1,20 @@ +<IfModule mod_alias.c> + Alias /images/ "/srv/patchwork/htdocs/images/" + Alias /css/ "/srv/patchwork/htdocs/css/" + Alias /js/ "/srv/patchwork/htdocs/js/" + Alias /robots.txt "/srv/patchwork/htdocs/robots.txt" + <Directory "/srv/patchwork/htdocs"> + Order allow,deny + Allow from all + </Directory> + + Alias /media/ "/usr/share/python-support/python-django/django/contrib/admin/media/" + + <Directory "/usr/share/python-support/python-django/django/contrib/admin/media/"> + Order allow,deny + Allow from all + </Directory> +</IfModule> + +WSGIScriptAlias / "/srv/patchwork/patchwork.wsgi" +WSGIPassAuthorization On |