forked from ISTI-ansible-roles/ansible-roles
library/roles/ckan: Modify the wsgi configuration to pass the correct http protocol headers to the application.
d4science-ghn-cluster: ckan, fix the nginx templates and cleanup some of the tasks.
This commit is contained in:
parent
465eeb8fe7
commit
887975c3f3
|
@ -14,6 +14,11 @@
|
|||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'ckan_ini' ]
|
||||
|
||||
- name: Install the apache.wsgi
|
||||
template: src=apache.wsgi.j2 dest={{ ckan_confdir }}/apache.wsgi
|
||||
notify: Restart CKAN
|
||||
tags: [ 'ckan', 'apache' ]
|
||||
|
||||
- name: Create the base directory for the CKAN file storage
|
||||
file: dest={{ ckan_file_storage_dir }} state=directory owner={{ apache_user }} group={{ ckan_shell_user }} mode=2770
|
||||
tags: ckan
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import os
|
||||
activate_this = os.path.join('/usr/lib/ckan/default/bin/activate_this.py')
|
||||
execfile(activate_this, dict(__file__=activate_this))
|
||||
|
||||
from paste.deploy import loadapp
|
||||
|
||||
config_filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'production.ini')
|
||||
from paste.script.util.logging_config import fileConfig
|
||||
fileConfig(config_filepath)
|
||||
_application = loadapp('config:%s' % config_filepath)
|
||||
|
||||
def application(environ, start_response):
|
||||
environ['wsgi.url_scheme'] = environ.get('HTTP_X_URL_SCHEME', 'http')
|
||||
return _application(environ, start_response)
|
Loading…
Reference in New Issue