What's with the ERB markup? 

BTW, im confused about why you don't handle this host selection thing in the 
lift code and just read the host name? What is the use case here? A mobile site 
or something similar? 

Also, now seeing that you want to work on a request by request basis, im not 
sure that its going to work for you (or be safe) to dynamically use context 
switching in the way I had suggested as its generally something you do at boot 
time. 

Can you work back and explain the use case?

Cheers, Tim

On 15 Feb 2010, at 15:00, Jeppe Nejsum Madsen wrote:

> On Mon, Feb 15, 2010 at 12:29 PM, Timothy Perrett
> <timo...@getintheloop.eu> wrote:
>> 
>> In boot:
>> 
>>    LiftRules.calculateContextPath = () => Full("/yourcontext")
> 
> Oh, that was easy :-) I'll try it out late today....
> 
>> Im not using NGINX for that particular application as we use windows at 
>> work, so I cant share a config file.
>> However, if you post what you have i'll try to wield my NGINX jedi skillz!
> 
> This is what I currently have that is app specific, the idea being
> that context ==  <%= @node[:hostname] %>
> 
> server {
>  listen   80;
>  server_name  <%= @node[:hostname] %>;
> 
>  access_log  <%= @node[:nginx_log_dir] %>/ <%= @node[:hostname] %>.access.log;
>  location / {
>            proxy_pass http://127.0.0.1:8080/<%= @node[:hostname] %>/;
>            proxy_set_header  X-Real-IP  $remote_addr;
>            proxy_read_timeout 700;
>            proxy_connect_timeout 120;
>            proxy_set_header Host $http_host;
>            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>  }
> }
> 
> /Jeppe
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to