private void validateServer() throws ServerException
	{
		//check configuration
		if (this.configuration == null)
			throw new ServerException("Missing configuration");
		if (this.domains == null || this.domains.isEmpty())
			throw new ServerException("Missing or no domains");
		if (this.mimeTypes == null || this.mimeTypes.isEmpty())
			throw new ServerException("Missing or no MIME types");
		if (this.mappings == null || this.mappings.isEmpty())
			throw new ServerException("Missing or no request mappings");
		
		//validate domain directories exist
		for (Domain domain : this.domains)
			if (!domain.getDirectory().exists())
				throw new ServerException("Directory for domain '" + domain.getName() + "' does not exist at '" + domain.getDirectory() + "'");
	}