You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Azure CLI配置Azure Front Door:添加多自定义域路由遇问题

解决Azure CLI配置AFD路由添加多自定义域失败的问题
  • 修正参数格式:Azure CLI中--custom-domains参数的多值输入要求用逗号分隔,而非空格。你之前用空格分隔两个域ID会导致CLI解析错误,正确写法如下:

    --custom-domains "$afd_custom_domain_1,$afd_custom_domain_2"
    
  • 完整命令示例:把修正后的参数带入创建路由的完整命令(替换占位符为你的实际资源信息):

    az afd route create \
      --resource-group your-resource-group-name \
      --profile-name your-afd-profile-name \
      --endpoint-name your-afd-endpoint-name \
      --route-name your-route-name \
      --custom-domains "$afd_custom_domain_1,$afd_custom_domain_2" \
      --origin-group your-origin-group-name \
      --supported-protocols Http Https \
      --forwarding-protocol HttpsOnly \
      --https-redirect Enabled
    
  • 额外检查项:

    • 确保两个自定义域已成功关联到你的AFD配置文件,且完成了DNS验证和HTTPS证书配置(如果启用HTTPS)
    • 检查Azure CLI版本是否为最新,旧版本可能存在参数解析bug,运行az upgrade完成升级

内容的提问来源于stack exchange,提问作者Herald Gjura

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 21:17:34