Specify an origin-pull HOST for an origin server

更新时间:
复制 MD 格式

If your accelerated domain name uses multiple origin servers and you must use the Host header to request resources from different virtual hosts, use the specific origin-pull HOST feature to configure a unique origin-pull HOST for each origin server.

How it works

The specific origin-pull HOST feature lets you set a unique origin-pull HOST for each origin server. This avoids unnecessary configuration and supports complex business requirements. For more information about the technical principles of the origin-pull HOST, see Configure the default origin-pull HOST.

conditional origin-pull and specific origin-pull HOST are two distinct features for configuring origin-pull behavior. They differ as follows:

  • conditional origin-pull: Determines which origin server to pull content from. It routes requests to different origin servers based on conditions such as the request URL path and parameters.

  • specific origin-pull HOST: Determines the domain name sent in the origin-pull request, which is the Host header in the HTTP request. It allows you to configure a unique origin-pull HOST for each origin server without affecting which origin server the request is routed to.

In multi-origin scenarios, you must use conditional origin-pull and specific origin-pull HOST in combination. First, use conditional origin-pull to route requests to the correct origin servers. Then, use specific origin-pull HOST to set the corresponding Host header, which ensures that each server can respond correctly.

Note

If you configure both a default origin-pull HOST and a specific origin-pull HOST, when POPs access a specific origin server, they use the origin-pull HOST configured for it. This specific configuration takes precedence.

Procedure

  1. Log on to the CDN console.

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

  3. On the Domain Names page, find the target domain name and click Manage in the Actions column.

  4. In the domain's navigation pane, click Origin Fetch.

  5. In the Specify Origin Host section, click Add.

  6. In the Specify Origin Host dialog box, configure the parameters.

    Parameter

    Description

    Origin Type

    Select the type of the origin server.

    • Basic Origin: an origin server address that you specified when you configured an origin server.

    • All Origins: any origin server address from which CDN or pulls content.

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

    Origin Address

    This parameter depends on the Origin Type:

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

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

    • If you set Origin Type to Custom Origin, enter a custom origin server address.

    Origin Host Type

    Select the type of the origin-pull HOST.

    • Basic Origin Domain: an origin server domain name that you specified when you configured an origin server. This option excludes origin servers that use an IP address.

    • Accelerated Domain Name: the current CDN or accelerated domain name.

    • Custom Origin Host: Select this option if the desired origin-pull HOST is not an existing origin server domain name or the accelerated domain name.

    Origin Host

    This parameter depends on the Origin Host Type:

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

    • If you set Origin Host Type to Accelerated Domain Name, this parameter is automatically set to the current CDN or accelerated domain name. No configuration is required.

    • If you set Origin Host Type to Custom Origin Host, enter a custom origin-pull HOST.

    Rule Condition

    A rule condition allows a rule to be applied only when a request meets specific criteria.

    Important

    When a feature references rule conditions, the execution order follows the priority of the associated rule conditions, not the order of the feature configurations.

    • Do not use: Disables conditional rules.

    • You can add or edit conditional rules in the Rules engine.

  7. Click OK.