All Products
Search
Document Center

CDN:Specify the origin host for each origin

更新時間:Jan 26, 2024

If an accelerated domain name is configured with multiple origin servers, and you want to retrieve resources from different virtual sites based on the value of the HOST header, you can specify the origin host for each origin server.

Overview

The topic Configure the default origin host describes how to configure the default origin host and how it works. However, if your accelerated domain name is configured with multiple origin servers, and you continue to use the default origin host feature, the domain name that is configured for the default origin host feature is used to access all origin servers. In this case, the virtual site that corresponds to the requested domain name must be configured for all origin servers. The specified origin host feature allows you to configure different origin hosts for different origin servers. This is suitable for more complex business scenarios.

Note

If you configure the default origin host and specified origin host, points of presence (POPs) redirect a request to an origin server by using the origin host that is configured for the origin server.

Procedure

  1. Log on to the Alibaba Cloud CDN console.

  2. In the left-side navigation pane, click Domain Names.

  3. On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column.

  4. In the left-side navigation tree of the domain name, click Origin Fetch.

  5. In the Origin Host for Each Origin section, click Add.

  6. In the Specify Origin Host dialog box, configure the parameters. The following table describes the parameters.

    指定源站HOST

    Parameter

    Description

    Origin Type

    Select the type of origin server that you want to configure from the drop-down list:

    • Basic Origin: the origin server that is added when you configure an origin server. For more information, see Configure an origin server.

    • All Origins: any origin server to which Alibaba Cloud CDN redirects requests. If you set the Origin Type parameter to All Origins, the value of the Origin Host parameter is Follow Origin Address.

    • Custom Origin: If the origin server that you want to configure is not in the origin server list, you can set the value to Custom Origin.

    Origin Address

    Relationship between this parameter and the Origin Type parameter:

    • If you set the Origin Type parameter to Basic Origin, you can select an origin address from the drop-down list.

    • If you set the Origin Type parameter to All Origins, you do not need to configure the origin address.

    • If you set the Origin Type parameter to Custom Origin, you can enter a custom origin address.

    Origin Host Type

    Select the type of origin host that you want to configure from the drop-down list:

    • Basic Origin Domain: the domain name of the origin server that is added when you configure an origin server. The address type of the origin server cannot be IP address. For more information, see Configure an origin server.

    • Accelerated Domain Name: the domain name that is accelerated by Alibaba Cloud CDN.

    • Custom Origin Host: If the origin host that you want to configure is not in the origin server list and is not an accelerated domain name, you can specify a custom origin host.

    Origin Host

    Relationship between this parameter and Origin Host Type:

    • If you set the Origin Host Type parameter to Basic Origin Domain, you can select an origin host from the drop-down list.

    • If you set the Origin Host Type parameter to Accelerated Domain Name, the origin host is the domain name that is accelerated by Alibaba Cloud CDN.

    • If you set the Origin Host Type parameter to Custom Origin Host, you can specify a custom origin host.

  7. Click OK.