我正在尝试为 blob CDN 端点设置自定义域名,如下 these说明,但似乎无法使用子域 static.mydomain.com 访问我的内容。我已通过我的注册商创建了以下记录:
Subdomain: static
Type: CNAME
TTL: 7200
Data: blobconatinername.blob.core.windows.net.
例如,我可以访问这个文件(注意 https): https://blobcontanername.blob.core.windows.net/somefile.mp3
但尝试访问此文件
http://static.mydomain.com/somefile.mp3
我收到无效 URI 错误(错误 400):
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>InvalidUri</Code>
<Message>
The requested URI does not represent any resource on the server. RequestId:c5ec4859-0001-0079-0bf8-961dfa000000 Time:2016-04-15T09:22:32.1317877Z
</Message>
<UriPath>
http://static.mydomain.com/somefile.mp3
</UriPath>
</Error>
分辨率?
最佳答案
您可以通过 CDN 端点 yourcdnendpoint.azureedge.net/path/to/file
访问该文件吗?
static.yourdomain.com
不应该指向 CDN 端点,而不是您的 Blob 存储吗?
Subdomain: static
Type: CNAME
TTL: 7200
Data: yourcdnendpoint.azureedge.net.
此外,您所使用的域必须经过验证。该过程描述于 https://azure.microsoft.com/sv-se/documentation/articles/cdn-map-content-to-custom-domain/
关于azure - Blob CDN 终结点的自定义子域名导致错误 400,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36643586/