【问题标题】:How to fetch SSL Certificate for django project in Azure?如何在 Azure 中为 django 项目获取 SSL 证书?
【发布时间】:2017-02-03 20:24:21
【问题描述】:

我在 Azure 中有我的 django 项目,名为

> djangoproj.azurewebsites.net

我想为此应用程序提供 SSL 层,当我尝试在 Azure 控制台中使用 openssl 时,我收到以下错误

> openssl req -sha256 -new -nodes -keyout djangoproj.key -out proj.csr -newkey rsa:2048
D:\home\site\wwwroot
Generating a 2048 bit RSA private key
..................+++
.......................................+++
unable to write 'random state'
writing new private key to 'djangoproj.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:problems making Certificate Request

提出证书请求时出现问题。

我可以知道如何在 azure 中为我的应用获取正确的 SSL 证书吗?

【问题讨论】:

    标签: django azure ssl https


    【解决方案1】:

    这不是 TLS 在 Azure 应用服务中的工作方式。 TLS 在前端层终止。您的应用程序只需处理纯 HTTP。

    如果您需要检查请求是否通过 HTTPS 发出:

    应用程序请求路由 (ARR) 为通过 HTTPS 到达的每个请求附加一个特殊的请求标头。 X-ARR-SSL 中包含的值提供有关用于保护客户端和 ARR 之间的 TCP 连接的 TLS 服务器证书的信息。

    例如:

    X-ARR-SSL: 2048|256|C=US, S=Washington, L=Redmond, O=Microsoft Corporation,
               OU=Microsoft IT, CN=Microsoft IT SSL SHA2|CN=*.azurewebsites.net
    

    我在此的另一个答案有更多关于该主题的信息:
    Is current request being made over SSL with Azure deployment

    我可以知道如何在 azure 中为我的应用获取正确的 SSL 证书吗?

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-purchase-ssl-web-site/

    您可以在 https://{site}.azurewebsites.net 上获得免费的 TLS,也就是说,如果您真的不需要自定义域或只是希望快速构建概念验证。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-03
      • 1970-01-01
      • 2012-05-04
      • 2013-02-22
      • 1970-01-01
      • 1970-01-01
      • 2017-06-22
      • 1970-01-01
      相关资源
      最近更新 更多