📜 ⬆️ ⬇️

SharePoint collection site, managed paths, and can subdomains?

This article will discuss SharePoint site collections in the context of possible initial url addresses.
And the most interesting, describes how to create a collection site on a specific url on a subdomain other than the main application.
So, everyone who is interested in the administration of SharePoint, and those who do not know the course 70-331 far and wide, welcome under the cat.

Strongly I will not get into the theory, because it is obvious to those professionals who may be interested in the final thesis of the article. We will talk about url addresses that can be hosted by the SharePoint collection site.

Without a minimum of theory, it would also be wrong.
If you look at the logical architecture of SharePoint sites, we will see the following picture:

image
')
At the head of the table are IIS and web applications, as part of web applications, the site of the collection is located, and in turn, a collection of sites.

From the point of view of addressing, the web application determines the Host Header and the port, which, by the way, can easily be redefined by alternative access (AAM) or web application extension.

As an example, let's have the following web application:

sharepoint2013.mysite.org

Collection sites are containers for sites that already in turn contain information displayed to the user.

At the same time, the site collection always contains the root site.

Sites may have a hierarchy of subsites.

Addresses of subsites are formed as follows:

/subsite1/subsite11/.../subsiteNM/

Collection sites can be placed on managed paths that define the starting address.

Managed paths are of two types:

Creating a site of collections on controlled paths is not a tricky business, it is accessible from the visual interface, and, in general, a rather trivial thing. But we already got to the "salt" of the article.

Let's imagine the situation that we need:


It seems like the idea comes to create different web applications for different subdomains, but you should not do so, if the creation of separate web applications is not due to security policy or any other valid reasons.

By the way, the question is: can there be several web applications on one port? Answer: yes, of course they can, if they are with different Host Headers.

So what to do, you ask, if you do not create separate web applications? How to be?

And for the sake of this answer the whole post. Collection sites can also be on a subdomain other than the Host Header of the web application.

You can create such site collections only through PowerShell.

And here he is:
 Add-PSSnapin Microsoft.SharePoint.PowerShell-ErrorAction SilentlyContinue; New-SPSite "http://spdemo.cibpoint.ru" ` -HostHeaderWebApplication "http://sharepoint2013.cibpoint.ru" ` -Name "SPDemo" ` -OwnerAlias "CIBSPAdmin" ` -Template "STS#0"; New-WebBinding -Name "http://sharepoint2013.cibpoint.ru" ` -IPAddress "*" ` -Port 80 ` -HostHeader "spdemo.cibpoint.ru"; 

Add-PSSnapin - adding snappin to the SharePoint object model, a good tone to make it present.

New-SPSite is a collection site creation cmdlet.


New-WebBinding is one of the components of the miracle. Directly to SharePoint has no relation. This cmdlet sets the IIS setting, namely, it registers the connection with the desired Host Header.

The last component of the “miracle” is to add an entry to the DNS.

As a result, in one web application, on one port, on different subdomains, we have a SharePoint collection site running and working.

Source: https://habr.com/ru/post/210462/


All Articles