azure - 以编程方式在 Azure 存储上启用静态网站

标签 azure azure-web-app-service azure-storage

由于 Azure 存储帐户上的静态网站功能不再处于预览模式,是否可以通过编程方式设置此选项(通过 Powershell Az 命令/Azure CLI)?

目前我能看到的唯一方法是在 UI 中手动执行此操作:

enter image description here

最佳答案

根据文档:

https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website

您可以使用 CLI

az storage blob service-properties update --account-name <ACCOUNT_NAME> --static-website --404-document <ERROR_DOCUMENT_NAME> --index-document <INDEX_DOCUMENT_NAME>

关于azure - 以编程方式在 Azure 存储上启用静态网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54824398/

相关文章:

azure - 我可以通过 unc-path 从我的应用程序服务访问 azure-storage-file 吗?

azure - 如何在 Azure 上创建可访问 Internet 的私有(private) VM

azure - 与 Azure AD 集成的应用程序缺少信息(SAML、OAuth)

azure - 空的 Azure 应用服务计划需要付费吗?

node.js - Azure存储NodeJS修改默认超时设置

sql - 存储图像 - SQL DB 与 Azure Blob 存储

调用 SQL 存储过程的 C# 函数在从本地计算机使用时有效,但在从云中的 Azure 函数调用时失败

asp.net-mvc - 使用不可更新 View 进行预编译导致未预编译异常

database - Azure 上的游戏记分牌

http - net/http : request canceled (Client. 等待 header 时超时)为什么/该怎么办?