Azure Web 应用程序免费 SSL 阶段

标签 azure azure-web-app-service

我正在将我们的网站迁移到 Azure Web App (S1)。我可能想得太多了,但需要为我的团队创建一个临时域,以便在将产品站点移动到 Azure 之前对临时 Azure 站点进行质量检查。

到目前为止我已完成以下操作:
1. 创建 Azure Web App 帐户并部署站点 mysite.azurewebsites.net - 完成
2. 创建子域 stage.mycompany.com - 完成
3. 创建 cname #2 并指向 #1 - 完成

由于 stage.mycompany.com 是临时的(直到我们将实际站点移过去),我不想为此购买 SSL。

我想我可以使用 openssl 创建 SSL 并在 Azure 上安装该证书。我尝试过,但在 chrome 中得到 cname 的“不安全”。

这个想法可行吗(cname azure Web 应用程序的免费 SSL),但我只是没有正确安装 ssl?

最佳答案

I thought I could just create an SSL using openssl and install that cert on Azure. I tried that but get "Not secure" in chrome for the cname.

您可能尚未将证书导入计算机上的受信任的根证书颁发机构目录中。您可以按照以下步骤检查您这边的配置。

如果使用 OpenSSL 创建证书,则应使用私钥导出证书,然后将证书 .pfx 文件上传到 Azure 门户。 Export certificate to PFX.

或者,您可以使用 PowerShell 生成自签名证书。

New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName "stage.mycompany.com" -FriendlyName "MySiteCert" -NotAfter (Get-Date).AddYears(1)

导出证书。然后运行 ​​MMC,按照路径在您的计算机中找到新生成的证书。文件---添加\删除管理单元---证书---添加---计算机帐户。将证书从个人目录复制到受信任的根证书颁发机构目录。另外,您需要使用私钥导出证书(.pfx 文件)。

在Azure端,您需要将新生成的自签名证书上传并绑定(bind)到您的网站。

  • 将您的子域 stage.mycompany.com 映射到您的网站。您可以在 Web 应用程序页面中选择自定义域。添加主机名stage.mycompany.com,引用this .
  • Bind your SSL certificate.单击 Web 应用程序左侧导航栏中的 SSL 设置。上传新的 .pfx 证书,并将 SSL 证书与基于 SNI 的 SSL 类型绑定(bind)。

之后就可以通过 https://stage.mycompany.com 访问网站了。我在实验室中使用 IE 和 Chrome 进行了测试,如下所示:

enter image description here

关于Azure Web 应用程序免费 SSL 阶段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51508002/

相关文章:

azure - Microsoft Identity Platform V2 不适用于个人帐户

azure - 与环境变量相比,在 KeyVault 中存储简单 secret 有哪些优点

c# - SMTP 电子邮件发送中的问题,Azure 中托管的 ASP .Net mvc 应用程序

Linux 上的 Azure 应用服务 - 静态文件内容未更新

azure - Application Insights 在计时依赖性时是否考虑线程调度?

Azure 资源管理器模板集 VM 时区

python - 在免费授予的 Azure 函数下,我每月可以执行多少次?

azure - 属性值不适当 "network_interface_id": string required

azure - Umbraco:Azure Web Apps 上出现意外网络错误

azure - 对 Azure 中的 Websocket 限制、事件连接进行故障排除