This normally occurs when $CFG->wwwroot in config.php is HTTP but the site in Apache or Nginx is HTTPS. This setting must match the address being used to access the site, so check it's:
$CFG->wwwroot = 'https://mysub.domain';
if using HTTPS to access the site.