public HTTPServer(Configuration config) {
		// Print out some information
		System.out.println("Current version:   " + HTTPServer.class.getPackage().getImplementationVersion());
		System.out.println("Serving at:        " + "http://" + ServerHelper.getServerIp() + ":" + config.getPort());
		System.out.println("Directory:         " + ServerHelper.getCanonicalPath(config.getWebRoot()));
		System.out.println("Directory Listing: " + (config.isDirectoryListingAllowed() ? "yes" : "no"));
		System.out.println("Logfile:           " + (config.getLoggerFile() != null ? config.getLoggerFile().getAbsoluteFile() : "no"));

		// Creates a directory for the content to serve (if needed)
		if (!config.getWebRoot().exists() && !config.getWebRoot().mkdir()) {
			config.getLogger().exception("Unable to create web-root directory.");
			config.getLogger().exception("Exiting...");
			System.exit(1);
		}

		// a new ThreadPooledServer will handle all the requests
		new Thread(new ThreadPooledServer()).start();
	}