do not defalt hostname to "localhost" when none is provided, it will prevent access to the server through IP address, for example