How to get the base url? (Drupal 7.22)
We need to create a menu link to an external site, "https://example.com/some/path"
/some/path is static, whereas "https://example.com" depends on site instance, such as 

web-dev.example.com

web-qa.exmple.com

web-rc.example.com

I would think that this could be accomplished with $GLOBALS['base_root'];
for example:
$url = $GLOBALS['base_root'] . '/some/path';

On local (laptop) $GLOBALS['base_root'] resolves correctly, but on CentoOS
$GLOBALS['base_root'] resolves to [http://default]

How do we dynamically get the actual current site domain?
This can't be so hard, what are we missing?
If this is a fully bootstrapped Drupal site, the superglobal $base_url, should get you what you want. See: https://api.drupal.org/api/drupal/developer!globals.php/global/base_url/7

However, these globals are not initialized until Drupal is fully bootstrapped.

If you need to sniff the base URL before Drupal is fully bootstrapped you can use the PHP $_SERVER superglobal.

For example:

function _get_base_url(){
  $protocol = ($_SERVER['HTTPS'] &amp;&amp; ($_SERVER['HTTPS'] != "off")) ? "https" : "http";
  return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}