Revised and simplied approach on DomainPointer
This change addresses a couple of situations: a) where sites had to be created with a freely chosen hostnames, which was not possible b) we needed a single repository with that would accommodated websites but also sharepoint and tenant specific OWA sites, which was not possible c) The concept of Domain Pointers was ok but appeared hard to understand for the end users and added some complexity/additional steps when adding a new site The domain pointer approach is updated : A) decoupled the “sites” from domain B) Created a new “Domains” Domain Pointer record for each new site created, to keep on track of the various sites created through the platform C) Upon removal of the site the Pointer gets removed as well D) For websites a freely chosen hostname can be taken, similar to sharepoint (which is or generated or chosen by the tenant) E) Removed the pointer displaying/listing from the UI, and show only the top-level and subdomains. This changeset contains fixed on the verification if a website or hostheade (domain pointer) already exists Fix on if no server component dns record (globaldnsrecord) is defined. In order to use user selectable hostnames icw dns provisioning use the variable [host_name] as hostname in the dns definitions. The variable will be replaced
This commit is contained in:
parent
cfb58e3423
commit
731b7f0c24
1 changed files with 9 additions and 9 deletions
|
@ -180,13 +180,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
DomainInfo domain = ServerController.GetDomain(domainId);
|
||||
string domainName = domain.DomainName;
|
||||
|
||||
string siteName = string.IsNullOrEmpty(hostName) ? domainName : hostName + "." + domainName;
|
||||
|
||||
// check if the web site already exists
|
||||
if (PackageController.GetPackageItemByName(packageId, domainName, typeof(WebSite)) != null)
|
||||
if (PackageController.GetPackageItemByName(packageId, siteName, typeof(WebSite)) != null)
|
||||
return BusinessErrorCodes.ERROR_WEB_SITE_ALREADY_EXISTS;
|
||||
|
||||
|
||||
string siteName = string.IsNullOrEmpty(hostName) ? domainName : hostName + "." + domainName; ;
|
||||
|
||||
// place log record
|
||||
TaskManager.StartTask("WEB_SITE", "ADD", siteName);
|
||||
|
||||
|
@ -642,13 +641,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if(bindings.Count == bindingsCount)
|
||||
{
|
||||
bindings.Add(new ServerBinding(ipAddr, "80", domainName));
|
||||
bindings.Add(new ServerBinding(ipAddr, "80", "www." + domainName));
|
||||
bindings.Add(new ServerBinding(ipAddr, "80", string.IsNullOrEmpty(hostName) ? domainName : hostName + "." + domainName));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private static string GetWebSiteUsername(UserSettings webPolicy, string domainName)
|
||||
|
@ -755,6 +751,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (domain == null)
|
||||
return BusinessErrorCodes.ERROR_DOMAIN_PACKAGE_ITEM_NOT_FOUND;
|
||||
|
||||
// check if the web site already exists
|
||||
if (DataProvider.CheckDomain(domain.PackageId, string.IsNullOrEmpty(hostName) ? domain.DomainName : hostName + "." + domain.DomainName, true) != 0)
|
||||
return BusinessErrorCodes.ERROR_WEB_SITE_ALREADY_EXISTS;
|
||||
|
||||
// get zone records for the service
|
||||
List<GlobalDnsRecord> dnsRecords = ServerController.GetDnsRecordsByService(siteItem.ServiceId);
|
||||
|
||||
|
@ -822,7 +822,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
foreach (ServerBinding b in bindings)
|
||||
{
|
||||
string header = string.Format("{0} {1} {2}", b.Host, b.IP, b.Port);
|
||||
TaskManager.WriteParameter("Add Binding", b.Host);
|
||||
TaskManager.WriteParameter("Add Binding", header);
|
||||
}
|
||||
|
||||
// update bindings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue