diff --git a/.gitignore b/.gitignore index 231486c..b60c53a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.db *.pyc +*.conf \ No newline at end of file diff --git a/config/binder-apache.conf.dist b/config/binder-apache.conf.dist new file mode 100644 index 0000000..5cb1c1b --- /dev/null +++ b/config/binder-apache.conf.dist @@ -0,0 +1,25 @@ + + ServerName binder.yourdomain.org + + # The first argument to WSGIScriptAlias is the absolute path + # under your domain where Binder lives. + # The second argument is the absolute path to the django.wsgi file + # from the Binder checkout. + WSGIScriptAlias / /opt/binder/config/django.wsgi + + # The second argument to this alias should be the absolute path + # to the 'files/static' directory under a Binder checkout. + # This is where various CSS files live. + Alias /files/static /opt/binder/binder/files/static + + Order allow,deny + Allow from all + + + Alias /media /usr/lib/pymodules/python2.7/django/contrib/admin/media + + Order allow,deny + Allow from all + + + diff --git a/config/django.wsgi b/config/django.wsgi new file mode 100644 index 0000000..e0dd3bd --- /dev/null +++ b/config/django.wsgi @@ -0,0 +1,13 @@ +# This file specifies needed environment and configuration +# data for the Binder app to operate under mod_wsgi. + +import os +import sys + +PROJECT_PATH=os.path.realpath(os.path.join(os.path.dirname(__file__), "..")) +sys.path.append(PROJECT_PATH) +sys.path.append(os.path.join(PROJECT_PATH, "binder")) + +os.environ['DJANGO_SETTINGS_MODULE'] = 'binder.settings' +import django.core.handlers.wsgi +application = django.core.handlers.wsgi.WSGIHandler()