【问题标题】:How to configure ssl certificate on play framework?如何在播放框架上配置 ssl 证书?
【发布时间】:2017-11-06 23:26:02
【问题描述】:

我已经根据https://www.playframework.com/documentation/2.5.x/ConfiguringHttps 中的描述生成了 X.509 证书。但是,我无法将 play 配置为将其用作 ssl 证书。 任何人都可以向我提供指向 ssl 证书并使用此证书制作 https 的实际程序。

注意: 我仅将播放用作服务器并将页面作为客户端。所以,请帮我弄清楚如何在这种情况下配置 ssl 证书。

谢谢!!!

【问题讨论】:

    标签: scala playframework ssl-certificate


    【解决方案1】:

    我找到了解决问题的方法。

    在我从 https://www.playframework.com/documentation/2.5.x/ConfiguringHttps 创建 keyStore.jks 之后。然后,我需要做的就是将以下内容放入 application.conf 文件中:

    Application.conf

    play.crypto.secret="changethissosomethingsecret"
    play.server.https.keyStore.path = "Path to your .jks file"
    play.server.https.keyStore.type = "JKS"
    play.server.https.keyStore.password = "yourKeyStorePassword"
    

    然后要启动应用程序,我在开发模式下需要做的就是sbt "start -Dhttps.port=9443"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-13
      • 2020-05-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多