简体   繁体   English

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

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

I'm doing all the work based on the code.我正在根据代码完成所有工作。 I want to work on a simple task of edit and save hostingstart.html in kudu ui, but I don't know how to do it.我想在 kudu ui 中完成一个简单的编辑和保存 hostingstart.html 的任务,但我不知道该怎么做。

Currently, we have checked the connection through Azure app service distribution and dns authentication with terraform, and even checked whether the change is good through hostingstart.html in kuduui.目前我们已经通过Azure应用服务分发和dns认证与terraform进行了连接检查,甚至通过kuduui中的hostingstart.html检查是否变化良好。

If possible, I wanted to work with the terraform code, so I wrote it as below and put the html file inside, but it didn't work.如果可能的话,我想使用 terraform 的代码,所以我写成如下,并把 html 文件放在里面,但是没有用。 (If it's not terraform, yaml or sh direction is also good.) (如果不是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"
  }
}

Or can we specify the default path in the internal folder in this way?或者我们可以通过这种方式在内部文件夹中指定默认路径吗?

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

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

For the moment.目前。 It seems best to deploy and apply through blob storage.似乎最好通过 blob 存储来部署和应用。 ( https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_blob ) https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_blob

You can view and edit your files in Portal.您可以在 Portal 中查看和编辑您的文件。

  1. In the Azure Portal, navigate to your web app.在 Azure 门户中,导航到您的 web 应用程序。
  2. In the App Service blade, Select Advanced Tools > Go .应用服务边栏选项卡中,Select高级工具> Go
  3. Select Debug console > CMD . Select调试控制台 > CMD
  4. Navigate to site/wwwroot导航到站点/wwwroot
  5. Select the pencil icon to edit the hostingstart.html file. Select 用铅笔图标编辑hostingstart.html文件。

在此处输入图像描述

You can specify the Default Documents in the Portal itself.您可以在门户本身中指定默认文档

  • In the App Service blade, Select Configuration > Default Documents .应用服务边栏选项卡中, Select Configuration > Default Documents
  • Place the file which you want to make as a default document on the top of the root.将要制作的文件作为默认文档放在根目录的顶部。

在此处输入图像描述

for Terraform you can't easily edit that file from management plane APIs, which Terraform would use.对于 Terraform,您无法从 Terraform 将使用的管理平面 API 轻松编辑该文件。 Instead, you can deploy a minimal application with whatever you want to show.相反,您可以使用您想要显示的任何内容部署一个最小的应用程序。 Here's an example of deploying code with an ARM template: https://github.com/JasonFreeberg/zip-deploy-arm-template .下面是使用 ARM 模板部署代码的示例: https://github.com/JasonFreeberg/zip-deploy-arm-template

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

相关问题 Azure 应用服务 - Kudu 部署失败“缺少作曲家可执行文件” - Azure App Service - Kudu deployment fails "Missing composer executable" 在 Kudu 中找不到 Azure webjob 的 App.config - Can't find Azure webjob's App.config in Kudu 在Kafka Azure 服务总线中,我们如何维护消费者级别的排序? - How can we maintain ordering at the consumer level in Kafka, Azure Service bus? 我们如何在 Azure 中创建 1 个操作组来触发多个订阅的逻辑应用 - How can we create 1 action group in Azure to trigger a logic app for multiple subscriptions 如何查看 Azure 应用服务 web 应用的最终 appSettings 值? - How can I view the final appSettings values on an Azure App Service web app? 可以将 AZURE 应用服务定义为 .NET 的一部分吗? - Can an AZURE App Service be defined as part of a VNET? 我们如何增加 Azure 中的 su.net 大小? - How can we increase the subnet size in Azure? 我们如何在没有内联的情况下检查 Azure 逻辑应用程序中的变量文本是否为数字 - How we can check the the variable text is number or not in Azure logic app without inline 如何使用私有 Azure Container Registry 创建一个 Azure APP Service? - How to create a Azure APP Service with a private Azure Container Registry? 如何从 Azure 管道中的 Azure 应用服务获取价值 - How to get value from Azure App Service from Azure pipeline
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM