Subodh Pradhan
Subodh Pradhan

Reputation: 131

How to configure ssl certificate on play framework?

I have generated X.509 Certificates according to the description in https://www.playframework.com/documentation/2.5.x/ConfiguringHttps . But, i cannot configure play to use this as ssl certicate. Can anybody provide me the actual procedure to point ssl certifate and use this certificate in play to make https.

Note: I am using play only as a server and react page as client. So, please help me to figure out how i can configure ssl certificate in such scenario.

Thanks you!!!

Upvotes: 3

Views: 3609

Answers (1)

Subodh Pradhan
Subodh Pradhan

Reputation: 131

I found the solution to my problem.

After i created keyStore.jks from https://www.playframework.com/documentation/2.5.x/ConfiguringHttps . Then, all i needed to do was to put following things in application.conf file:

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"

Then to start the application all i need to do in dev mode was sbt "start -Dhttps.port=9443".

Upvotes: 4

Related Questions