my $server_name = $ENV{'HTTP_HOST'} || $ENV{'SERVER_NAME'} || '';