Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update deployment scripts and default settings

  • Loading branch information...
commit a13d9bc4885f7946bd3906fe099c26e5a7ff5622 1 parent 8c2d5a1
@guaq guaq authored
View
19 apache/https-vhost-config
@@ -9,25 +9,24 @@
Header set Strict-Transport-Security "max-age=86400"
- WSGIApplicationGroup deployment-name
- WSGIDaemonProcess deployment-name python-path=<path-to-git-repo>:<path-to-env-site-packages> home=<path-to-git-repo>/sikteeri user=<user> group=<user>
- WSGIProcessGroup deployment-name
- WSGIScriptAlias <path-to-webroot>/django.wsgi
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !static/
+ RewriteRule ^(.*)$ http://127.0.0.1:<gunicorn-port>/$1 [L,P]
- Alias /deployment-name/static/membership <path-to-git-repo>/membership/static
- <Directory <path-to-git-repo>/membership/static>
+ Alias /static/admin <path-to-admin-media>
+ <Directory <path-to-admin>>
Order allow,deny
Allow from all
</Directory>
- Alias /deployment-name/membership <path-to-git-repo>/static
- <Directory <path-to-git-repo>/sikteeri/static>
+ Alias /static/membership <path-to-git-repo>/membership/static
+ <Directory <path-to-git-repo>/membership/static>
Order allow,deny
Allow from all
</Directory>
- Alias /deployment-name/admin_media <path-to-admin-media>
- <Directory <path-to-admin-media>>
+ Alias /static <path-to-git-repo>/static
+ <Directory <path-to-git-repo>/sikteeri/static>
Order allow,deny
Allow from all
</Directory>
View
1  requirements.txt
@@ -1,2 +1,3 @@
Django==1.4.0
gunicorn==0.14.2
+psycopg2==2.4.5
View
1  sikteeri/local_settings.py.template
@@ -39,5 +39,4 @@ EMAIL_SUBJECT_PREFIX = '[sikteeri] '
#EMAIL_BACKEND = 'mboxemailbackend.EmailBackend'
#EMAIL_MBOX_FILE_PATH = 'sikteeri.mbox' # change this to a proper location
-MEDIA_URL = 'http://localhost:12765'
TRUSTED_HOSTS = ['127.0.0.1']
View
7 sikteeri/settings.py
@@ -45,10 +45,7 @@
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
-# trailing slash.
-# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/media/'
+STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
@@ -110,6 +107,8 @@
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
+USE_X_FORWARDED_HOST = True
+
from local_settings import *
# Is this the right way to do this?
Please sign in to comment.
Something went wrong with that request. Please try again.