@@ -52,12 +52,12 @@ /** URL of the server. It will be automatically built including https mode */ $wgServer = ''; -if( isset( $_SERVER['SERVER_NAME'] ) ) { - $wgServerName = $_SERVER['SERVER_NAME']; -} elseif( isset( $_SERVER['HOSTNAME'] ) ) { +if( isset( $_SERVER['HOSTNAME'] ) ) { $wgServerName = $_SERVER['HOSTNAME']; } elseif( isset( $_SERVER['HTTP_HOST'] ) ) { $wgServerName = $_SERVER['HTTP_HOST']; +} elseif( isset( $_SERVER['SERVER_NAME'] ) ) { + $wgServerName = $_SERVER['SERVER_NAME']; } elseif( isset( $_SERVER['SERVER_ADDR'] ) ) { $wgServerName = $_SERVER['SERVER_ADDR']; } else {