Apache is the most widely used web server. If you are already using it, you can set up Apache httpd as a proxy for your Play application, instead of exposing it to the Internet directly.
This recipe shows you how to configure SSL and non-SSL Play applications together with the Apache httpd. This chapter features a couple of recipes on how to use a web server as a proxy for Play. In any configuration example one assumption is made: You want to use SSL, but you do not want to use the built-in SSL support of the Play framework, because you are using a proxy in front of your Play application. The forwarding from the external SSL port is done to the internal Play application. However, the internal application does not use SSL. This prevents doing encryption twice or redirecting SSL directly to the Play application. However, you still have to make sure the Play application handles the request as if it came via HTTPS.
The source code of the example application...