Use as an origin:
• S3 storage
• SFTP storage
Request content from CDN:
• S3 storage is the origin
• SFTP storage is the origin
Use the storage as an origin for your CDN resource
Use S3 storage
Go to the CDN tab and press Create CDN resource.
Specify values in the fields:
- Path to your bucket in following format
http(s)://<bucket-name>.<location>.cloud.gcore.lu
More details in the "Request content directly from the S3 storage" guide. S3 storage supports both HTTP and HTTPS delivery. So choose any pull protocol you prefer. - Custom domain, e.g., cdn.example.com. Read more about the personal domain setup in the "Create a domain name for content delivery through a CDN" guide.
Use SFTP storage
Go to the CDN tab and press Create CDN resource.
SFTP storage supports only HTTP protocol.
To specify the Origin Source, use the following schema: <storage name>.<hostname>. Both name and hostname can be found on the Storage tab > Storages > Details.
If your storage name is 12345-test and your hostname is ams.origin.gcdn.co, you should specify 12345-test.ams.origin.co as the Origin Source. Read more about personal domain setup in this article. The Custom Host Header field is auto-filled.
Request content from CDN
S3 storage is the origin
An addressing scheme where you specify the bucket at the beginning (<bucket-name>.<location>.cloud.gcore.lu) allows you to increase the security of your CDN usage because you hide the Hostname of your repository.
Use the following schema to request uploaded files:
http(s)://<Custom domain>/<folder*>/<file>
*If the folder was created in the bucket. If files were added to the root of the bucket - specify file names.
For example, you've:
- used a bucket mybucket, S3 storage in the Luxembourg location s-ed1.cloud.gcore.lu
- created a CDN resource for the storage with the Custom domain with cdn.example.com.
To request file picture.png, which was uploaded into the bucket, from CDN use the following URL:
http://cdn.example.com/picture.png
Note! By default, created buckets and all the stored files in buckets are private. To make a file public, read an article on ACL and policy or official documentation.
SFTP storage is the origin
Upload your files to the htdocs directory, but don't specify the directory when requesting the content.
Path to the uploaded file in the storage:
sftp://12345-test@ams.origin.gcdn.co:2200/export/home/12345-test/htdocs/picture.png
CDN Custom Domain:
cdn.mycompany.com
URL to request the file from CDN:
http://cdn.mycompany.com/picture.png