This article explains how to configure the origin server to work with the cdn
Origin HTTP Server
The origin server could be any http server, e.g. nginx, Apache, IIS. In some cases it could be a streaming media server like Wowza.
This server is the place we will get the content from when it is requested through the cdn.
In the control panel, there is a field named “Origin” in which you enter the address of this server.
This field allows the address to be either http:// or https:// and also supports a port number if needed. You can also specify a sub-directoy.
In the control panel, your site “Name” is the reference used to connect the site to the origin content.
If you specified a CNAME-compatible name e.g. cdn.yoursite.com then you should configure your dns server for this cname (please see below in DNS section)
Content is then accessible on the cdn using http://cdn.yoursite.com/directory/file, which return the origin file at http://www.yoursite.com/directory/file
It is also accessible at http://<cdn address>/cdn.yoursite.com/directory/file (you must use this method if the name is not a cname)
Subdirectory note: As in the final example above, http://www.yoursite.com/images, the sub-directory is the entry point, so a cdn url of http://cdn.yoursite.com/test.png will correspond to the origin file http://www.yoursite.com/images/test.png
We provide a cdn address for each account. This is located in the cdn portal edit site screen in the field called “CNAME to”. You can use this address to set up a CNAME on your own dns server. Example
Record type: CNAME
CDN content is then accessible at http://cdn.yoursite.com
If you wish, you can restrict origin access so that only the cdn can access it. Our range is 220.127.116.11/23 (18.104.22.168 – 22.214.171.124)
Setting expiry times at the origin server is an important step in having a smooth cdn relationship.
Please see Caching & Expiry Times
HTTP Segmented Video Configuration
It is important that when using HTTP segmented streaming (HLS/DASH/HDS/MSS) that the playlist at the origin server contains relative urls
This is so that the playlist get the segments from the cdn rather than the origin server.
In Wowza this is done by configuring the application type to “HTTP Origin”
It is quite likely that you will have more than one origin server. In this situation it’s quite acceptable to create one cdn site per origin. Example
cdn.yoursite.com -> origin = www.yoursite.com
cdn-storage.yoursite.com -> origin = storage.yoursite.com
If you prefer to have just one cdn site, then configuring the origin to be set by the rules engine is also possible