I am getting variable results from the $_SERVER['HTTP_HOST'] variable in the functions.php file of our child theme.
Let me explain our setup and then I'll explain the issue. We are running WP 3.5.2 on Nginx with PageLines 2.4 as our parent theme and a handful of plugins that I can detail if necessary. Our virtual host is set to answer to *.salesgenie.com as we have several private label subdomains that will change the branding of the site. www.salesgenie.com will be the generic domain but att.salesgenie.com is an example of a branded subdomain.
So I need to be able to detect the subdomain the client calls with which I am trying to get with $_SERVER['HTTP_HOST']. The issue is that $_SERVER['HTTP_HOST'] is accurate the first time a client comes to their domain but reverts to the $_SERVER['SERVER_NAME'] value after that either on page reload or navigation to any other page. I have gone through disabling all plugins in our test environment and that made no difference but when I switched to the TwentyTwelve them the HTTP_HOST worked just fine. I tried upgrading to PL 2.4.4 and it had the same problem.
To test this I've got a function logging the $_SERVER['SERVER_NAME'] and $_SERVER['HTTP_HOST'] to a cookie called CmsCookie and you can test it by going to(the CNAME is working) and both variables will read cms.salesgenie.com. But if you modify your host file to point att.salesgenie.com at 220.127.116.11 then you can test att.salesgenie.com and the cookie will be correct the first time you hit a page, but if you reload, both server name and host will be cms.salesgenie.com
Any ideas what in Pagelines is changing the HTTP_HOST?