CKAN on HTTPS

667 views
Skip to first unread message

Aung Myint Thein

unread,
Oct 9, 2015, 9:20:47 PM10/9/15
to CKAN Global User Group
Hi everyone,

Thanks for helping in advance. I am quite new to CKAN and I am trying to serve CKAN 2.3.1 on ssl (hence, my site is https://xxxx) and data explorer stopped working at recline_view. When I changed the iframe url to https, it shows only "loading" and the console shows "http://xxx/api/i18n/en" is blocked. And I saw all main.js, client.js and a lot of js are not loaded too. Is there a way to fix the HTTPS over all the ckan site?

Has anyone configured CKAN on HTTPS SSL before? Tips would be very much appreciated :D

Thanks!

Regards,
Aung

Nigel Babu

unread,
Oct 12, 2015, 7:50:54 AM10/12/15
to ckan-global...@googlegroups.com
Hello,

Can you paste the output of /api/action/status_show? Specifically, I want to know if you have site_url showing http or https.

Additionally, can you also pastebin your Nginx configuration?


Nigel Babu
Senior Sysadmin, Open Knowledge

--
You received this message because you are subscribed to the Google Groups "CKAN Global User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ckan-global-user-...@googlegroups.com.
To post to this group, send email to ckan-global...@googlegroups.com.
Visit this group at http://groups.google.com/group/ckan-global-user-group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/ckan-global-user-group/3f595836-c58a-424e-b6bc-6c8332fa8daf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aung Myint Thein

unread,
Oct 13, 2015, 4:44:45 AM10/13/15
to CKAN Global User Group
Hi Nigel,

Following is the output of api/action/status_show.

{"help": "http://data.dex.sg/api/3/action/help_show?name=status_show", "success": true, "result": {"ckan_version": "2.3.1b", "site_url": "https://data.dex.sg", "site_description": "Data Exchange", "site_title": "DEX", "error_emails_to": "xxx", "locale_default": "en", "extensions": ["stats", "text_view", "recline_view", "zip_preview", "dex_theme", "s3dex", "s3dexurl", "pkg_ctl", "iauth", "iauthurl", "dexhub", "googleanalytics", "datastore", "datapusher"]}}

What exactly is pastebin of Nginx Configuration? If you give some example, I can try to get it :D .. Thanks for helping.

Regards,
Aung


On Monday, October 12, 2015 at 7:50:54 PM UTC+8, Nigel Babu wrote:
Hello,

Can you paste the output of /api/action/status_show? Specifically, I want to know if you have site_url showing http or https.

Additionally, can you also pastebin your Nginx configuration?

Nigel Babu
Senior Sysadmin, Open Knowledge

On 10 October 2015 at 06:50, Aung Myint Thein <aung.my...@newton-circus.com> wrote:
Hi everyone,

Thanks for helping in advance. I am quite new to CKAN and I am trying to serve CKAN 2.3.1 on ssl (hence, my site is https://xxxx) and data explorer stopped working at recline_view. When I changed the iframe url to https, it shows only "loading" and the console shows "http://xxx/api/i18n/en" is blocked. And I saw all main.js, client.js and a lot of js are not loaded too. Is there a way to fix the HTTPS over all the ckan site?

Has anyone configured CKAN on HTTPS SSL before? Tips would be very much appreciated :D

Thanks!

Regards,
Aung

--
You received this message because you are subscribed to the Google Groups "CKAN Global User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ckan-global-user-group+unsub...@googlegroups.com.

Aung Myint Thein

unread,
Oct 13, 2015, 5:22:20 AM10/13/15
to CKAN Global User Group
Hi Nigel,

Nginx configuration :D

server {

    listen 443 ssl;

    server_name data.dex.sg;
    ssl_certificate /home/ubuntu/sslcert/data.dex.sg.chained.crt;
    ssl_certificate_key /home/ubuntu/sslcert/data.dex.sg.key;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers xxxxxxxxxxxxxxxxxxxx;

    client_max_body_size 100M;
    access_log  /var/log/ckan/nginx.access.log;
    error_log  /var/log/ckan/nginx.error.log;

    error_page 500 502 503 504 /50x_ckan.html;
    location = /50x_ckan.html {
        root /srv/ckan-dex/www;
    }

    location / {
        proxy_pass http://127.0.0.1:5005/;
        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;
    }
}

server {
    listen 80;
    server_name data.dex.sg;
    rewrite ^/(.*) https://data.dex.sg/$1 permanent;
}

Is this what you are asking for?

Regards,
Aung

Ted Strauss

unread,
Feb 2, 2017, 3:45:21 PM2/2/17
to CKAN Global User Group (Non-technical questions)
Hi Aung,
It seems that you were able to solve the problem with getting CKAN to work over HTTPS.
Is this nginx conf working for you?
How about the apache conf?
I'm so far unable to get my CKAN running over HTTPS.

Ted

David Read

unread,
Feb 2, 2017, 5:36:39 PM2/2/17
to ckan-global...@googlegroups.com
Ted,
For technical questions, please use StackOverflow #ckan or ckan-dev list.
David
>>>>> an email to ckan-global-user-...@googlegroups.com.
>>>>> To post to this group, send email to ckan-global...@googlegroups.com.
>>>>> Visit this group at
>>>>> http://groups.google.com/group/ckan-global-user-group.
>>>>> To view this discussion on the web, visit
>>>>> https://groups.google.com/d/msgid/ckan-global-user-group/3f595836-c58a-424e-b6bc-6c8332fa8daf%40googlegroups.com.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
> --
> You received this message because you are subscribed to the Google Groups
> "CKAN Global User Group (Non-technical questions)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ckan-global-user-...@googlegroups.com.
> To post to this group, send email to
> ckan-global...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ckan-global-user-group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/ckan-global-user-group/9bab6135-ce81-46de-b355-0342ad57ee57%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages