Good to see that your using nginx dave... It's a rocking front end.One thing, what made you use proxy_pass rather than upstream ?
Good to see that your using nginx dave... It's a rocking front end.One thing, what made you use proxy_pass rather than upstream ?
I'm intrigued by the Nginx, could you tell us more about what the
advantages of using Nginx as well as Jetty instead of Jetty?
thx
- Alex
On Nov 11 2008, 3:49 pm, "David Pollak"
<feeder.of.the.be...@gmail.com> wrote:
> Folks,
>
> I've been deploying a fair number of apps using Jetty and
> Nginx<http://sysoev.ru/en/>and been very pleased with the results.
> I've put together a package to make
> it wicked simple for you to do the same.
>
> To run one or more Nginx front-end/Jetty backend, do the following:
>
> - download the Jetty container from
> http://tunaforcats.com/deploy_jetty.tgz
> - tar -xzvf deploy_jetty
> - cd deploy_jetty
> - echo 9920 > base_port # this defines the base port that Jetty will run
> at. Production = base, preview = base + 1, dev = base + 2
> - copy your Lift app WAR file to webapps/root.war
> - Edit your nginx.conf file and add:
> server {
> listen 80;
> server_name www.myapp.commyapp.com;
>
> access_log logs/myapp.access.log main;
>
> location / {
> proxy_passhttp://127.0.0.1:9920;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_read_timeout 700;
> proxy_set_header Host $http_host;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
> }
>
> server {
> listen 80;
> server_name preview.myapp.com;
>
> access_log logs/preview_myapp.access.log main;
>
> location / {
> proxy_passhttp://127.0.0.1:9921;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_read_timeout 700;
> proxy_set_header Host $http_host;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
> }
>
> server {
> listen 80;
> server_name dev.myapp.com;
>
> access_log logs/dev_myapp.access.log main;
>
> location / {
> proxy_passhttp://127.0.0.1:9922;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_read_timeout 700;
> proxy_set_header Host $http_host;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
> }
> - Reload/restart Nginx
> - Start your production Jetty instance: start_prod.sh
>
> You should see very, very good performance with Lift's long polling, even at
> a high load.
>
> Questions?
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Collaborative Task Managementhttp://much4.us
Thats good to know, thanks!
The http://tunaforcats.com/deploy_jetty.tgz is currently returning a
404. I'll live without it, but it seems pretty useful and I'm
interested to look at it to see how you got it to work as you
describe.
Thanks!
Philippe
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
This may be kind of late to reply, but do you happen to still have
that Jetty container?
The http://tunaforcats.com/deploy_jetty.tgz is currently returning a
404. I'll live without it, but it seems pretty useful and I'm
interested to look at it to see how you got it to work as you
describe.
2. How to autostart my application on server restart?
Thanks.
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
Thanks, I'll read about upstart.
--