Preview of form is working on http but not on https

I have deployed Kobotoolbox on my Ubuntu linux Virtual Machine using kobo-install.

I have created 3 subdomains:

kf.kobo.lan
kc.kobo.lan
ee.kobo.lan.

With http, i can create form, deploy it, see preview and access it on ee.kobo.lan to fill the forms.

For security reason, i can’t let kobotoolbox on http, but it must be on https.

So i change the configuration to use HTTPS.

use my own ssl certificate:

proxy Port:8080.

This is my nginx configuration:

upstream kobo {
server VM_IP:8080;
}

server{
server_name kf.kobo.lan kc.kobo.lan ee.kobo.lan;
access_log /var/log/nginx/kobo.access.log;
error_log /var/log/nginx/kobo.error_log;
listen 443 ssl;
ssl on;
location / {
proxy_pass http://kobo;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header X-Frame-Options;
add_header X-Frame-Options SAMEORIGIN;

}

ssl_certificate /etc/nginx/conf.d/ssl/kobo-crt.pem;
ssl_certificate_key /etc/nginx/conf.d/ssl/kobo-key.pem;

}

After accessing kobotoolbox on https (kf.kobo.lan) and create form, i have these issues :

  1. I can’t see the preview of the form: Error 500 Something went wrong when trying to process your request.

  1. The form’s link is missing when i deploy it.

NB: There is no syntax error about my form because i have already test it on http (before changing the configuration to https) , everything
works fine . The issue only happens when i put kobotoolbox on https behind a proxy.

Can you help me find a solution to this problem ?

Welcome to the community, @sekdevops! Let me ping @stephenoduor and @ks_1 for your support.

Ok thanks. waiting for your response

1 Like