From: Thierry Parmentelat Date: Thu, 14 Mar 2013 17:19:57 +0000 (+0100) Subject: ship apache stuff (config, wsgi, and favicon) on top X-Git-Tag: myslice-django-0.1-2~89 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=4fbc399d29eb1a887a7cad3a560498b3435b53a8 ship apache stuff (config, wsgi, and favicon) on top --- diff --git a/apache/favicon.ico b/apache/favicon.ico new file mode 100644 index 00000000..3925be4f Binary files /dev/null and b/apache/favicon.ico differ diff --git a/apache/myslice.conf b/apache/myslice.conf new file mode 100644 index 00000000..011502ce --- /dev/null +++ b/apache/myslice.conf @@ -0,0 +1,20 @@ +## https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ +# +#Alias /robots.txt /usr/share/myslice/all-static/robots.txt +Alias /favicon.ico /usr/share/myslice/all-static/favicon.ico + +#AliasMatch ^/([^/]*\.css) /usr/share/myslice/all-static/styles/$1 + +Alias /all-static/ /usr/share/myslice/all-static/ + + +Order deny,allow +Allow from all + + +WSGIScriptAlias / /usr/share/myslice/apache/myslice.wsgi + + +Order allow,deny +Allow from all + diff --git a/apache/myslice.wsgi b/apache/myslice.wsgi new file mode 100644 index 00000000..6e36476a --- /dev/null +++ b/apache/myslice.wsgi @@ -0,0 +1,12 @@ +import os +import sys + +path = '/usr/share/myslice' +if path not in sys.path: + sys.path.append(path) + +os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' + +import django.core.handlers.wsgi +application = django.core.handlers.wsgi.WSGIHandler() + diff --git a/myslice.spec b/myslice.spec index aaa84c0d..2925b604 100644 --- a/myslice.spec +++ b/myslice.spec @@ -19,6 +19,8 @@ URL: %{SCMURL} # We use set everywhere Requires: python >= 2.7 Requires: Django +Requires: httpd +Requires: mod_wsgi BuildRequires: python-setuptools make %description diff --git a/setup.py b/setup.py index 2eeb598c..e767a3db 100644 --- a/setup.py +++ b/setup.py @@ -19,4 +19,6 @@ setup(packages = packages, ( 'all-static/css', glob ('all-static/css/*')), ( 'all-static/img', glob ('all-static/img/*')), ( 'all-templates', glob ('all-templates/*')), + ( 'all-static', ['apache/favicon.ico', ] ), + ( 'apache', [ 'apache/myslice.conf', 'apache/myslice.wsgi' ]), ])