【Azure App Service】如何来停止 App Service 的高级工具站点 Kudu ?

发布时间 2024-01-10 22:01:38作者: 路边两盏灯

问题描述

如何来停止 App Service 的高级工具站点 Kudu ?

kudu 介绍

Kudu 提供了一组面向开发人员的工具和扩展点,用于您的应用服务应用程序.

Kudu (Advanced Tools) provides a collection of developer oriented tools and extensibility points for your App Service Apps.

 

问题解答

App Service/Function App/Standard Logic App 均支持通过在 Configuration 页面设置参数 WEBSITE_DISABLE_SCM_SEPARATION = true 来禁用Kudu 站点。

第一步:设置 WEBSITE_DISABLE_SCM_SEPARATION=true

App Service --> Configuration --> Application Settings 

 

第二步:查看并对比变化

添加配置后,访问Kudu URL返回 503 Service Unavailable错误

参考资料

访问应用的 Kudu : https://learn.microsoft.com/zh-cn/azure/app-service/resources-kudu#access-kudu-for-your-app

每当创建应用时,应用服务都会为该应用创建一个由 HTTPS 保护的配套应用。 可在以下位置访问此 Kudu 应用:https://<app-name>.scm.azurewebsites.net

 

Enable/disable Kudu : https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions

Depending on the type of site you are deploying and the deployment method you are using, Kudu will executes build steps on your site during deployment, such as npm install or dotnet build/dotnet publish. To disable this, such as when performing deployment of an already-built site, set:

SCM_DO_BUILD_DURING_DEPLOYMENT=false