Fix $_SERVER['SERVER_NAME'] and $_SERVER['PORT']