快速入門:建立 Azure CDN 設定檔和端點Quickstart: Create an Azure CDN profile and endpoint

在此快速入門中,您會藉由建立新的 CDN 設定檔和端點來啟用 Azure 內容傳遞網路 (CDN)。In this quickstart, you enable Azure Content Delivery Network (CDN) by creating a new CDN profile and CDN endpoint. 在建立設定檔和端點後,您即可開始將內容傳遞給您的客戶。After you have created a profile and an endpoint, you can start delivering content to your customers.

如果您沒有 Azure 訂用帳戶,請在開始前建立 免費帳戶If you don't have an Azure subscription, create a free account before you begin.

先決條件Prerequisites

基於此快速入門的用途,您必須建立名為 mystorageacct123 (作為原始主機名稱) 的儲存體帳戶。For the purposes of this quickstart, you must have created a storage account named mystorageacct123, which you use for the origin hostname. 如需詳細資訊,請參閱整合 Azure 儲存體帳戶與 Azure CDNFor more information, see Integrate an Azure storage account with Azure CDN

登入 Azure 入口網站Log in to the Azure portal

使用您的 Azure 帳戶登入 Azure 入口網站Log in to the Azure portal with your Azure account.

建立新的 CDN 設定檔Create a new CDN profile

CDN 設定檔是 CDN 端點的容器,會指定定價層。A CDN profile is a container for CDN endpoints and specifies a pricing tier.

  1. 在 Azure 入口網站的左上方,選取 [建立資源]。In the Azure portal, in the upper left, select Create a resource.

    [新增] 窗格隨即出現。The New pane appears.

  2. 選取 [Web + 行動],然後選取 [CDN]。Select Web + Mobile, then select CDN.

    選取 CDN 資源

    此時會顯示 [CDN 設定檔] 窗格。The CDN profile pane appears.

    使用影像下方的資料表中指定的設定。Use the settings specified in the table following the image.

    新增 CDN 設定檔

    設定Setting Value
    名稱Name 輸入 my-cdn-profile-123 作為設定檔名稱。Enter my-cdn-profile-123 for your profile name. 此名稱必須是全域唯一的;如果已在使用中,您可以輸入不同名稱。This name must be globally unique; if it is already in use, you may enter a different one.
    訂用帳戶Subscription 從下拉式清單中,選取 Azure 訂用帳戶。Select an Azure subscription from the drop-down list.
    資源群組Resource group 選取 [新建],並輸入 my-resource-group-123 作為資源群組名稱。Select Create new and enter my-resource-group-123 for your resource group name. 此名稱必須是全域唯一的;如果已在使用中,您可以輸入不同名稱。This name must be globally unique; if it is already in use, you may enter a different one.
    資源群組位置Resource group location 從下拉式清單中選取 [美國中部]。Select Central US from the drop-down list.
    定價層Pricing tier 從下拉式清單中選取 [標準 Verizon]。Select Standard Verizon from the drop-down list.
    立即建立新的 CDN 端點Create a new CDN endpoint now 保留為未選取。Leave unselected.
  3. 選取 [釘選至儀表板],以在設定檔建立後將其儲存至儀表板。Select Pin to dashboard to save the profile to your dashboard after it is created.

  4. 選取 [建立] 以建立設定檔。Select Create to create the profile.

建立新的 CDN 端點Create a new CDN endpoint

