更新 SharePoint Server 的 Web 應用程式 URL 和 IIS 繫結Update a web application URL and IIS bindings for SharePoint Server

摘要: 了解如何更新 SharePoint 2013 和 SharePoint Server 2016 的 Web 應用程式和 IIS 繫結。Summary: Learn how to update a web application and IIS bindings for SharePoint 2013 and SharePoint Server 2016.

使用一組 Internet Information Services (IIS) 繫結和備用存取對應 URL,將 Web 應用程式擴充至區域後,您可能決定使用不同的 URL 來連線 Web 應用程式。例如,您原先可能建立 Web 應用程式來使用 HTTP,稍後決定改用 SSL。或者,您可能建立 Web 應用程式來使用 www.contoso1.com 主機標頭,然後決定改用 www.contoso2.com 主機標頭。本文提供變更 Web 應用程式之 URL 和 IIS 繫結的詳細指引。After you have extended a web application into a zone with a set of Internet Information Services (IIS) bindings and alternate access mapping URLs, you might decide that you want to use a different URL to reach the web application. For example, you might have originally created a web application to use HTTP and later decide to use SSL instead. Or, you might create a web application to use the www.contoso1.com host header and then decide to use the www.contoso2.com host header instead. This article provides detailed guidance for changing the URL and IIS bindings of a web application.

注意

本文說明如何變更 Web 應用程式的現有 URL 和 IIS 繫結。若要將其他 URL 和 IIS 繫結新增至 Web 應用程式,可將 Web 應用程式擴充至未使用的區域來達成此目的。This article focuses on changing the existing URL and IIS bindings of a web application. If you want to add additional URLs and IIS bindings to a web application, you can do so by extending the web application into an unused zone.

關於更新 Web 應用程式 URL 和 IIS 繫結About updating a web application URL and IIS bindings

與一般 IIS 應用程式不同的是,如果只是單純使用 IIS 管理員 或其他 IIS Metabase 工具,則無法修改已使用 SharePoint Server 擴充的 IIS Web 應用程式的繫結。Unlike typical IIS applications, you cannot simply use IIS Manager or other IIS metabase tools to modify the bindings of IIS web applications that have been extended with SharePoint Server.

如果藉由新增主機標頭繫結或 SSL 連接埠,或藉由變更連接埠號碼來修改 Web 應用程式的 IIS 繫結,則 SharePoint Server 將無法感知這些變更,並且不會更新 Web 應用程式的備用存取對應 URL。如果更新 Web 應用程式的備用存取對應來變更主機標頭、切換至 SSL URL 或變更連接埠號碼,SharePoint Server 不會將您的 IIS 繫結自動更新為符合的繫結。If you modify the IIS bindings of a web application by adding a host header binding or SSL port or by changing a port number, SharePoint Server will not be aware of these changes and will not update the web application's alternate access mapping URLs. If you update the web application's alternate access mappings to change a host header, switch to an SSL URL, or change a port number, SharePoint Server will not automatically update your IIS bindings to match.

若要更新 Web 應用程式的 URL 或 IIS 繫結,請取消擴充和重新擴充 Web 應用程式,並重新設定備用存取對應 URL 或 IIS 網站繫結。To update the URL or IIS bindings of a web application, unextend and reextend the web application and reconfigure the alternate access mapping URLs or IIS website bindings.

我們不建議您的 HTTP 和 SSL 主機重複使用相同的 IIS 網站。請改為擴充專屬 HTTP 和專屬 SSL 網站,並為每個網站指派其本身的備用存取對應區域和 URL。We do not recommend reusing the same IIS website for your HTTP and SSL hosting. Instead, extend a dedicated HTTP and a dedicated SSL website, with each assigned to its own alternate access mapping zone and URLs.

如需備用存取對應的詳細資訊,請參閱規劃 SharePoint 2013 的備用存取對應For more information about alternate access mappings, see Plan alternate access mappings for SharePoint 2013.

備用存取對應集合對應於下列驗證區域:Alternate access mapping collections correspond to the following authentication zones:

  • 預設Default

  • 內部網路Intranet

  • 網際網路Internet

  • 自訂Custom

  • 外部網路Extranet

取消擴充和重新擴充 Web 應用程式Unextending and reextending a web application

如果您需要變更 IIS 繫結,請從 Web 應用程式已擴充到的區域中取消擴充該 Web 應用程式 (不需要刪除 Web 應用程式),然後將 Web 應用程式重新擴充至相同的區域。請考慮先在測試環境中嘗試這些移轉程序,然後在生產環境中進行部署。If you need to change your IIS bindings, unextend the web application from the zone that the web application has been extended into (without deleting the web application), and then reextend the web application into the same zone. Consider trying these migration procedures in a test environment before deploying them in a production environment.

