【问题标题】:Map Custom domain to Azure web app deployment slot将自定义域映射到 Azure Web 应用部署槽
【发布时间】:2021-04-12 19:19:19
【问题描述】:

我想为我的 Web 应用程序的部署槽(而不是生产槽)自动映射自定义域。我已经通过 Azure 门户使用此 guide 实现了这一点,但我无法通过 AZ CLI 让它工作。看来,在cli中,只有通过for production slot才有可能实现自定义域的映射。这是为生产槽执行此操作的命令,但我在同一个 Web 应用程序上看不到其他槽的选项。此外,无论我尝试使用 webapp-name 参数来尝试引用插槽(假设是一个单独的 Web 应用程序)都不起作用(它一直给我 app not found errors):

az webapp config hostname add --webapp-name <app_slot_name> --resource-group <rg> --hostname <cname_that_already_exists>

【问题讨论】:

    标签: azure azure-web-app-service


    【解决方案1】:

    您可以使用--slot

    官方文档

    az webapp config hostname add

    az webapp config hostname add [--hostname]
                              [--ids]
                              [--resource-group]
                              [--slot]
                              [--subscription]
                              [--webapp-name]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-09-27
      • 1970-01-01
      • 1970-01-01
      • 2020-08-22
      • 1970-01-01
      • 2022-01-08
      • 1970-01-01
      相关资源
      最近更新 更多