How to change origin url of Azure CDN?

I'd love to use Azure CDN for static resources of our web application hosted on Cloud services. When I try to create new CDN from cloud console, the origin domain of CDN is like http://foobar.cloudapp.net/cdn.

How can I change origin url to arbitary one like http://foobar.cloudapp.net/assets ?

August 27th, 2014 8:45am

Hi Kazuki ,

I am not very much sure if your requirement can be implemented .

However, I am trying to check with somebody who is familiar with this topic.

One of the helpful links if you would like to go through on custom domain links for azure cloud service  

Appreciate your patience.

Regards,

Shirisha Paderu.

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2014 1:28pm

Hi Shirisha,

Thanks for reply. Unfortunately, the link you provided doesn't help me as I don't want to change the domain a CDN points to. What I want to do is to change the suburl that a CDN points to. Waiting for reply from your colleagues.

Regards,

Kazuki

August 28th, 2014 1:17am

Hi Kazuli191,

The first thing you need to specify is whether you are have created a CDN over a blob storage container or over the CDN folder in the web application.

The CDN endpoint is of the format http://az479702.vo.msecnd.net/ .

You can map a custom domain name to your Windows Azure CDN endpoint. Windows Azure must verify that you are authorized to modify DNS records for the domain. To verify authorization, create a CNAME resource record with your DNS provider that points from <subdomain>.yourdomain.com to az479702.vo.msecnd.net, or from cdnverify.<subdomain>.yourdomain.com to cdnverify.az479702.vo.msecnd.net.

Hope that answers your question.

Regards,

Angshuman Nayak

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2014 9:46am

Hi Nayak,

Thank you for your comment, but I don't talk about domain.
I want a CDN to point to a folder in my application. The folder name is NOT CDN. 
As I said in my first question, I'd love to make CDN point to http://foobar.cloudapp.net/assets .

We use Ruby on Rails on top of nginx on top of CentOS on top of azure. Our assets are in $app_root/public/assets, and if you access http://$myappname.cloudapp.net/assets/$asset_name, nginx should server an asset. I'd love to cache this asset on a CDN.

Currently, we deal with this issue by letting nginx rewrite request from /cdn/assets to /assets, but I'd love configure azure CDN to directory point to /assets.

August 30th, 2014 2:33pm

PING
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2014 11:36am

Hi Kazuki191,

That is not possible today and it's by design for Cloud Service CDN, with BLOB CDN you have a lot of flexibility. Below are the constraints with CDN on Cloud Service. 

Caching for cloud services has the following constraints:
a) The CDN should be used to cache static content only.
b) Your cloud service must be deployed to in a production deployment.
c) Your cloud service must provide the object on port 80 using HTTP.
d) The cloud service must place the content to be cached in, or delivered from, the /cdn folder on the cloud service.

September 15th, 2014 8:26am

Hi Kazuki,

At risk of turning this thread into something genuinely helpful, you can try the following rewrite rule so that the CDN will get removed before IIS processes the request

http://stackoverflow.com/questions/26537482/azure-cdn-with-rewrite-rules?rq=1

Regards,
Matthew

Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2015 11:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics