Documentation

You are viewing the documentation for the 2.1.4 release in the 2.1.x series of releases. The latest stable release series is 3.0.x.

§Configuring HTTPS

Play can configured to serve HTTPS. To enable this, simply tell Play which port to listen using the https.port system property. For example:

./start -Dhttps.port=9443

§SSL Certificates

By default, Play will generate itself a self signed certificate, however typically this will not be suitable for serving a website. Play uses Java key stores to configure SSL certificates and keys.

Signing authorities often provide instructions on how to create a Java keystore (typically with reference to Tomcat configuration). The official Oracle documentation on how to generate keystores using the JDK keytool utility can be found here.

Having created your keystore, the following system properties can be used to configure Play to use it:

An example of using these properties might be:

./start -Dhttps.port=9443 -Dhttps.keyStore=/path/to/keystore -Dhttps.keyStorePassword=changeme