Hello,
I implemented a ssl connection for my canvas LMS application.The configuration of the canvas, nginx and unicorn was straightforward but I am currently facing issues that blocks the application. I went through some posts about SSL with canvas but I didn't see similar issues so far, so if there are some wise advice please share.
Here is the issue I having:
And here are my configuration files:
For domain.yml:
production:
domain: mydomain.com
ssl: true
for my nginx configuration file:
upstream unicorn_lms {
server unix:/tmp/unicorn.my_app_production.sock fail_timeout=0;
}
server {
listen 80;
server_name mydomain.com;
return 301 https://$host$request_uri;
}
server {
listen 443;
ssl on;
ssl_certificate /etc/nginx/ssl/lms-server.pem;
ssl_certificate_key /etc/nginx/ssl/lms.key;
server_name www.mydomain.com mydomain.com;
access_log /var/log/nginx/access.log combined;
error_log /var/log/nginx/error.log;
root /home/deploy/canvas/my_app_production/current/public;
if (-f $document_root/system/maintenance.html) {
return 503;
}
error_page 503 @maintenance;
location @maintenance {
rewrite ^(.*)$ /system/maintenance.html last;
break;
}
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @unicorn_lms;
location @unicorn_lms {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn_lms;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
if (-f $document_root/system/maintenance.html) {
return 503;
}
error_page 503 @maintenance;
location @maintenance {
rewrite ^(.*)$ /system/maintenance.html last;
break;
}
}
I already did some applications using SSL and this is basic nginx SSL implementation, also i hope I didn't do any mistake.
I already had similar issues before but it was because some assets were coming from a not secure connection, however this time the message show that the endpoints itself is not secure...
I did a search through my source code using
trying to found if the deployment didn't generate some global variable or hard coded url in the code but no result.
The only thing left is the DB itself, just hope I won't have to change things there.
Any comments, advises?
Many thanks,
Aurelien