在 SharePoint 中擴充宣告式 Web 應用程式Extend claims-based web applications in SharePoint

適用於:是2013年是2016年是2019年沒有SharePoint OnlineAPPLIES TO: yes2013 yes2016 yes2019 noSharePoint Online

您可以使用 管理中心 擴充使用宣告式驗證的 Web 應用程式。擴充 Web 應用程式時,您會使用其他 IIS 網站主控相同的內容,以向不同組的使用者公開相同的內容。You can extend a web application that uses claims-based authentication by using Central Administration. When you extend a web application, you expose the same content to different sets of users by using an additional IIS web site to host the same content.

使用管理中心擴充宣告式 Web 應用程式Extend a claims-based web application by using Central Administration

您可以利用本節所述的程序,使用管理中心擴充宣告式 SharePoint Server Web 應用程式。Use the procedure described in this section to extend a claims-based SharePoint Server web application using the Central Administration.

擴充宣告式 Web 應用程式To extend a claims-based web application

  1. 啟動 SharePoint 2016 管理中心。Start SharePoint 2016 Central Administration.

  2. 在管理中心首頁上,按一下 [應用程式管理]**** 區段中的 [管理 Web 應用程式]****。On the Central Administration Home page, in the Application Management section, click Manage web applications.

  3. 選取您要擴充的 Web 應用程式,然後在功能區的 [參與]**** 群組中,按一下 [延伸]****。Select the web application you want to extend and, in the Contribute group of the ribbon, click Extend.

  4. 在「擴充 Web 應用程式至其他 IIS 網站」**** 頁面的 [IIS 網站]**** 區段中,選取下列兩個選項之一,以設定擴充之 Web 應用程式的設定:On the Extend Web Application to Another IIS Web Site page, in the IIS Web Site section, configure the settings for your extended web application by selecting one of the following two options:

  • 按一下 [使用現有的 IIS 網站]****,然後選取要擴充現有 Web 應用程式的網站。Click Use an existing IIS web site, and then select the web site on which to extend your existing web application.

  • 按一下 [建立新的 IIS 網站]****,然後在 [名稱]**** 方塊中輸入網站的名稱。Click Create a new IIS web site, and then type the name of the web site in the Name box.

  1. 在 [IIS 網站]**** 區段的 [連接埠]**** 方塊中,輸入您要用以存取 Web 應用程式的連接埠號碼。若要建立新的網站,此方塊會包含建議的連接埠號碼。若要使用現有的網站,此方塊會包含目前的連接埠號碼。In the IIS Web Site section, in the Port box, type the port number you want to use to access the web application. If you are creating a new web site, this box contains a suggested port number. If you are using an existing web site, this box contains the current port number.

    注意

    HTTP 存取的預設連接埠號碼為 80,而 HTTPS 存取的預設連接埠號碼為 443。若要讓使用者直接存取 Web 應用程式,而不需輸入連接埠號碼,請使用適當的預設連接埠號碼。The default port number for HTTP access is 80, and the default port number for HTTPS access is 443. To enable users to access the web application without typing in a port number, use the appropriate default port number.

  2. 選用:在 [IIS 網站]**** 區段的 [主機標頭]**** 方塊中,輸入您要用以存取 Web 應用程式的主機名稱 (例如 www.contoso.com)。Optional: In the IIS Web Site section, in the Host Header box, type the host name (for example, www.contoso.com) that you want to use to access the web application.

    注意

    除非您要設定兩個以上的 IIS 網站在同一部伺服器上使用相同的連接埠,且已設定 DNS 將多部伺服器名稱指向同一部伺服器,否則此方塊一般會是空白。In general, this box is empty unless you want to configure two or more IIS web sites to use the same port on the same server and DNS has been configured to point multiple server names to the same server.

  3. 在 [IIS 網站]**** 區段的 [路徑]**** 方塊中,輸入網站目錄在伺服器上的路徑。若要建立新的網站,此方塊會包含建議的路徑。若要使用現有的網站,此方塊會包含該網站的目前路徑。In the IIS Web Site section, in the Path box, type the path to the site directory on the server. If you are creating a new web site, this box contains a suggested path. If you are using an existing web site, this box contains the current path of that web site.

  4. 在 [安全性設定]**** 區段中,選取您要用於 Web 應用程式的驗證方法,並選擇是否要使用 [使用 Secure Sockets Layer (SSL)]****。In the Security Configuration section, select the authentication method that you want to use for the web application and choose whether or not to use Use Secure Sockets Layer (SSL).

    重要

    在支援伺服器對伺服器驗證和應用程式驗證的案例中部署 Web 應用程式時,需要 Secure Sockets Layer (SSL)。如需詳細資訊,請參閱<在 SharePoint Server 中規劃伺服器對伺服器的驗證>。Secure Sockets Layer (SSL) is a requirement for web applications that are deployed in scenarios that support server-to-server authentication and app authentication. For more information, see Plan for server-to-server authentication in SharePoint Server.

  • 在 [驗證提供者]**** 下,選取 [NTLM]**** 或 [交涉 (Kerberos)]****。Under Authentication provider, select NTLM or Negotiate (Kerberos).

    Kerberos 是與整合式 Windows 驗證併用之建議安全性設定。Kerberos 需要網域管理員的特殊設定。NTLM 驗證適用於任何應用程式集區帳戶。Kerberos is the recommended security configuration to use with Integrated Windows authentication. Kerberos requires special configuration by the domain administrator. NTLM authentication will work with any application pool account.

  • 在 [安全性設定]**** 區段中,針對 [使用 Secure Sockets Layer (SSL)]**** 選項按一下 [是]**** 或 [否]****。若選擇 [是]****,則必須要求及安裝 SSL 憑證,以設定 SSL。如需如何設定 SSL 的詳細資訊,請參閱如何在 IIS 7.0 上設定 SSLIn the Security Configuration section, click Yes or No for the Use Secure Sockets Layer (SSL) options. If you choose Yes, you must request and install an SSL certificate to configure SSL. For more information about how to set up SSL, see How to Setup SSL on IIS 7.0.

  1. 在 [公用 URL]**** 區段中,輸入使用者將在此 Web 應用程式中存取之所有網站的網域名稱 URL。此 URL 會是 Web 應用程式各頁面上所有連結的基底 URL。預設 URL 是目前伺服器的名稱與連接埠。In the Public URL section, type the URL for the domain name for all sites that users will access in this web application. This URL will be the base URL for links on pages within the web application. The default URL is the current server name and port.

  2. 在 [公用 URL]**** 區段中,從下拉式功能表中選取要用於 Web 應用程式的區域。In the Public URL section, select the zone to use for the web application in the drop-down menu.

  3. 按一下 [確定]**** 擴充現有 Web 應用程式。Click OK to extend the existing web application.

