Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!!!

like image 836
Subodh Pradhan Avatar asked Jan 31 '26 21:01

Subodh Pradhan


1 Answers

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".

like image 110
Subodh Pradhan Avatar answered Feb 03 '26 11:02

Subodh Pradhan