按照下列程序的說明,使用 [管理中心應用程式管理]**** 頁面的 [從 IIS 網站移除 SharePoint]**** 連結,從區域中取消擴充 Web 應用程式。Unextend the web application from the zone by using the Remove SharePoint from IIS Web site link on the Central Administration Application Management page, as described in the following procedure.

取消擴充 Web 應用程式To unextend a web application

  1. 在 SharePoint 管理中心網站上,在 [web 應用程式]**** 區段中的 [應用程式管理]*,按一下 [管理 web 應用程式]On the SharePoint Central Administration website, on the **Application Management* page, in the Web Applications section, click Manage web applications.

  2. 在 [Web 應用程式]**** 功能表中,按一下您想要取消擴充的 Web 應用程式,按一下 [刪除]*,然後按一下 [從 IIS 網站移除 SharePoint]On the **Web Applications* menu, click the web application you want to unextend, click Delete, and then click Remove SharePoint from IIS Web Site.

  3. 在 [從網站移除 SharePoint]**** 頁面上,按一下要取消擴充的 Web 應用程式。On the Remove SharePoint From Web Site page, click the web application you want to unextend.

  4. 在 [選取要移除的 IIS 網站與區域]**** 清單,按一下要移除的 IIS 網站和區域。由於最多可將 Web 應用程式擴充至五個區域,因此請確定選取正確的 IIS 網站和區域。In the Select IIS Web site and zone to remove list, click the IIS website and zone you want to remove. Because a web application can be extended in up to five zones, make sure you select the correct IIS website and zone.

  5. 如果 IIS 網站目前僅管理 SharePoint 產品和技術內容,請按一下 [刪除 IIS 網站]**** 區段的 [是]*。如果 IIS 網站正在管理其他內容,您可能不想要刪除網站。在此情況下,請按一下 [否]In the **Delete IIS Web sites* section, click Yes if the IIS website is hosting only SharePoint Products and Technologies content. If the IIS web site is hosting other content, you might not want to delete the web site. In that case, click No.

  6. 按一下 [確定]*。這個動作不會刪除 Web 應用程式,也不會刪除 Web 應用程式的內容資料庫。Click *OK. This action does not delete the web application, nor does it delete the content databases of the web application.

取消擴充 Web 應用程式後,您可以使用更新的繫結,將 Web 應用程式重新擴充至相同的區域。After you have unextended the web application, you can reextend the web application to the same zone by using your updated bindings.

重新擴充 Web 應用程式To reextend a web application

  1. 在 SharePoint 管理中心網站上,在 [web 應用程式]**** 區段中的 [應用程式管理]*,按一下 [管理 web 應用程式]On the SharePoint Central Administration website, on the **Application Management* page, in the Web Applications section, click Manage web applications.

  2. 按一下您想要擴充的 Web 應用程式。在功能區中,按一下 [擴充]*Click the web application you want to extend. On the ribbon, click *Extend.

  3. 如果已使用 SharePoint_Server 的適當繫結來建立要使用的 IIS 網站,請在 [IIS 網站]**** 中按一下 [使用現有的 IIS 網站]**** 選項,再從清單選取 IIS 網站。否則,按一下 [建立新的 IIS 網站]**** 選項。In the IIS Web Site section, if you have already created an IIS website with the appropriate bindings for SharePoint_Server to use, click the Use an existing IIS Web site option and select the IIS website from the list. Otherwise, click the Create a new IIS Web site option.

  4. 在 [連接埠]*、[主機標頭]* 和 [使用 Secure Sockets Layer (SSL)]**** 欄位中,輸入要使用的 IIS 繫結。In the Port, Host Header, and Use Secure Sockets Layer (SSL) fields, type the IIS bindings you want to use.

  5. 在 [負載平衡 URL]**** 區段的 [URL]**** 欄位中,輸入使用者將用來尋找此 Web 應用程式的 URL。如果正在使用負載平衡器或反向 Proxy,則為負載平衡器或反向 Proxy 的 URL。In the Load Balanced URL section, in the URL field, type the URL that users will use to locate this web application. If you are using a load balancer or reverse proxy, this is the URL of the load balancer or reverse proxy.

  6. 在 [負載平衡 URL]**** 區段的 [區域]**** 清單中,按一下先前選取的區域。In the Load Balanced URL section, in the Zone list, click the zone that you previously selected.

  7. 按一下 [確定]*Click *OK.

更新 Web 應用程式 URL 和 IIS 繫結的其他步驟Additional steps for updating a web application URL and IIS bindings

