def startServer(): server = HTTPServer(("localhost", 80), RequestHandler) print(time.asctime(), "Server started on port 80") try: server.serve_forever() except KeyboardInterrupt: print("Server stopped...")