Skip to content

Instantly share code, notes, and snippets.

@nigelbabu nigelbabu/ckan_apache.conf

Last active Oct 10, 2017
What would you like to do?
Running CKAN with SSL
WSGISocketPrefix /var/run/wsgi
WSGIScriptAlias / /etc/ckan/default/apache.wsgi
# pass authorization info on (needed for rest api)
WSGIPassAuthorization On
# Deploy as a daemon (avoids conflicts between CKAN instances)
WSGIDaemonProcess ckan_default display-name=ckan_default processes=2 threads=15
WSGIProcessGroup ckan_default
ErrorLog /var/log/apache2/ckan_default.error.log
CustomLog /var/log/apache2/ckan_default.custom.log combined
<IfModule mod_rpaf.c>
RPAFenable On
RPAFsethostname On
proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=cache:30m max_size=250m;
proxy_temp_path /tmp/nginx_proxy 1 2;
server {
listen 80 default;
return 301 https://$server_name$request_uri;
server {
listen 443 ssl;
client_max_body_size 100M;
ssl on;
ssl_certificate ssl/;
ssl_certificate_key ssl/;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
keepalive_timeout 60;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_cache cache;
proxy_cache_bypass $cookie_auth_tkt;
proxy_no_cache $cookie_auth_tkt;
proxy_cache_valid 30m;
proxy_cache_key $host$scheme$proxy_host$request_uri;
proxy_set_header X-Forwarded-Proto $scheme;
# In emergency comment out line to force caching
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control;

This comment has been minimized.

Copy link

gustavomwk commented Oct 10, 2017

Hello, I used your configuration.
But now the data explorer stopped to work.
I cannot see the data, live in the webpage.

Do you have any idea what could be wrong? I used ckan 2.6.2 .deb package installation.

thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.