若要完成 Web 應用程式 URL 或 IIS 繫結的更新程序,請在將 Web 應用程式重新擴充至相同的區域後,執行本節列出的其他步驟。To complete the process of updating a web application URL or IIS bindings, perform the additional steps listed in this section after you have reextended the web application into the same zone.

更新區域的備用存取對應 URLUpdate the alternate access mapping URLs for the zone

如果使用負載平衡器或反向 Proxy,請確定在備用存取對應中更新您的內部 URL 以反映新的 IIS 繫結。此外,請更新負載平衡器規則或反向 Proxy 規則,以便符合新的 IIS 繫結。If you are using a load balancer or a reverse proxy, make sure that your internal URLs are updated in the alternate access mappings to reflect the new IIS bindings. In addition, update your load balancer rules or your reverse proxy rules to align with the new IIS bindings.

套用 SSL 憑證Apply an SSL certificate

如果新的 IIS 繫結使用 SSL,請將 SSL 憑證套用到指派至您區域的新 IIS 網站。如需如何設定 SSL 的詳細資訊,請參閱設定 Secure Sockets Layer (IIS 6.0)If the new IIS bindings use SSL, apply an SSL certificate to the new IIS website assigned to your zone. For more information about how to configure SSL, see Configuring Secure Sockets Layer (IIS 6.0).

套用驗證方法Apply an authentication method

重新擴充 Web 應用程式時,區域的預設 SharePoint Server 驗證方法是整合式 Windows 驗證。若要使用整合式 Windows 以外的驗證方法,請明確套用您要使用的驗證方法。如需驗證方法的詳細資訊,請參閱在 SharePoint Server 中規劃使用者驗證方法When you reextend your web application, the default SharePoint Server authentication method for the zone is Integrated Windows authentication. If you want to use an authentication method other than Integrated Windows, explicitly apply the authentication method you want to use. For more information about authentication methods, see Plan for user authentication methods in SharePoint Server.

如需如何設定 SharePoint Server 2016 驗證的詳細資訊,請參閱設定 SharePoint Server 中的驗證基礎結構For more information about how to configure authentication for SharePoint Server 2016, see Configure authentication infrastructure in SharePoint Server.

確認搜尋起始位址及我的網站設定Verify the Search start addresses and My Site settings

確認內容來源的 SharePoint Server 搜尋起始位址正確無誤。如果 SharePoint Server 搜尋起始位址不正確,請加以更新。此外,請確認您的 [我的網站] 設定,包括 [個人搜尋中心]、[個人網站提供者] 及預設 [RSS 摘要] 皆正確無誤。如果您的 [我的網站] 設定不正確,請加以更新。如需如何設定 [我的網站] 設定的詳細資訊,請參閱在 SharePoint Server 中設定「我的網站」Verify that the SharePoint Server Search start addresses are correct for your content sources. If the SharePoint Server Search start addresses are incorrect, update them. Also, verify that your My Site settings, including Personal Search Center, Personal Site Provider, and default RSS feed, are correct. If your My Site settings are incorrect, update them. For more information about how to configure My Site settings, see Configure My Sites in SharePoint Server.

如需搜尋起始位址的詳細資訊,請參閱在 SharePoint Server 中規劃編目及同盟For more information about Search start addresses, see Plan crawling and federation in SharePoint Server.

確認受信任檔案位置Verify the trusted file locations

如果 SharePoint Server 2013 的 Excel Services 是部署的一部分,請確認已正確設定受信任檔案位置。如果受信任檔案位置設定不正確,請加以更新。如需受信任檔案位置的詳細資訊,請參閱Configure Excel Services in SharePoint Server 2013If Excel Services in SharePoint Server 2013 is part of your deployment, verify that your trusted file locations are configured correctly. If your trusted file locations are configured incorrectly, update them. For more information about trusted file locations, see Configure Excel Services in SharePoint Server 2013.

注意

SharePoint Server 2013 中的 Excel Services 僅適用於 SharePoint Server 2013。Excel Services in SharePoint Server 2013 is only available in SharePoint Server 2013.

重新部署解決方案Redeploy solutions

從 IIS 網站移除 SharePoint Server 時,如果只移除 Web 應用程式的相關網站或最後一個網站,則也會移除已部署的任何 Web 應用程式解決方案。如果需要這些解決方案,請重新部署。如需如何管理解決方案的其餘資訊,請參閱Install and manage solutions for SharePoint ServerWhen you remove SharePoint Server from an IIS website, if you are removing the last (or only) website that is associated with the web application, any web application solutions you have deployed will also be removed. If you need these solutions, redeploy them. For additional information about how to manage solutions, see Install and manage solutions for SharePoint Server