I'm a noob and I'm looking for some help on how to run my play framework on Linode 512. I'm using a debian image.My question is if I can just install java and then play! framework and just run it like that or do I need any front-end server to act like a proxy.
Sorry for the noobish question. Thanks
Play framework is a complete stack. You can run it without any front end server acting as a proxy. However, if you also want to have SSL (although Play has SSL support, it is recommended to use a complete HTTP server to handle this), or you want to run multiple Play applications that appear on the same port, then you need an HTTP server to front it.
Simple steps for play framework deployment in Linode.
- Buy your own Linode ( I have the 512 )
- Connect to your linode via ssh
- Do some basic stuff(like setting up user,ssh,hostnames,iptables etc)
- Download the play framework version that you prefer with (wget)
- Download your favourite database and set it up
- Run play! framework with:
play start MyApplication
or
play run MyApplication
And you have a running application by this step.Enjoy!
If you need more advanced things (like SSL,load balancing and multiple instances) try using a front server such as nginx and do the appropriate configurations
I hope this will help someone ;)
If you ever need to support AJAX calls (XHR) to other ports or domains from your application and you don't want to use CORS to deal with working around the SOP of the browser (don't use CORS - it will give you problems with accepting session cookies) then you will want to use apache as a reverse proxy in front of your play application on Linode. This could also be a form of cheap load balancing later - but that configuration is more involved than a simple reverse proxy.
I have a play application and a GWT GUI and am using apache reverse proxy to allow my GWT requests to the Play RESTful web services to be properly authenticated with the PLAY_SESSION cookie. It all works really well.
来源:https://stackoverflow.com/questions/11122610/linode-512-and-play-framework