【问题标题】:Add custom domain for customer in azure web app and add let's encript certificate automatically在 azure web 应用程序中为客户添加自定义域并添加让我们自动加密证书
【发布时间】:2018-06-20 09:16:26
【问题描述】:

我们提供服务来帮助本地企业在 Google 或 Facebook 等平台上收集更多评论。每个客户都有自己的网站,由我们托管。但从技术上讲,它在 一个 Azure Web App 上运行。例如,每个客户都有一个如下网址:https://portal.your-voting.com/freds-bike-shop。我们希望让我们的客户有机会在后端配置他们自己的域。例如:https://review.freds-bike.shop。来自 Let's Encript for Azure 的 SSL 证书也应该适用于自定义域。

如何以编程方式为我的 Azure Web 应用添加自定义域? 如何为客户域自动获取和安装 Let's Encript 证书?

目前我们使用 Let's Encript Site Extension 和 C# als 编程语言。

【问题讨论】:

    标签: c# asp.net azure ssl lets-encrypt


    【解决方案1】:

    如何以编程方式为我的 Azure Web 应用添加自定义域?

    您可以利用Azure Management Libraries for .NET 并按照Getting Started with App - Manage Web App With Domain Ssl - in .Net 将自定义域名绑定到Web App,如下所示:

    app1.Update()
    .DefineHostnameBinding()
    .WithThirdPartyDomain("{yourdomain.com}")
    .WithSubDomain("{your-subdomain}")
    .WithDnsRecordType(CustomHostNameDnsRecordType.CName)
    .Attach()
    .Apply();
    

    如何为客户域自动获取和安装 Let's Encrypt 证书?

    这是一种类似的方法,用于通过 Let's Encrypt 证书对 azure web 应用程序使用 powershell 自动化,您可以通过以下步骤在here 上详细了解CreateLetsEncryptWebApp.ps1

    a) 创建 Azure Web 应用

    b) 从 Let's Encrypt 生成证书

    c) 使用自定义域名将证书绑定到 Web App

    要使用 Let's Encript Site Extension,您需要注册一个 Azure AD 应用并配置相关的 Web 应用设置,详细信息您可以关注here

    【讨论】:

    • 谢谢,帮了大忙! :)
    猜你喜欢
    • 2019-04-17
    • 2015-08-13
    • 1970-01-01
    • 2021-12-20
    • 2018-05-10
    • 2018-10-26
    • 1970-01-01
    • 2022-12-12
    • 2019-07-10
    相关资源
    最近更新 更多