I had this issue in Joomla 3.6 when adding SSL to my development server, and after lots of digging, determined I was a missing an Apache environment variable.
My solution was to add
SetEnv HTTPS on to my Apache VirtualHost config, for all SSL domains.
Joomla queries the $_SERVER['HTTPS'] var to determine the url scheme, and falls back to http:// if that variable is not set. This can lead to a very confusing situation, where you're requesting a secure (https) url, but Joomla internally is converting the request to http, and then infinitely redirecting you to the secure URL – which you already requested in the first place!
The code that determines the URL scheme in Joomla is in /libraries/joomla/application/web.php, in the function detectRequestUri, which starts at around line 840.
If the HTTPS var isn't available on your system, and you don't have access to add it to your apache config, you can add an 'elseif' to check the $_SERVER['SERVER_PORT'] variable, which should be 443 for secure, and then set the scheme to https based on that. However, that would be hacking the Joomla core, and would definitely break on the next update, so that should definitely be a last resort.