繁体   English   中英

怎么修改azure应用服务中kudu的hostingstart.html呢?

[英]How can we modify the hostingstart.html of kudu in the azure app service?

我正在根据代码完成所有工作。 我想在 kudu ui 中完成一个简单的编辑和保存 hostingstart.html 的任务,但我不知道该怎么做。

目前我们已经通过Azure应用服务分发和dns认证与terraform进行了连接检查,甚至通过kuduui中的hostingstart.html检查是否变化良好。

如果可能的话,我想使用 terraform 的代码,所以我写成如下,并把 html 文件放在里面,但是没有用。 (如果不是terraform,yaml或者sh方向也可以。)

resource "azurerm_app_service" "service" {
  provider = azurerm.generic

  name = "${local.service_name}-service"
  app_service_plan_id = azurerm_app_service_plan.service_plan.id
  location = azurerm_resource_group.rg.location
  resource_group_name = azurerm_resource_group.rg.name
  https_only = true

  source_control {
    repo_url = "https://git.a.git"
    branch = "master"
  }
}

或者我们可以通过这种方式在内部文件夹中指定默认路径吗?

tree : web
        +page
         - hostingstart.html
        +terraform
         - main.tf
         - app_service.tf

site_config {
  always_on = true
  default_documents = "../page/hostingstart.html"
}

目前。 似乎最好通过 blob 存储来部署和应用。 https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_blob

您可以在 Portal 中查看和编辑您的文件。

  1. 在 Azure 门户中,导航到您的 web 应用程序。
  2. 应用服务边栏选项卡中,Select高级工具> Go
  3. Select调试控制台 > CMD
  4. 导航到站点/wwwroot
  5. Select 用铅笔图标编辑hostingstart.html文件。

在此处输入图像描述

您可以在门户本身中指定默认文档

  • 应用服务边栏选项卡中, Select Configuration > Default Documents
  • 将要制作的文件作为默认文档放在根目录的顶部。

在此处输入图像描述

对于 Terraform,您无法从 Terraform 将使用的管理平面 API 轻松编辑该文件。 相反,您可以使用您想要显示的任何内容部署一个最小的应用程序。 下面是使用 ARM 模板部署代码的示例: https://github.com/JasonFreeberg/zip-deploy-arm-template

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM