using (ServerManager manager = new ServerManager())
{
Site configureSite = manager.Sites.Add(webAddress, Path.Combine(root, webAddress), 80);
manager.ApplicationDefaults.ApplicationPoolName = webAddress + @"Pool";
configureSite.TraceFailedRequestsLogging.Enabled = true;
configureSite.TraceFailedRequestsLogging.Directory = log;
configureSite.Bindings.Clear();
configureSite.Bindings.Add(@"*:80:" + webAddress + "." + domain, @"http");