Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using CloudFlare CDN with Azure Blob Storage

I am trying to use CloudFlare CDN with Azure Blob Storage. I set up a cname on cloudflare pointing cdn.mydomain.com to mystorageaccount.blob.core.windows.net. and set the status to "DNA and HTTP Proxy (CDN)"

If I then go to mystorageaccount.blob.core.windows.net/news/image.jpg in the browser the image is loaded, but if I go to cdn.mydomain.com/news/image.jpg I receive the follow error message from azure

<Error>
  <Code>InvalidUri</Code>
  <Message>The requested URI does not represent any resource on the server. 
    RequestId:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa Time:2017-04-25T13:20:20.8658692Z
  </Message>
  <UriPath>http://cdn.mydomain.com/news/image.jpg</UriPath>
</Error>

Any ideas how to make it work?

like image 821
John Coder Avatar asked Apr 25 '17 13:04

John Coder


1 Answers

After configured the CNAME record in your domain provider, you also need to set the custom domain in Azure portal.

Open your storage account -> Custom domain tab

enter image description here

like image 71
Amor Avatar answered Oct 20 '22 07:10

Amor