Add working django.wsgi and apache config file for inclusion
This commit is contained in:
parent
a6ee4e65f6
commit
6f17343e23
|
@ -1,2 +1,3 @@
|
||||||
*.db
|
*.db
|
||||||
*.pyc
|
*.pyc
|
||||||
|
*.conf
|
|
@ -0,0 +1,25 @@
|
||||||
|
<VirtualHost *:80>
|
||||||
|
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
|
||||||
|
<Directory /opt/binder/binder/files/static>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
Alias /media /usr/lib/pymodules/python2.7/django/contrib/admin/media
|
||||||
|
<Directory /usr/lib/pymodules/python2.7/django/contrib/admin/media>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
|
@ -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()
|
Loading…
Reference in New Issue