Aws Elastic Beanstalk

I’m hosting my yii application on EB, and it’s currently working properly on a single instance. However, if I attempt to migrate to a load balanced environment, a blank page is displayed.

The way my app works, is I have a controller that inherits from CController and in it’s init function it parses the server name and builds the appropriate branded user interface based on that value, like so:

$hostname = $_SERVER[‘SERVER_NAME’];

$myUrl = explode(".", strtolower($hostname));

I think that ELB is not parsing this value. How can I get the server name in ELB?