diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs index d7e0a36a..4dd29dc7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs @@ -47,10 +47,10 @@ namespace WebsitePanel.EnterpriseServer public static int AddZone(int packageId, int serviceId, string zoneName) { - return AddZone(packageId, serviceId, zoneName, true); + return AddZone(packageId, serviceId, zoneName, true, false); } - public static int AddZone(int packageId, int serviceId, string zoneName, bool addPackageItem) + public static int AddZone(int packageId, int serviceId, string zoneName, bool addPackageItem, bool ignoreGlobalDNSRecords) { // get DNS provider DNSServer dns = GetDNSServer(serviceId); @@ -148,13 +148,17 @@ namespace WebsitePanel.EnterpriseServer zoneRecords.Add(ns); } - // add all other records - zoneRecords.AddRange(BuildDnsResourceRecords(records, "", zoneName, "")); + if (!ignoreGlobalDNSRecords) + { + // add all other records + zoneRecords.AddRange(BuildDnsResourceRecords(records, "", zoneName, "")); + } // add zone records dns.AddZoneRecords(zoneName, zoneRecords.ToArray()); + // add secondary zones foreach (int secondaryId in secondaryServiceIds) { @@ -443,7 +447,7 @@ namespace WebsitePanel.EnterpriseServer if (!dns.ZoneExists(itemName)) { // create primary and secondary zones - AddZone(packageId, serviceId, itemName, false); + AddZone(packageId, serviceId, itemName, false, false); // restore records XmlSerializer serializer = new XmlSerializer(typeof(DnsRecord)); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs index 6ab389c3..0be8b46c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs @@ -1852,7 +1852,7 @@ namespace WebsitePanel.EnterpriseServer int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Dns); if (serviceId > 0) { - zoneItemId = DnsServerController.AddZone(packageId, serviceId, domainName); + zoneItemId = DnsServerController.AddZone(packageId, serviceId, domainName, true, isInstantAlias); } if (zoneItemId < 0) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs index 708e00da..64a9446f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs @@ -642,7 +642,15 @@ namespace WebsitePanel.EnterpriseServer DomainInfo ZoneInfo = ServerController.GetDomain(domain.ZoneName); if (ZoneInfo == null) - throw new Exception("failed to retrieve parent zone"); + throw new Exception("Parent zone not found"); + + //cleanup certificates + List certificates = GetCertificatesForSite(siteItemId); + foreach (SSLCertificate c in certificates) + { + DeleteCertificate(siteItemId, c); + } + List pointers = GetWebSitePointers(siteItemId); foreach (DomainInfo pointer in pointers) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config index 4df2c0f1..11cbebba 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config @@ -5,11 +5,11 @@ - + - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddSite.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddSite.ascx.resx index b4919109..f34ebbf3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddSite.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesAddSite.ascx.resx @@ -142,7 +142,7 @@ If you need your web site to be accessible via dedicated IP address or you are planning to enable SSL for your site you should choose "Dedicated IP" option; otherwise leave this settings by default. In order to create IP-based site you need to purchase IP address from your host. - Note: A Zone Template is often defined by your host and contains additional Web Site Pointers to create when creating a new Web Site. Static record definitions such as 'www' conflicts when creating an additional Web Site in the same Domain. </p>Do not check the option to include the Zone Template and create the new Web Site with this Web Site Pointer only. + Dedicated