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 ?

Cheers, Tim

Sent from my iPhone

On 11 Nov 2008, at 21:11, "Viktor Klang" <[EMAIL PROTECTED]> wrote:

> Thanks for the how-to Dave!
> Looks splendid :)
>
> On Tue, Nov 11, 2008 at 9:49 PM, David Pollak <[EMAIL PROTECTED] 
> > wrote:
> Folks,
>
> I've been deploying a fair number of apps using Jetty and Nginx 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.com myapp.com;
>
>         access_log  logs/myapp.access.log main;
>
>
>         location / {
>             proxy_pass http://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_pass http://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_pass http://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 framework http://liftweb.net
> Collaborative Task Management http://much4.us
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
>
>
>
>
> -- 
> Viktor Klang
> Senior Systems Analyst
>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to