如何在播放框架上配置 ssl 证书?
How to configure ssl certificate on play framework?
我已经按照https://www.playframework.com/documentation/2.5.x/ConfiguringHttps中的描述生成了X.509证书。但是,我无法将 play 配置为将其用作 ssl 证书。
任何人都可以向我提供指向 ssl 证书并在游戏中使用此证书制作 https 的实际程序。
注意:
我仅将播放用作服务器,将页面用作客户端。所以,请帮我弄清楚如何在这种情况下配置 ssl 证书。
谢谢!!!
我找到了问题的解决方案。
在我从 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"
。
我已经按照https://www.playframework.com/documentation/2.5.x/ConfiguringHttps中的描述生成了X.509证书。但是,我无法将 play 配置为将其用作 ssl 证书。 任何人都可以向我提供指向 ssl 证书并在游戏中使用此证书制作 https 的实际程序。
注意: 我仅将播放用作服务器,将页面用作客户端。所以,请帮我弄清楚如何在这种情况下配置 ssl 证书。
谢谢!!!
我找到了问题的解决方案。
在我从 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"
。