設定 SharePoint Server 的備用存取對應Configure alternate access mappings for SharePoint Server

摘要:了解如何在 SharePoint 2013 或 SharePoint Server 2016 中設定備用存取對應。Summary: Learn how to configure alternate access mappings in SharePoint 2013 or SharePoint Server 2016.

每一個 Web 應用程式皆可以與內部及公用 URL 之間的一組對應集合建立關聯。內部與公用 URL 都會包含完整 URL 的通訊協定與網域部分 (例如 https://www.fabrikam.com)。公用 URL 是使用者連入 SharePoint 網站時輸入的 URL,而此 URL 即是頁面連結中所顯示的 URL。內部 URL 包含在傳送至 SharePoint 網站的 URL 要求中。在多伺服器陣列中,可以有多個內部 URL 與單一公用 URL 建立關聯 (例如,負載平衡器可以將特定 IP 位址的要求傳遞至負載平衡叢集中的各伺服器)。Each web application can be associated with a collection of mappings between internal and public URLs. Both internal and public URLs consist of the protocol and domain portions of the full URL (for example, https://www.fabrikam.com). A public URL is what users type to access the SharePoint site, and that URL is what appears in the links on the pages. Internal URLs are in the URL requests that are sent to the SharePoint site. Many internal URLs can be associated with a single public URL in multi-server farms (for example, when a load balancer routes requests to specific IP addresses to various servers in the load-balancing cluster).

每個 web 應用程式支援每個 URL 對應的五個的集合。五個集合會對應至五個區域 (預設值、 內部網路、 外部網路、 Internet 及自訂)。如果 web 應用程式的內部 URL 中將特定區域收到要求上傳回給使用者的網頁, 連結有該區域的公用 URL。如需詳細資訊,請參閱規劃 SharePoint 2013 的備用存取對應Each web application supports five collections of mappings per URL. The five collections correspond to five zones (default, intranet, extranet, Internet, and custom). When the web application receives a request for an internal URL in a particular zone, links on the pages returned to the user have the public URL for that zone. For more information, see Plan alternate access mappings for SharePoint 2013.

管理備用存取對應Manage alternate access mappings

  1. 在 SharePoint 管理中心網站上按一下 [系統設定]。On the SharePoint Central Administration website, click System Settings.

  2. 按一下 [系統設定] 頁面上的 [伺服器陣列管理] 區段中的 [設定備用存取對應]。On the System Settings page, in the Farm Management section, click Configure alternate access mappings.

如需如何使用 Microsoft PowerShell Cmdlet 來執行此程序的詳細資訊,請參閱<New-SPAlternateUrl>。For information about how to perform this procedure using a Microsoft PowerShell cmdlet, see New-SPAlternateUrl.

新增內部 URLAdd an internal URL

  1. 在 [備用存取對應] 頁面上,按一下 [新增內部 UrlOn the Alternate Access Mappings page, click Add Internal URLs.

  2. 如果未指定您想要變更的對應集合,然後選擇其中一個。在 [備用存取對應集合] 區段中,按一下 [備用存取對應集合] 功能表中按一下 [變更備用存取對應集合]。If the mapping collection that you want to change is not specified, then choose one. In the Alternate Access Mapping Collection section, on the Alternate Access Mapping Collection menu, click Change alternate access mapping collection.

  3. 在 [選取備用存取對應集合] 頁面上,按一下對應集合。On the Select an Alternate Access Mapping Collection page, click a mapping collection.

  4. 在 [新增內部 URL ] 區段的 [ URL 通訊協定、 主機及連接埠] 方塊中輸入新的內部 URL (例如https://www.fabrikam.com)。In the Add internal URL section, in the URL protocol, host and port box, type the new internal URL (for example, https://www.fabrikam.com).

  5. 在 [區域] 清單中,按一下區域的內部 URL。In the Zone list, click the zone for the internal URL.

  6. 按一下 [儲存]。Click Save.

編輯或刪除內部 URLEdit or delete an internal URL

注意

[!附註] 您無法刪除預設區域的最後一個內部 URL。You can't delete the last internal URL for the default zone.

  1. 在 [備用存取對應] 頁面上,按一下您想要編輯或刪除內部 URL。On the Alternate Access Mappings page, click the internal URL that you want to edit or delete.

  2. 在 [編輯內部 URL ] 區段中,變更 [ URL 通訊協定、 主機及連接埠] 方塊中的 URL。In the Edit internal URL section, change the URL in the URL protocol, host and port box.

  3. 在 [區域] 清單中,按一下區域的內部 URL。In the Zone list, click the zone for the internal URL.

  4. 執行下列其中一項操作:Do one of the following:

    • 按一下 [儲存] 以儲存變更。Click Save to save your changes.

    • 按一下 [取消] 以捨棄變更並返回 [備用存取對應] 頁面。Click Cancel to discard your changes and return to the Alternate Access Mappings page.

  5. 按一下 [刪除] 以刪除內部 URL。Click Delete to delete the internal URL.

如需如何使用 Microsoft PowerShell Cmdlet 來執行此程序的詳細資訊,請參閱<Remove-SPAlternateUrl>。For information about how to perform this procedure using a Microsoft PowerShell cmdlet, see Remove-SPAlternateUrl.

編輯公用 URLEdit public URLs

注意

[!附註] 預設區域必須一律有公用 URL。There must always be a public URL for the default zone.

  1. 在 [ 備用存取對應] 頁面上,按一下 [ 編輯公用 URL]。On the Alternate Access Mappings page, click Edit Public URLs.

  2. 如果未指定您想要變更的對應集合,然後選擇其中一個。在 [備用存取對應集合] 區段中,按一下 [備用存取對應集合] 功能表中按一下 [變更備用存取對應集合]。If the mapping collection that you want to change is not specified, then choose one. In the Alternate Access Mapping Collection section, on the Alternate Access Mapping Collection menu, click Change alternate access mapping collection.

  3. 在 [選取備用存取對應集合] 頁面上,按一下對應集合。On the Select an Alternate Access Mapping Collection page, click a mapping collection.

  4. 在 [公用 Url ] 區段中,您可以新增新的 Url 或編輯現有的 Url 中任何下列的文字方塊:In the Public URLs section, you can add new URLs or edit existing URLs in any of the following text boxes:

    • 預設Default

    • 內部網路Intranet

    • 外部網路Extranet

    • 網際網路Internet

    • 自訂Custom

  5. 按一下 [儲存]。Click Save.

對應至外部資源Map to an external resource

您也可以針對內部網路應用程式之外的資源定義對應。若要執行此作業,您必須提供唯一名稱、初始 URL 以及該 URL 的區域。(URL 對伺服器陣列而言必須是唯一的。)You can also define mappings for resources outside intranet applications. To do so, you must supply a unique name, initial URL, and a zone for that URL. (The URL must be unique to the farm.)

  1. 在 [備用存取對應] 頁面上,按一下 [對應至外部資源On the Alternate Access Mappings page, click Map to External Resource.

  2. 在 [建立外部資源對應] 頁面上 [資源名稱] 方塊中,輸入唯一的名稱。On the Create External Resource Mapping page, in the Resource Name box, type a unique name.

  3. 在 [ URL 通訊協定、 主機及連接埠] 方塊中輸入初始 URL。In the URL protocol, host and port box, type the initial URL.

  4. 按一下 [儲存]。Click Save.