设置的Azure CDN [英] Setting up Azure CDN
问题描述
我们有在Azure应用服务运行的Web应用程序,它有自己的域,即myapp.com
We have a web app that runs on Azure App Service and it has its own domain i.e. myapp.com
我们现在要主持的所有静态文件,如图片,CSS和JS文件通过Azure的CDN,提高了应用程序的响应能力。我们将存储所有这些文件在我们的Azure存储,我们已经创建了两个集装箱,即图像和文件容器。我们也想用自己的自定义域和我想的网址是:
We now want to host all static files such as images, css and js files through Azure CDN to improve responsiveness of the app. We'll be storing all these files in our Azure storage and we've created two containers i.e. "images" and "files" containers. We also want to use our own custom domain and I'd like the URLs to be:
https://cdn.myapp.com/images 获取图像和的 https://cdn.myapp.com/files 对于所有其他文件
https://cdn.myapp.com/images for images and https://cdn.myapp.com/files for all other files.
我有点困惑如何储存容器映射到端点。当我去到门户网站,然后选择存储为原点的类型,我看到了存储账户,但这并不让我指向一个特定的容器。
I'm a bit confused about how to map storage containers to endpoints. When I go to the portal and select "Storage" as origin type, I see the storage account but that doesn't let me point to a particular container.
我如何映射特定容器的最后一个点?
How do I map specific containers to end points?
图像容器应通过 https://cdn.myapp.com/images 可用
文件容器应可通过 https://cdn.myapp.com/files
推荐答案
您不需要映射到CDN的容器,你映射了BLOB端点到CDN
You don't need to map a container to the CDN, you map the blob endpoint to the CDN
比方说,你一滴端点:
mystorageaccount.blob.core.windows.net
Let's say your blob endpoint is: mystorageaccount.blob.core.windows.net
在源URL应该仅仅是:
mystorageaccount.blob.core.windows.net
The origin url should just be: mystorageaccount.blob.core.windows.net
您填写的静态将由访问:
mycdn.azureedge.net/images/image1.jpg
mycdn.azureedge.net/files/text.txt
Your static fill will be accessible by: mycdn.azureedge.net/images/image1.jpg mycdn.azureedge.net/files/text.txt
然后,您可以添加自定义域cdn.myapp.com到mycdn.azureedge.net,经过您的图片和文件将可通过的 cdn.myapp.com/images/image1.jpg
cdn.myapp.com/files/text.txt
Then you can add custom domain "cdn.myapp.com" to "mycdn.azureedge.net", after that your images and files will be available through cdn.myapp.com/images/image1.jpg cdn.myapp.com/files/text.txt
这篇关于设置的Azure CDN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!