SharePoint 2013

1. 详细操作可参考此文章 的 Deployment and configuration for host-named site collections区域,简单来说,需要以下三行PowerShell脚本;

//创建一个不包含host header的web application
New-SPWebApplication -Name 'Contoso Sites' -port 80 -ApplicationPool ContosoAppPool -ApplicationPoolAccount (Get-SPManagedAccount 'Contosospfarm') -AuthenticationProvider (New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication) //创建一个默认站点(非host-named) New-SPSite 'http://SharePoint2013' -Name 'Portal' -Description 'Portal on root' -OwnerAlias 'contosospadmin' -language 1033 -Template 'STS#0'
//创建一个host-named站点集 New-SPSite 'http://portal.contoso.com' -HostHeaderWebApplication 'http://sharepoint2013' -Name 'Portal' -Description 'Customer root' -OwnerAlias 'contosospadmin' -language 1033 -Template 'STS#0'

2. 若要为 host-named site collection 添加其它网址,可以参考此文章的Map URLs to host-named site collections区域,例如:

Set-SPSiteUrl (Get-SPSite 'http://portal.contoso.com') -Url 'http://teamsites.contoso.com' -Zone Intranet

3. host-named site collection 的所有网址都要在 DNS中创建对应节点(创建节点后等待几分钟后即可生效);

4. 

原文地址:https://www.cnblogs.com/qijiage/p/5067041.html