1. Go to the CDN tab and press Create CDN resource.
2. Select which Object Storage you want to use as a content source: public or private - and follow the instructions.
1. Select the Specify content origin option.
2. Select None in the "Type of origin authentication" option.
3. Specify the path to your bucket in following format: http(s)://<bucket-name>.<location>.cloud.gcore.lu
. More details in the "Request content directly from the Object Storage" section below.
4. Specify custom domain, e.g., cdn.example.com. Read more about the personal domain setup in the "Create and set a custom domain for the content delivery via CDN" guide.
If you want to use a private bucket instead of a public S3 bucket, follow our guide on how to use a private bucket as an origin.
Go to the CDN tab and press Create CDN resource.
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.gcdn.co as the Origin Source. Read more about personal domain setup in the "Create and set a custom domain for the content delivery via CDN" guide.
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:
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 the article on ACL and policy or official documentation.
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
If the CDN Custom domain is cdn.example.com, the URL to request the file from CDN will be:
http://cdn.example.com/picture.png
Was this article helpful?
Check out our Storage