在您建立 CDN 設定檔後,可以使用它來建立端點。After you've created a CDN profile, you can use it to create an endpoint.

  1. 在 Azure 入口網站中,從儀表板中選取您所建立的 CDN 設定檔。In the Azure portal, select in your dashboard the CDN profile that you created. 如果找不到該檔案,請選取 [所有服務],然後選取 [CDN 設定檔]。If you can't find it, select All services, then select CDN profiles. 在 [CDN 設定檔] 頁面中,選取您要使用的設定檔。In the CDN profiles page, select the profile that you want to use.

    此時會出現 [CDN 設定檔] 頁面。The CDN profile page appears.

  2. 選取 [端點]。Select Endpoint.

    CDN 設定檔

    [新增端點] 頁面隨即出現。The Add an endpoint page appears.

    使用影像下方的資料表中指定的設定。Use the settings specified in the table following the image.

    新增端點窗格

    設定Setting Value
    名稱Name 輸入 my-endpoint-123 作為您的端點主機名稱。Enter my-endpoint-123 for your endpoint hostname. 此名稱必須是全域唯一的;如果已在使用中,您可以輸入不同名稱。This name must be globally unique; if it is already in use, you may enter a different one. 此名稱可用來存取位於網域 <endpoint name>.azureedge.net 的快取資源。This name is used to access your cached resources at the domain <endpoint name>.azureedge.net.
    原始類型Origin type 選取 [儲存體] 。Select Storage.
    原始主機名稱Origin hostname 輸入 mystorageacct123.blob.core.windows.net 作為您的主機名稱。Enter mystorageacct123.blob.core.windows.net for your hostname. 此名稱必須是全域唯一的;如果已在使用中,您可以輸入不同名稱This name must be globally unique; if it is already in use, you may enter a different one
    原始路徑Origin path 保留空白。Leave blank.
    原始主機標頭Origin host header 保留產生的預設值。Leave the default generated value.
    通訊協定Protocol 保留已選取的預設值 HTTPHTTPS 選項。Leave the default HTTP and HTTPS options selected.
    原始連接埠Origin port 保留預設的連接埠值。Leave the default port values.
    最佳化對象Optimized for 保留預設選項 [一般 Web 傳遞]。Leave the default selection, General web delivery.
  3. 選取 [新增] 來建立新的端點。Select Add to create the new endpoint.

    端點建立之後,即會出現在設定檔的端點清單中。After the endpoint is created, it appears in the list of endpoints for the profile.

    CDN 端點

    因為需要一段時間才能傳播註冊,所以端點不會立即可供使用:Because it takes time for the registration to propagate, the endpoint isn't immediately available for use:

    • 若為來自 Microsoft 的標準 Azure CDN設定檔,通常會在 10 分鐘內完成傳播。For Azure CDN Standard from Microsoft profiles, propagation usually completes in 10 minutes.
    • 若為來自 Akamai 的標準 Azure CDN 設定檔,通常會在一分鐘內完成傳播。For Azure CDN Standard from Akamai profiles, propagation usually completes within one minute.
    • 若為來自 Verizon 的標準 Azure CDN來自 Verizon 的進階 Azure CDN 設定檔,通常會在 90 分鐘內完成傳播。For Azure CDN Standard from Verizon and Azure CDN Premium from Verizon profiles, propagation usually completes within 90 minutes.

清除資源Clean up resources

在前述步驟中,您在資源群組中建立了 CDN 設定檔和端點。In the preceding steps, you created a CDN profile and an endpoint in a resource group. 如果您想移至後續步驟並了解如何將自訂網域新增至您的端點,請儲存這些資源。Save these resources if you want to go to Next steps and learn how to add a custom domain to your endpoint. 不過,如果您認為未來不需要使用這些資源,可以藉由刪除資源群組的方式將其刪除,以避免額外的費用:However, if you don't expect to use these resources in the future, you can delete them by deleting the resource group, thus avoiding additional charges:

  1. 從 Azure 入口網站的左側功能表中,依序選取 [資源群組] 和 [my-resource-group-123]。From the left-hand menu in the Azure portal, select Resource groups and then select my-resource-group-123.

  2. 在 [資源群組] 頁面上選取 [刪除資源群組],在文字方塊中輸入 my-resource-group-123,然後選取 [刪除]。On the Resource group page, select Delete resource group, enter my-resource-group-123 in the text box, then select Delete.

    此動作將會刪除資源群組、設定檔,以及您在此快速入門中建立的端點。This action will delete the resource group, profile, and endpoint that you created in this quickstart.

後續步驟Next steps

若要了解如何將自訂網域新增至您的 CDN 端點,請參閱下列教學課程:To learn about adding a custom domain to your CDN endpoint, see the following tutorial: