diff options
Diffstat (limited to 'portal-gui/apache')
-rw-r--r-- | portal-gui/apache/django.wsgi.in | 32 | ||||
-rw-r--r-- | portal-gui/apache/zmyrpki.conf.in | 37 |
2 files changed, 69 insertions, 0 deletions
diff --git a/portal-gui/apache/django.wsgi.in b/portal-gui/apache/django.wsgi.in new file mode 100644 index 00000000..8415f7bf --- /dev/null +++ b/portal-gui/apache/django.wsgi.in @@ -0,0 +1,32 @@ +# $Id$ +""" +Copyright (C) 2010 SPARTA, Inc. dba Cobham Analytic Solutions + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND SPARTA DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL SPARTA BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +This is an example wsgi application for use with mod_wsgi and apache. + +@configure_input@ +""" + +import os +import sys + +os.environ['DJANGO_SETTINGS_MODULE'] = 'rpkigui.settings' + +sys.path.append('@MYRPKIDIR@') +sys.path.append('@INSTDIR@') + +import django.core.handlers.wsgi +application = django.core.handlers.wsgi.WSGIHandler() diff --git a/portal-gui/apache/zmyrpki.conf.in b/portal-gui/apache/zmyrpki.conf.in new file mode 100644 index 00000000..e8ce9643 --- /dev/null +++ b/portal-gui/apache/zmyrpki.conf.in @@ -0,0 +1,37 @@ +# sample apache configuration file for using the portal-gui with mod_wsgi +# @configure_input@ + +# defines the url to the portal-gui +WSGIScriptAlias / @INSTDIR@/apache/django.wsgi +<Directory @INSTDIR@/rpkigui> +Order deny,allow +Allow from all +</Directory> + +# enable http digest auth +<Location /myrpki/> +AuthType digest +AuthName "myrpki" +AuthDigestDomain /myrpki/ http://localhost/myrpki/ +AuthDigestProvider file +AuthUserFile @INSTDIR@/htpasswd +Require valid-user +</Location> + +# enable http digest auth +<Location /admin/> +AuthType digest +AuthName "myrpki" +AuthDigestDomain /admin/ http://localhost/admin/ +AuthDigestProvider file +AuthUserFile @INSTDIR@/htpasswd +Require valid-user +</Location> + +# media for the /admin/ site +Alias /media/ /usr/lib/python2.6/site-packages/django/contrib/admin/media/ +<Directory /usr/lib/python2.6/site-packages/django/contrib/admin/media> +Order allow,deny +Allow from all +</Directory> + |