许多领域添加到蔚蓝的网站 [英] Add many domains to an azure web site
问题描述
我迁移pretty严重的多租户应用程序的Azure,和我看到未来的挑战之一是,它承载百余域。
I'm migrating a pretty serious multi-tenant application to Azure, and one of the challenges I see coming is that it hosts over a hundred domains.
在Azure的一面,我看到添加自定义域的唯一方法是通过门户手工输入它们。我真的想与Azure的PowerShell脚本这一点,或(可能不太可取的这种一次性操作)的.Net API之一。
On the Azure side, the only way I see to add a custom domain is hand-entering them via the portal. I would really like to script this out with Azure PowerShell or (perhaps less desirable for this one-off operation) one of the .Net APIs.
我发现这一点,这表明,它可与REST API之一来进行:域添加到通过code 一个Azure的网站
I did find this, which shows that it can be done with one of the REST APIs: Add a domain to an Azure web site via code
有什么PowerShell的?
Is there anything for PowerShell?
推荐答案
您可以使用 -
Set-AzureWebsite -Name "ramisample" -HostNames @('www.abc.com', 'abc.com')
请确保您将其添加为域前点CNAME记录。
Make sure you point the CNAME records before adding them as domains.
这篇关于许多领域添加到蔚蓝的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!