I have a DNS setup with DigitalOcean for the domain
What I want to do?
I would like a sub domain i.e.
static.ghazanfarmir.me to be linked to the CloudFront Distribution, which then is linked to the S3 bucket containing all my assets. So I can access the CDN using the sub domain static.ghazanfarmir.me.
What I have done so far?
- Setup S3 bucket containing all of my assets and have created a CloudFront distribution off this S3 bucket (
- Created CNAME record on DigitalOcean DNS for
static.ghazanfarmir.meto the CloudFront distribution i.e.
This doesn't work, can someone please explain how this would work, or if this works at all this way?
I am using NGINX and the problem is hitting
static.ghazanfarmir.me loads the first site within sites-enabled directory i.e.