Linode 512 and play! framework

旧时模样 提交于 2019-12-08 05:17:06

问题


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


回答1:


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.




回答2:


Simple steps for play framework deployment in Linode.

  1. Buy your own Linode ( I have the 512 )
  2. Connect to your linode via ssh
  3. Do some basic stuff(like setting up user,ssh,hostnames,iptables etc)
  4. Download the play framework version that you prefer with (wget)
  5. Download your favourite database and set it up
  6. 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 ;)




回答3:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!