Getting hostname from localhost.