Why Search APi detect wrong SOLR host?
Ok, localhost replaced by $_SERVER['name'] value is only for presentation purposes. More info here: https://www.drupal.org/node/2512986

I had other issue with SOLR, so that's why it didn't work