擴充 Web 應用程式和跨網站發佈Extended web applications and cross-site publishing

如果您是使用跨網站發佈,請小心擴充 Web 應用程式。根據擴充其 Web 應用程式的網站集合,可以將易記 URL 分成目錄項目。以下是您應該處理的作業:If you're using cross-site publishing, be careful about extending the web application. Depending on which site collection you extend the web application for, it can break the friendly URLs to your catalog items. Here's what you should do:

  • 在製作網站上,請不要擴充 Web 應用程式。它會將易記 URL 分成目錄項目。例如,目錄項目的 URL 不會指向易記 URLhttp://www.contoso.com/Computers/model101,而是指向製作網站中的目錄項目,例如http://www.contoso.com/sites/catalog/Lists/Products/DispForm.aspx?ID=1&Source=http%3A%2F%.On your authoring site, don't extend the web application. It'll break the friendly URLs to your catalog items. For example, the URL to your catalog item will not point to the friendly URL http://www.contoso.com/Computers/model101 but to the catalog item in your authoring site, for example http://www.contoso.com/sites/catalog/Lists/Products/DispForm.aspx?ID=1&Source=http%3A%2F%.

  • 在製作網站上,如果您想要擴充 Web 應用程式 (例如用以支援不同的驗證提供者),則必須在將發佈網站連接至目錄 之前 擴充 Web 應用程式 (如 將發佈網站連線到 SharePoint Server 中目錄所述)。如果您已將發佈網站連接至目錄,請執行下列作業:On your publishing site, if you want to extend the web application, for example to support different authentication providers, you have to extend the web application before you connect your publishing site to a catalog as described in Connect a publishing site to a catalog in SharePoint Server. If you've already connected your publishing site to a catalog, do the following:

  1. 中斷發佈網站與目錄的連線。Disconnect the publishing site from the catalog.

  2. 擴充發佈網站的 Web 應用程式。Extend the web application for your publishing site.

  3. 重複將發佈網站連接至目錄的程序。Repeat the procedure of connecting your publishing site to the catalog.

另請參閱See also

其他資源Other Resources

New-SPWebApplicationExtensionNew-SPWebApplicationExtension

在 SharePoint Server 中建立宣告式 Web 應用程式Create claims-based web applications in SharePoint Server