Welcome! Log In Create A New Profile

Advanced

Re: How nginx's "location if" works (Was Re: Setting cache parameter via if directives)

Alexander Kunz
February 18, 2011 07:34AM
Thanks so much for the detailed answer.

So i think i am on the right way using html + jquery. The HTML page
loads all my css + js + static data and jquery loads the content with
ajax calls. The Browser builds the page. Nginx + Lua + Redis and the
whole application flys... Great :)

Time to think a bit different :) The "old" way still stuck in my head. I
see there is a function access_by_lua but i still like session. Could
this the way to handle access to all files in app? Decript session and
encrypt session for refreshing the session livetime? Or shoud i use
access_by_lua in each location?

location /app {

set_decode_base32 $session $cookie_SID;
set_decrypt_session $raw $session;
set_encrypt_session $session $raw;
set_encode_base32 $session;
add_header Set-Cookie "SID=$session; path=/";

if ($raw = '') {
rewrite (.*) /relogin.htm?url=$1 redirect;
}

try_files $uri $uri/;
}


Have a nice day, agentzh.

Alexander


On 18.02.2011 12:55, agentzh wrote:
> On Fri, Feb 18, 2011 at 7:54 PM, agentzh<agentzh@gmail.com> wrote:
>> local data = get_data_from_remote()
>> local html = generate_html_from_template("/path/to/my/template")
> Sorry, the last line should have been
>
> local html = generate_html_from_template(data, "/path/to/my/template")
>
> Cheers,
> -agentzh


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

How nginx's "location if" works (Was Re: Setting cache parameters via if directives)

agentzh February 14, 2011 12:30AM

Re: How nginx's "location if" works (Was Re: Setting cache parameters via if directives)

António P. P. Almeida February 14, 2011 05:32PM

Re: How nginx's "location if" works (Was Re: Setting cache parameters via if directives)

Eugaia February 14, 2011 06:52PM

Re: How nginx's "location if" works (Was Re: Setting cache parameters via if directives)

Ryan Malayter February 15, 2011 02:04PM

Re: How nginx's "location if" works (Was Re: Setting cache parameters via if directives)

Dayo February 15, 2011 02:23PM

Re: How nginx's "location if" works (Was Re: Setting cache parameters via if directives)

Dayo February 15, 2011 02:27PM

Re: How nginx's "location if" works (Was Re: Setting cache parameters via if directives)

agentzh February 15, 2011 11:28PM

Re: How nginx's "location if" works (Was Re: Setting cache parameter via if directives)

Alexander Kunz February 18, 2011 06:22AM

Re: How nginx's "location if" works (Was Re: Setting cache parameter via if directives)

agentzh February 18, 2011 06:58AM

Re: How nginx's "location if" works (Was Re: Setting cache parameter via if directives)

agentzh February 18, 2011 06:58AM

Re: How nginx's "location if" works (Was Re: Setting cache parameter via if directives)

Alexander Kunz February 18, 2011 07:34AM

Re: How nginx's "location if" works (Was Re: Setting cache parameter via if directives)

Justin Cormack February 18, 2011 08:26AM

Re: How nginx's "location if" works (Was Re: Setting cache parameter via if directives)

agentzh February 19, 2011 01:10AM

Re: How nginx's "location if" works (Was Re: Setting cache parameter via if directives)

Alexander Kunz February 19, 2011 05:46AM

Re: How nginx's "location if" works (Was Re: Setting cache parameters via if directives)

seekvn September 28, 2021 04:57AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready