Back to Origin Host and Port

Last update:2024-04-30 18:35:51

CDN Back-to-Origin by default uses the acceleration domain and the port requested by the user (client) for back-to-origin. If you need to customize the specific server domain name and back-to-origin port for a CDN back-to-origin request, you can achieve this by configuring the back-to-origin request HOST and back-to-origin request port.

Difference Between Origin Server and Back-to-Origin Request HOST

  • Origin Server: The origin server is the server where your business content is stored, and it determines the specific IP address requested during the back-to-origin process.
  • Back-to-Origin Request HOST: When your origin server has multiple services shared, you can distinguish different services through the back-to-origin request HOST carried in the back-to-origin request. The CDN back-to-origin request header will carry the value of the back-to-origin request HOST field, which determines the specific site accessed at that IP address. This site carries one of the multiple services from the origin server.

How to Set Back-to-Origin Request Host and Back-to-Origin Request Port

You can choose from several entry points for configuration.

Entry Point 1

  1. Log in to the CDNetworks Console and select the appropriate product.
  2. Navigate to the Configuration, locate the domain you wish to configure, and click 巴林王国、安哥拉共和国、巴拉圭共和国和巴拿马共和国新节点上线
  3. Find Back-to-Origin Settings > Alternate Back-to-Origin, set the back-to-origin request port and back-to-origin request HOST.

Entry Point 2

  1. Log in to the CDNetworks Console and select the appropriate product.
  2. Navigate to the Configuration, locate the domain you wish to configure, and click 巴林王国、安哥拉共和国、巴拉圭共和国和巴拿马共和国新节点上线 or Batch Modify Origin, then set the back-to-origin request port and back-to-origin request HOST.

Parameter Description

Parameter Description Example
Back-to-Origin Request Port If the back-to-origin request port is not configured, the original request’s port is followed for back-to-origin. This setting is for the port back to the basic origin. If you need to configure the port back to the advanced origin, please contact CDNetworks technical support. 8141
Back-to-Origin Request HOST When your origin server has multiple services shared, you can distinguish different services through the back-to-origin request HOST carried in the back-to-origin request. www.test.com

After you have completed setting the configurations, please click OK and then select Next to submit your settings. To minimize any potential disruptions to your production environment, we strongly recommend conducting a Pre-deploy test in a staging environment. This crucial step ensures that your configurations are accurate before they go live. Once you have verified the accuracy of the settings, click Deploy Now to implement them in the live environment. The configurations typically become effective within 3-5 minutes. For comprehensive guidance on pre-deployment testing and to verify the effectiveness of your configurations, please consult the tutorial Deploy the Configurations to Staging Environment for Validation.

Best Practices

For the acceleration domain with the back-to-origin domain name www.0011.com, the back-to-origin request host domain as www.test.com, and the back-to-origin request port as 8141.
Suppose the user accesses the resource using the request URL http://acceleration domain/test.jpg, if the CDN has not cached the resource, then when the CDN goes back to origin, it resolves the back-to-origin domain name www.0011.com to get the origin server address (assuming the resolved back-to-origin IP is 1.1.1.1), then the CDN accesses the 1.1.1.1 server for back-to-origin, carrying the request header www.test.com and the port 8141. Consequently, the origin server will find and return the test.jpg file under the www.test.com to the CDN, and ultimately to the user.

Notes

This configuration of back-to-origin request port is for the basic origin. If you need to configure the port back to the advanced origin, please contact CDNetworks technical support.

Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!